npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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.


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

| 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@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)

  1. Open ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add to mcpServers:
{
  "mcpServers": {
    "textmerchant": {
      "command": "npx",
      "args": ["-y", "textmerchant-mcp@latest"]
    }
  }
}
  1. Save and restart Claude Desktop

Claude Desktop (Windows)

  1. Open %APPDATA%\Claude\claude_desktop_config.json
  2. Add the same JSON snippet above
  3. 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

  1. Open .cursor/mcp.json in your project root (or create it)
  2. Add:
{
  "mcpServers": {
    "textmerchant": {
      "command": "npx",
      "args": ["-y", "textmerchant-mcp@latest"]
    }
  }
}
  1. Restart Cursor

Or globally in user settings:

  • macOS: ~/Library/Application Support/Cursor/mcp.json
  • Windows: %APPDATA%\Cursor\mcp.json

OpenCode

  1. Create or edit ~/.config/opencode/config.json
  2. Add:
{
  "mcp": {
    "textmerchant": {
      "type": "local",
      "command": ["npx", "-y", "textmerchant-mcp@latest"],
      "enabled": true
    }
  }
}
  1. Restart OpenCode

Or project-level in opencode.json:

{
  "mcp": {
    "textmerchant": {
      "type": "local",
      "command": ["npx", "-y", "textmerchant-mcp@latest"],
      "enabled": true
    }
  }
}

Windsurf

  1. Open .windsurf/mcp.json in your project root
  2. Add:
{
  "mcpServers": {
    "textmerchant": {
      "command": "npx",
      "args": ["-y", "textmerchant-mcp@latest"]
    }
  }
}
  1. Restart Windsurf

Cline

  1. Open .cline/mcp_settings.json
  2. Add:
{
  "mcpServers": {
    "textmerchant": {
      "command": "npx",
      "args": ["-y", "textmerchant-mcp@latest"]
    }
  }
}
  1. Restart Cline

Zed

  1. Open your Zed config: ~/.config/zed/settings.json (macOS/Linux) or %APPDATA%\Zed\settings.json (Windows)
  2. Add:
{
  "context_servers": {
    "textmerchant": {
      "command": {
        "path": "npx",
        "args": ["-y", "textmerchant-mcp@latest"]
      }
    }
  }
}
  1. 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

  1. Clone the repo:
git clone https://github.com/HTTPayer/textmerchant-mcp.git
cd textmerchant-mcp
  1. Install and build:
npm install
npm run build
  1. 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

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

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 setup

License

Apache-2.0