🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

textmerchant-mcp

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textmerchant-mcp

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.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
2
Created
Source

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.

Quickstart

Paste this into any MCP-compatible agent (Claude Code, Cursor, Windsurf, OpenCode...):

Set up https://raw.githubusercontent.com/HTTPayer/textmerchant-mcp/main/SKILL.md

The 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 setup

Choose 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:

FlagDescription
--mode httpayer|x402Payment mode
--key sk-live-...HTTPayer API key (non-interactive)
--private-key 0x...EVM private key for x402 direct mode
--network eip155:8453CAIP-2 network (default: Base Mainnet)
--client <name>Target: claude-code, claude-desktop, cursor, windsurf, opencode, zed, cline, warp, codex
--scope user|projectClaude Code scope (default: user)
--yes / -ySkip all prompts
--update-keyReplace existing credentials

2. Add to your client:

Claude Code:

claude mcp add textmerchant --scope user -- npx -y textmerchant-mcp@latest

Claude 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@latest

Cursor

  • Open .cursor/mcp.json in 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.json in 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 communication

Via Docker

FROM node:20-alpine
RUN npm install -g textmerchant-mcp
CMD ["npx", "textmerchant-mcp@latest"]
docker run -it textmerchant-mcp

Via 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.js

Standard 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

ToolEndpointCostDescription
summarizePOST /api/summarize$0.03Summarize text (bullet/paragraph/concise, key-points/executive/technical)
sentimentPOST /api/sentiment$0.02Sentiment analysis with confidence scores
entitiesPOST /api/entities$0.02Named entity extraction (PERSON, ORG, GPE, PRODUCT, EVENT, DATE)
keywordsPOST /api/keywords$0.02Keyword and key phrase extraction
classifyPOST /api/classify$0.02Text classification (custom categories supported)
qaPOST /api/qa$0.10Question answering from context (up to 50K chars)
topicsPOST /api/topics$0.02Topic and theme discovery
generatePOST /api/generate$0.05Text generation with temperature/format/system prompt
paraphrasePOST /api/paraphrase$0.03Rewrite text in 9 styles
intentPOST /api/intent$0.02Intent detection (15 defaults + custom)

Utility Tools (free)

ToolEndpointDescription
healthGET /healthzService health check
supported_chainsGET /api/payment/supportedSupported chains and tokens
get_schemaGET /api/{endpoint}/docs/schemaSchema and examples per endpoint

HTTPayer-only Tools

ToolDescription
get_balanceCheck HTTPayer credit balance

MCP capabilities

Tools

13 tools total (10 AI + 3 utility), plus get_balance in HTTPayer mode.

Prompts

NameDescription
textmerchant-contextInjects Text Merchant context into the agent. Compatible clients load this automatically.

Resources

URIDescription
textmerchant://skill.mdFull setup guide, endpoints, and workflow
textmerchant://endpointsStructured JSON list of all endpoints with costs

Payment modes

Pay via credits through the HTTPayer proxy. No wallet or blockchain interaction needed.

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

ChainChain IDTokens
Base Mainnet8453USDC (6 decimals)
SKALE Base Chain1187947933USDC, 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.

SituationMessage
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 setup

License

Apache-2.0

Keywords

mcp

FAQs

Package last updated on 18 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts