textmerchant-mcp
v0.1.1
Published
MCP server for Text Merchant — AI-powered text processing micro-services with x402 payments. Summarize, sentiment, entities, keywords, classify, Q&A, topics, generate, paraphrase, and intent detection.
Readme
textmerchant-mcp
MCP (Model Context Protocol) server for Text Merchant — AI-powered text processing micro-services with x402 payments.
10 AI endpoints: summarize, sentiment, entities, keywords, classify, Q&A, topics, generate, paraphrase, and intent detection.
- Docs: textmerchant.com/docs
- npm: textmerchant-mcp
- GitHub: HTTPayer/textmerchant-mcp
Quickstart
With an AI agent (recommended)
Paste this into any MCP-compatible agent (Claude Code, Cursor, Windsurf, OpenCode...):
Set up https://raw.githubusercontent.com/HTTPayer/textmerchant-mcp/main/SKILL.mdThe agent detects your environment and handles everything automatically. The SKILL.md includes the full setup guide and MCP resource definitions.
Without an agent (manual)
1. Run setup:
npx textmerchant-mcp setupChoose your payment mode when prompted:
- HTTPayer (recommended) — pay via credits, no wallet needed. Get key at app.httpayer.com
- x402 Direct — pay on-chain with your own EVM wallet (USDC on Base)
Flags:
| Flag | Description |
| ----------------------- | ---------------------------------------------------------------------------------------------------------- |
| --mode httpayer\|x402 | Payment mode |
| --key sk-live-... | HTTPayer API key (non-interactive) |
| --private-key 0x... | EVM private key for x402 direct mode |
| --network eip155:8453 | CAIP-2 network (default: Base Mainnet) |
| --client <name> | Target: claude-code, claude-desktop, cursor, windsurf, opencode, zed, cline, warp, codex |
| --scope user\|project | Claude Code scope (default: user) |
| --yes / -y | Skip all prompts |
| --update-key | Replace existing credentials |
2. Add to your client:
Claude Code:
claude mcp add textmerchant --scope user -- npx -y textmerchant-mcp@latestClaude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}Cursor (.cursor/mcp.json), Windsurf (.windsurf/mcp.json), Cline (.cline/mcp_settings.json):
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}OpenCode (opencode.json or ~/.config/opencode/config.json):
{
"mcp": {
"textmerchant": {
"type": "local",
"command": ["npx", "-y", "textmerchant-mcp@latest"],
"enabled": true
}
}
}Zed:
{
"context_servers": {
"textmerchant": {
"command": {
"path": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}
}3. Restart your client and verify:
Ask your agent: "Summarize: Artificial intelligence is intelligence demonstrated by machines..."
A summary response means Text Merchant is working.
Manual Setup for Text Editors & IDEs
Claude
Claude Desktop (macOS)
- Open
~/Library/Application Support/Claude/claude_desktop_config.json - Add to
mcpServers:
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}- Save and restart Claude Desktop
Claude Desktop (Windows)
- Open
%APPDATA%\Claude\claude_desktop_config.json - Add the same JSON snippet above
- Save and restart Claude Desktop
Claude Code
# Using CLI
claude mcp add textmerchant --scope user -- npx -y textmerchant-mcp@latest
# Or for project scope
claude mcp add textmerchant --scope project -- npx -y textmerchant-mcp@latestCursor
- Open
.cursor/mcp.jsonin your project root (or create it) - Add:
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}- Restart Cursor
Or globally in user settings:
- macOS:
~/Library/Application Support/Cursor/mcp.json - Windows:
%APPDATA%\Cursor\mcp.json
OpenCode
- Create or edit
~/.config/opencode/config.json - Add:
{
"mcp": {
"textmerchant": {
"type": "local",
"command": ["npx", "-y", "textmerchant-mcp@latest"],
"enabled": true
}
}
}- Restart OpenCode
Or project-level in opencode.json:
{
"mcp": {
"textmerchant": {
"type": "local",
"command": ["npx", "-y", "textmerchant-mcp@latest"],
"enabled": true
}
}
}Windsurf
- Open
.windsurf/mcp.jsonin your project root - Add:
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}- Restart Windsurf
Cline
- Open
.cline/mcp_settings.json - Add:
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}- Restart Cline
Zed
- Open your Zed config:
~/.config/zed/settings.json(macOS/Linux) or%APPDATA%\Zed\settings.json(Windows) - Add:
{
"context_servers": {
"textmerchant": {
"command": {
"path": "npx",
"args": ["-y", "textmerchant-mcp@latest"]
}
}
}
}- Restart Zed
Custom MCP Clients
For any MCP-compatible client or custom setup:
Via Node.js/JavaScript
import { spawn } from "child_process";
const server = spawn("npx", ["-y", "textmerchant-mcp@latest"], {
stdio: ["pipe", "pipe", "pipe"]
});
// Use stdio for JSON-RPC communicationVia Docker
FROM node:20-alpine
RUN npm install -g textmerchant-mcp
CMD ["npx", "textmerchant-mcp@latest"]docker run -it textmerchant-mcpVia Local Installation
- Clone the repo:
git clone https://github.com/HTTPayer/textmerchant-mcp.git
cd textmerchant-mcp- Install and build:
npm install
npm run build- Configure your MCP client to run:
# macOS/Linux
node /path/to/mcp/dist/index.js
# Windows
node C:\path\to\mcp\dist\index.jsStandard MCP Configuration Format
Most MCP clients support this standard format in their config files:
{
"mcpServers": {
"textmerchant": {
"command": "npx",
"args": ["-y", "textmerchant-mcp@latest"],
"env": {
"NODE_OPTIONS": "--loader ts-node/esm"
}
}
}
}How it works
User prompt ("summarize this text")
|
v
AI agent (Claude Code, Cursor, Windsurf...)
| picks the summarize MCP tool
v
@textmerchant/mcp (local MCP server via npx)
|
+-- HTTPayer mode --> POST api.httpayer.com/proxy
| HTTPayer pays x402 fee using credits
|
+-- x402 mode -----> @x402/fetch wraps native fetch
ExactEvmClient signs EIP-3009 payment on Base
Sends PAYMENT-SIGNATURE header to textmerchant.com
|
v
Text Merchant API (processes request, returns result)MCP tools reference
AI Processing Tools
| Tool | Endpoint | Cost | Description |
| ------------ | ---------------------- | ----- | ------------------------------------------------------------------------- |
| summarize | POST /api/summarize | $0.03 | Summarize text (bullet/paragraph/concise, key-points/executive/technical) |
| sentiment | POST /api/sentiment | $0.02 | Sentiment analysis with confidence scores |
| entities | POST /api/entities | $0.02 | Named entity extraction (PERSON, ORG, GPE, PRODUCT, EVENT, DATE) |
| keywords | POST /api/keywords | $0.02 | Keyword and key phrase extraction |
| classify | POST /api/classify | $0.02 | Text classification (custom categories supported) |
| qa | POST /api/qa | $0.10 | Question answering from context (up to 50K chars) |
| topics | POST /api/topics | $0.02 | Topic and theme discovery |
| generate | POST /api/generate | $0.05 | Text generation with temperature/format/system prompt |
| paraphrase | POST /api/paraphrase | $0.03 | Rewrite text in 9 styles |
| intent | POST /api/intent | $0.02 | Intent detection (15 defaults + custom) |
Utility Tools (free)
| Tool | Endpoint | Description |
| ------------------ | --------------------------------- | -------------------------------- |
| health | GET /healthz | Service health check |
| supported_chains | GET /api/payment/supported | Supported chains and tokens |
| get_schema | GET /api/{endpoint}/docs/schema | Schema and examples per endpoint |
HTTPayer-only Tools
| Tool | Description |
| ------------- | ----------------------------- |
| get_balance | Check HTTPayer credit balance |
MCP capabilities
Tools
13 tools total (10 AI + 3 utility), plus get_balance in HTTPayer mode.
Prompts
| Name | Description |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| textmerchant-context | Injects Text Merchant context into the agent. Compatible clients load this automatically. |
Resources
| URI | Description |
| -------------------------- | ------------------------------------------------ |
| textmerchant://skill.md | Full setup guide, endpoints, and workflow |
| textmerchant://endpoints | Structured JSON list of all endpoints with costs |
Payment modes
HTTPayer (recommended)
Pay via credits through the HTTPayer proxy. No wallet or blockchain interaction needed.
- 1 credit = 0.001 USDC
- 3% proxy fee per request
- Top up at app.httpayer.com
x402 Direct
Pay on-chain using the official @x402/fetch SDK + @x402/evm.
- Requires EVM wallet with USDC
- Base Mainnet (chain ID 8453) or SKALE Base Chain (chain ID 1187947933)
- Uses EIP-3009 TransferWithAuthorization (gasless USDC transfers)
Chain & token support
| Chain | Chain ID | Tokens | | ---------------- | ---------- | -------------------------------------- | | Base Mainnet | 8453 | USDC (6 decimals) | | SKALE Base Chain | 1187947933 | USDC, USDT, WETH (6 dec), WBTC (8 dec) |
Configuration
Config stored at: ~/.textmerchant/mcp-config.json
{
"mode": "httpayer",
"httpayerApiKey": "sk-live-..."
}or
{
"mode": "x402",
"evmPrivateKey": "0x...",
"network": "eip155:8453"
}To update: npx textmerchant-mcp setup --update-key
Error handling
All MCP tool errors return isError: true — the server stays alive and the agent gets a readable message.
| Situation | Message |
| ------------ | -------------------------------------------------------------------------- |
| No config | "No Text Merchant configuration found. Run: npx textmerchant-mcp setup" |
| API error | "Text Merchant {status}: {body}" |
| Unknown tool | "Unknown tool: {name}" |
Development
npm install
npm run build
node dist/index.js # starts MCP server
node dist/index.js setup # runs CLI setupLicense
Apache-2.0
