@writerslogic/ai-agents-mcp
OfficialProvides an arXiv-to-production code and hyperparameter compiler agent that converts arXiv research papers into production-ready code and hyperparameter configurations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@writerslogic/ai-agents-mcp
An MCP server that exposes the WritersLogic x402 agent hub as tools. Each hub agent becomes one tool. Calls are priced in USDC and paid over x402 on Base, with no gas needed from the buyer.
The server is a thin client: it fetches the hub catalog, registers a tool per agent, forwards calls over HTTPS, and signs a payment authorization when the hub asks for one and your spending cap allows it.
Install
Requires Node.js 20 or later. No global install is needed; MCP clients run it with npx, which builds it from this repository on first run.
{
"mcpServers": {
"writerslogic-ai-agents": {
"command": "npx",
"args": ["-y", "github:writerslogic/ai-agents-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"MAX_USDC_PER_CALL": "1.00"
}
}
}
}Put that block in your client's MCP configuration:
Client | Config file |
Claude Desktop |
|
Cursor |
|
Windsurf |
|
Cline |
|
Claude Code |
|
Omit AGENT_PRIVATE_KEY to browse and to see prices: paid tools then return the payment instructions instead of paying.
Related MCP server: MCP-Pay
Configuration
Variable | Default | Purpose |
| unset | Private key of the wallet that pays. Needs USDC on Base, no ETH. Use a dedicated low-balance wallet. |
|
| Per-call spending cap. A call whose price is above it is refused before anything is signed. |
| unset | Sent as |
|
| Hub URL. Must be |
|
| Timeout for tool calls (1000 to 600000). The catalog fetch uses at most 15 s. |
Tools
Tools are discovered from the hub catalog (GET /api/v1/catalog) when the server starts and refreshed on tools/list after ten minutes, so the live list is authoritative. Tool names are the agent id with every character outside A-Za-z0-9_ replaced by _. Each tool takes the agent's own input schema. Agents at the time of writing:
Tool | Price (USDC) | Description |
| 2.00 | Abandoned Compound & Uncommercialized Trial Miner |
| 0.75 | ADA / WCAG Lawsuit Shield & DOM Auto-Patcher |
| 1.00 | arXiv-to-Production Code & Hyperparameter Compiler |
| 0.25 | On-Chain Bytecode & Unverified Token Trap Detector |
| 2.50 | E-Commerce Chargeback Representment Builder |
| 0.50 | Prediction-Market Clarification Impact Pricer |
| 1.50 | SaaS Pricing & Competitor Battlecard Spy |
| 1.00 | Smart Contract Auditor |
| 1.00 | Dark Pattern Contract & Subscription Exit Lawyer |
| 5.00 | DeFi Cover Claim Adjudicator |
| 0.50 | PR / Dependency Breaking-Change & Exploit Gatekeeper |
| 0.50 | UMA Dispute EV Desk |
| 1.50 | Cross-Lingual Dark Science Arbitrage Scout |
| 0.50 | Autonomous Lead Enrichment |
| 0.10 | Prediction Market Analyzer |
| 3.00 | Medical Bill Upcoding & Overcharge Slasher |
| 2.00 | Grant Milestone Verifier with Signed Release Attestation |
| 2.00 | Patent Design-Around & Freedom-to-Operate Architect |
| 2.50 | Global Prior-Art Patent Invalidator |
| 0.75 | Scientific Consensus & Replication Failure Auditor |
| 0.75 | Cross-Platform Arbitrage & Resolution Rules Lawyer |
| 0.40 | Self-Healing Scraper & DOM-to-JSON Compiler |
| 1.50 | Global Customs & Tariff Engineering Optimizer |
| 0.25 | Vault Exit Lawyer |
Also always available, and free:
Tool | Description |
| POSTs to |
A paid result is the hub's JSON response, returned unchanged as text content.
How payment works
The tool POSTs your arguments to the agent endpoint.
If the hub answers
402, it sends a base64PAYMENT-REQUIREDheader (x402 v2) listing anexactscheme requirement: networkeip155:8453, USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, an atomicamount(6 decimals),payTo, and the token's EIP-712 name and version.If
AGENT_PRIVATE_KEYis set andamountis at mostMAX_USDC_PER_CALL, the client signs an EIP-3009TransferWithAuthorization(EIP-712, USDC domain on chain 8453) for exactly that amount topayTo, valid for the requirement's timeout, with a random nonce.It retries the same request once with the base64
PAYMENT-SIGNATUREheader. The hub's facilitator submits the transfer and pays the gas.The result is returned. If the retry is not accepted, the error is returned and nothing further is sent.
If no key is configured, or the price is over the cap, the tool returns an error that states the price, network, asset and payTo, and no signature is produced.
Provenance
Paid results carry a _provenance record next to data. Pass the whole {data, _provenance} object to verify_provenance to check it against the hub. The request body is forwarded as given.
Security
The key stays local.
AGENT_PRIVATE_KEYis read once from the environment, used only to sign typed data, and never logged or sent anywhere. Authorizations are signatures; the client never broadcasts a transaction.The cap is per call, not per session. An agent that calls tools in a loop can spend
MAX_USDC_PER_CALLeach time. Fund the wallet with only what you are willing to lose, and lower the cap to the most expensive tool you actually want to allow.Only USDC on Base is signed for. Challenges naming another network, asset, or transfer method are refused, so a malicious or compromised hub cannot ask for a different token. Base Sepolia (
eip155:84532) USDC is also accepted for testing.Catalog entries are untrusted. Endpoints must resolve to the hub's own origin, ids and prices are validated, and redirects are never followed, so credentials and signatures are not sent to other hosts.
Bounds. Requests are limited to 1 MiB, responses to 2 MiB, and every request has a timeout.
Stdout is the MCP stream. Logs go to stderr only; they include the paying address and each payment amount, never the key.
Anyone who holds a signed authorization before it expires could submit it, up to the signed amount and to
payToonly.
Development
npm install
npm run build
npm testTests run against a local mock hub and verify the EIP-3009 signature by recovering the signer, the cap at limit-1, limit and limit+1, and an end-to-end stdio session against dist/index.js. No network access or funds are involved.
License
Apache-2.0. Copyright 2026 WritersLogic.
This server cannot be deployed
Maintenance
Related MCP Connectors
Paid MCP tools behind one endpoint. Agents pay per call in USDC on Base via x402.
Metered MCP tools: free discovery over MCP; per-call execution settled in USDC via x402 v2.
Pay-per-call MCP tools run by autonomous AI agents, each call paid with x402 in USDC.
Pay-per-call x402 MCP for AI agents: 35 tools, USDC on Base, from $0.001/call, no API keys.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables MCP clients to access all endpoints of an x402 gateway by paying real-time microtransactions (USDC on Base) per API call, with automatic tool discovery and spend guardrails.2352 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover and pay for MCP tools on a sub-cent, pay-per-call basis using x402 and Algorand USDC settlements.183 npmMIT
- AlicenseNot gradedqualityCmaintenanceExposes a live catalogue of specialist tools as MCP endpoints and returns x402 payment challenges for each call, letting agents pay per use in USDC from their own wallet without subscriptions or API keys.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to sell MCP tools and Hermes capabilities behind an x402 v2 / USDC payment gate, and to buy other agents' capabilities through a wallet tool. Sellers quote a price, verify the exact transfer and nonce, then execute, while buyers get recipient allowlists, per-call limits, and a persistent cumulative budget.1MIT