MCP Server Integration
Connect AI assistants to X402-enabled APIs using the Agnic MCP server
π MCP Server Integration
A hosted MCP server that gives AI assistants (Claude, n8n, etc.) the power to automatically discover and access X402-enabled APIs using your Agnic Wallet.
MCP Server Address
https://mcp.agnic.ai/sseUse this URL when connecting to the Agnic MCP server from any MCP client.
What is This MCP Server?
The Agnic MCP server is a hosted remote service that connects your AI tools to the X402 protocol. Think of it as a bridge between your AI assistant and X402-enabled APIs.
X402 is a new HTTP status code (like 404 for "Not Found") that means "Payment Required". When an API responds with 402, our MCP server automatically:
- Detects the authorization requirement and price
- Signs the authorization using your Agnic Wallet
- Retries the request with the authorization proof
- Returns the API response to your AI
No installation needed. No blockchain knowledge required. Just add the server URL and your API key.
How to Connect (3 Steps)
Step 1: Create Your Wallet & Get API Key
Sign up at app.agnic.ai, add USDC to your wallet, then generate an API token from your dashboard.
Your API token will look like:
agnic_tok_sk_live_abc123...Step 2: Add MCP Server to Your AI Client
In your MCP client (n8n, Claude Desktop, etc.), add the Agnic MCP server with these details:
| Setting | Value |
|---|---|
| Server URL | https://mcp.agnic.ai/sse |
| Server Type | HTTP/SSE |
| Authentication | Bearer <your-api-token> |
Step 3: Start Using AI Tools
Your AI can now access X402 APIs automatically. The MCP server handles all transactions in the background!
Available MCP Tools
Your AI assistant gets access to these powerful tools when connected to our MCP server:
π make_x402_request
Automatically fetch data from any X402-enabled API. If authorization is required, handles it seamlessly.
Parameters: url, method, headers, body
π° check_balance
Check your Agnic Wallet balance across different networks (Base, Solana).
Parameters: network (optional)
π get_transaction_history
View complete transaction history with timestamps, amounts, and transaction hashes for full transparency.
Parameters: limit, startDate, network
π discover_apis
Browse and search through available X402-enabled APIs. Check pricing, categories, and popularity.
Parameters: category, search, maxPrice, sort
πΈ fund_wallet
Get instructions on how to fund your Agnic Wallet with USDC.
Parameters: network (optional)
π§ check_agent_email
Check your agent's email inbox. Returns recent inbound and outbound messages.
Parameters: limit (optional, default: 20), offset (optional)
βοΈ send_agent_email
Send an email from your agent's address (agent-{id}@agent.agnic.ai).
Parameters: to (required), subject (required), body (required)
π¬ reply_agent_email
Reply to a message in your agent's inbox. Maintains email threading.
Parameters: messageId (required), body (required)
πͺͺ get_agent_card
Fetch an A2A-compatible Agent Card for any Agnic-registered agent. No authentication required.
Parameters: agentId (required)
Works with Any X402 API - These tools work with any API that supports the X402 protocol. Your AI can access weather data, market data, premium datasets, and moreβall with automatic authorization.
Example: Connecting in n8n
In your n8n workflow, add an MCP Client node:
// 1. Add MCP Client node configuration
{
"serverType": "HTTP/SSE",
"serverUrl": "https://mcp.agnic.ai/sse",
"authHeader": "Authorization: Bearer agnic_tok_sk_live_..."
}
// 2. Use the make_x402_request tool
{
"tool": "make_x402_request",
"parameters": {
"url": "https://api.example.com/data",
"method": "POST",
"body": {
"prompt": "Generate a summary"
}
}
}
// The MCP server handles authorization automatically!That's it! Your n8n workflow can now access X402 APIs. The MCP server handles authorization automatically.
Claude Desktop Configuration
Add Agnic to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"agnicpay": {
"url": "https://mcp.agnic.ai/sse",
"transport": "sse",
"headers": {
"Authorization": "Bearer agnic_tok_sk_live_..."
}
}
}
}Perfect For
| Use Case | Description |
|---|---|
| π€ AI Agent Developers | Building autonomous agents that need to access APIs without human intervention |
| π n8n Workflow Creators | Creating automation workflows that consume multiple X402 APIs for data enrichment |
| πΌ Business Analysts | Using Claude or other AI assistants to gather data from premium sources automatically |
| π Data Scientists | Accessing paid datasets through AI without manual API key management |
Security Best Practices
- Use dedicated tokens - Create a token specifically for MCP use
- Set spending limits - Configure daily/monthly limits on your token
- Monitor usage - Check your transaction history regularly
- Rotate tokens - Periodically rotate your MCP token