Skip to main content

Overview

The String Utils API provides a comprehensive set of string manipulation utilities through both traditional REST endpoints and MCP (Model Context Protocol) server integration. Built by Dirt Road Dev, this API offers string utilities via MCP server and paid/testnet endpoints, all protected by x402 blockchain-based payment processing.

Architecture

The API consists of three main components, all protected by x402 authentication:
  1. MCP Server (/mcp/*) - String utilities via MCP protocol (USDC payment on Base)
  2. Paid Endpoints (/tools/paid/*) - Premium string utilities on Base network (USDC payment)
  3. Testnet Endpoints (/tools/testnet/*) - Test utilities on SKALE Base Sepolia Testnet (USDC payment)

Supported Operations

String Manipulation Tools

22 string utilities including case conversion, formatting, validation, and more

Blockchain Integration

The API integrates with blockchain networks for payment processing:
  • Base Network (Paid endpoints) - Uses USDC for micropayments
  • SKALE Base Sepolia Testnet (Testnet endpoints) - Uses USDC for testing environment
{
  "network": "base",
  "token": "USDC",
  "contract": "0x71dc0bc68e7f0e2c5aace661b0f3fb995a80aaf4",
  "facilitator": "https://facilitator.payai.network"
}

Authentication

All endpoints use x402 blockchain-based payment authentication:

How x402 Authentication Works

  1. Request access - Client sends request with payment requirements in response
  2. Pay via blockchain - Client makes payment using USDC on Base network
  3. Access granted - Once payment settles, full API access is provided

Payment Process

  • Network: Base (production) or SKALE Base Sepolia Testnet (testing)
  • Token: USDC for all transactions
  • Authentication: Bearer token + blockchain payment verification
  • Settlement: Gasless transactions via payment facilitators
{
  "security": [
    {
      "bearerAuth": []
    }
  ]
}

Available Tools

The API provides 22 comprehensive string manipulation tools:

Case Conversion

  • to_uppercase - Convert to uppercase
  • to_lowercase - Convert to lowercase
  • capitalize - Capitalize each word
  • capitalize_first_letter - Capitalize only first letter

Case Style Conversion

  • snake_to_camel - snake_case → camelCase
  • camel_to_snake - camelCase → snake_case

String Analysis

  • length - Get string length
  • contains - Check substring presence
  • starts_with - Check prefix
  • ends_with - Check suffix
  • is_palindrome - Check palindrome
  • count_occurences - Count substring occurrences

String Modification

  • reverse_string - Reverse string
  • trim - Remove whitespace
  • normalize_whitespace - Standardize whitespace
  • replace_all - Replace all occurrences
  • substring - Extract substring
  • truncate - Truncate with suffix
  • repeat - Repeat string
  • remove_non_alphanumeric - Remove special characters
  • slugify - Create URL slug