AgentPMT - The Agentic Economy
Documentation

MCP (Model Context Protocol)

Link your AI agent to AgentPMT tools using our universal MCP server. Automatically connects to most major systems including Claude, Codex, Gemini, Cursor, VS Code, Windsurf, Zed, and more. Any agent with MCP tool calling abilities or the ability to make API calls can be manually connected.

Created: 11/24/2025
Updated: 12/3/2025

Overview

The AgentPMT MCP Router is a universal MCP server that enables your AI agents to connect to the real world, including sending and receiving payments and accessing our ecosystem of pay per call services. Install once with npm, configure automatically with our wizard, and start using powerful AI tools instantly.


________________________________________________________________________


Prefer To Watch The Tutorial?


________________________________________________________________________


Auto Installer

The auto installer sets up the config files for these platforms

✅ Claude Desktop — Anthropic's desktop app

✅ Claude Code CLI — Anthropic's CLI tool

✅ Cursor — AI-first code editor

✅ VS Code — With GitHub Copilot

✅ Windsurf — Codeium's AI editor

✅ Zed — High-performance code editor

✅ OpenAI Codex CLI — OpenAI's CLI tool

✅ Google Gemini CLI — Google's CLI tool



For any other MCP compatible agent system, you will need to edit the config file directly. Some examples are shown below.



Prerequisites

Before installing the MCP server, you need:


1. Node.js and npm

The MCP router is distributed as an npm package, so you need Node.js installed.


Check if you already have it:

Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run:

npm --version


If you see a version number (like 10.2.3), you're ready to go!


If not installed:

Download from https://nodejs.org (choose the LTS version)

Install it following the installer instructions

Works on Windows, macOS, and Linux

After installation, restart your terminal and verify with npm --version


2. AgentPMT Account Credentials

You'll need two keys from your AgentPMT dashboard:


API Key:

Dashboard → Account Details → API Key → Generate API Key

(Your wallet must be activated for this to work)


Budget Key:

Dashboard → AI Budgets → Select budget → Generate AI Key


3. Supported AI Tool Installed

At least one of: Claude Desktop, Claude Code CLI, Cursor, VS Code, Windsurf, Zed, OpenAI Codex CLI, or Google Gemini CLI


Quick Installation (3 Steps)


Step 1: Install the MCP Router

Open your terminal and run:

npm install -g @agentpmt/mcp-router


What this does:

Downloads the universal MCP server package

Automatically detects your operating system (Windows/macOS/Linux)

Downloads the appropriate router binary from GitHub

Makes the agentpmt-install command available system-wide


Step 2: Run the Setup Wizard

After installation completes, run the configuration wizard:

agentpmt-install


The wizard will:

1. Automatically detect all installed AI tools on your system

2. Prompt for Server Name (default: "agentpmt")

3. Ask for your API Key (from AgentPMT dashboard)

4. Ask for your Budget Key (from AgentPMT dashboard)

5. Automatically configure ALL detected platforms


Step 3: Restart Your AI Tools

After configuration completes:

Close and restart your AI tool(s)

The AgentPMT tools will appear in your tool list

Note: Some platforms (like Claude Desktop) may require 2-3 restarts to load MCP servers


Verify Installation

Open your AI tool and check if AgentPMT tools appear in the available tools list. If tools don't appear, see the Troubleshooting section below.



Manual Configuration


When to Configure Manually

Use manual configuration if:

The automatic wizard didn't detect your AI tool

You want to use different keys for different tools

You need custom configuration settings

You're using a platform not supported by the wizard yet


How Manual Configuration Works

Each AI platform stores its MCP configuration in a JSON or TOML file. You'll need to:

1. Find the configuration file for your platform (see locations below)

2. Open it in a text editor

3. Add the AgentPMT configuration

4. Save the file

5. Restart your AI tool




Configuration Examples by Platform -


Claude Desktop

Config file location:

Windows: %APPDATA%\Claude\claude_desktop_config.json

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json


Add this configuration:

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"claude_desktop\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


Claude Code CLI

Config file: ~/.claude.json (all platforms)

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"claude_code\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


Cursor

Config file: ~/.cursor/mcp.json (all platforms)

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"cursor\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


After adding: Open Cursor Settings → Features → MCP and click Refresh


VS Code

Config file location:

Windows: %APPDATA%\Code\User\mcp.json

macOS: ~/Library/Application Support/Code/User/mcp.json

Linux: ~/.config/Code/User/mcp.json

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"vscode\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


Windsurf

Config file: ~/.codeium/windsurf/mcp_config.json (all platforms)

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"windsurf\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


Zed

Config file location:

Windows: %APPDATA%\Zed\settings.json

macOS/Linux: ~/.config/zed/settings.json

{
"context_servers": {
"agentpmt": {
"settings": {},
"command": {
"path": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"zed\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}
}


After adding: Check Agent Panel → Server Extensions for a green indicator


OpenAI Codex CLI

Config file: ~/.codex/config.toml (all platforms)

[mcp_servers.agentpmt]
command = "npx"
args = ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"]
description = "298+ AI-powered tools from AgentPMT"

[mcp_servers.agentpmt.env]
X_API_KEY = "YOUR_API_KEY"
X_BUDGET_KEY = "YOUR_BUDGET_KEY"
X_INSTANCE_METADATA = "{\"client\":\"codex\",\"platform\":\"YOUR_PLATFORM\"}"


Google Gemini CLI

Config file: ~/.gemini/settings.json (all platforms)

{
"mcpServers": {
"agentpmt": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "YOUR_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"gemini\",\"platform\":\"YOUR_PLATFORM\"}"
}
}
}
}


Important Configuration Notes

Replace placeholders:

YOUR_API_KEY - Your actual API key from AgentPMT dashboard

YOUR_BUDGET_KEY - Your actual Budget key from AgentPMT dashboard

YOUR_PLATFORM - Replace with: windows, darwin (macOS), or linux


Understanding file paths:

On macOS/Linux: ~ means your home directory (e.g., /Users/yourname)

On Windows: %APPDATA% is typically C:\Users\YourUsername\AppData\Roaming



Auto-Updates

The MCP router automatically updates to the latest version on every startup using the @latest tag. This ensures you always have access to the newest features and bug fixes.


Startup behavior:

First run: Downloads and caches latest version (~2-3 seconds)

Subsequent runs: Checks for updates and downloads if available (~1-3 seconds)


To disable auto-updates:

Modify your config to use a specific version instead of @latest:

"args": ["--package=@agentpmt/mcp-router@1.2.3", "agentpmt-router"]


Troubleshooting


Installation Issues


"npm: command not found" or "npm is not recognized"

You need to install Node.js first: https://nodejs.org

After installing, restart your terminal/command prompt

Verify with: npm --version


Permission denied / EACCES errors (macOS/Linux)

Try: sudo npm install -g @agentpmt/mcp-router

Or configure npm to install globally without sudo: npm permissions guide


Windows Defender / SmartScreen warnings

This is normal for new applications

Click "More info" then "Run anyway" to proceed


Tools Not Appearing in Your AI Platform


First steps to try:

  1. Restart your AI tool completely (close and reopen the application)
  2. Some tools (especially Claude Desktop) need 2-3 complete restarts
  3. Verify your API Key and Budget Key are correct (no extra spaces)
  4. Check that your Budget Key is active (not paused) in your dashboard
  5. Confirm you've added tools to your budget


Check the logs:

Claude Desktop logs:

Windows: %APPDATA%\Claude\logs\mcp.log

macOS: ~/Library/Application Support/Claude/logs/mcp.log

Linux: ~/.config/Claude/logs/mcp.log


Look for errors mentioning "agentpmt" to diagnose the issue


Authorization / Permission Errors


401 or 403 errors

Double-check both your API Key and Budget Key

Copy keys directly from dashboard (avoid typing manually)

Ensure your Budget Key is not paused

Verify your budget has tools approved

Confirm your wallet is activated and funded


Purchase / Spending Issues


Tool calls fail with "insufficient funds"

Check wallet balance in your dashboard

Verify your budget limit hasn't been exceeded

For paid tools, confirm they're approved on your budget

Try adding funds or increasing your budget limit


Platform-Specific Issues


Cursor: "MCP server failed to start"

Open Cursor Settings → Features → MCP

Click "Refresh" to reload servers

Check that ~/.cursor/mcp.json has correct JSON format

Verify no trailing commas in the JSON


Zed: Green indicator doesn't appear

Check Agent Panel → Server Extensions

Verify ~/.config/zed/settings.json format is correct

Restart Zed completely


VS Code: GitHub Copilot doesn't see tools

Ensure GitHub Copilot extension is installed and active

Check that MCP configuration is in correct location for your OS

Restart VS Code after config changes


Claude Desktop: Still not loading after restarts

Try 2-3 complete restarts (fully quit and reopen)

Check the mcp.log file for specific errors

Verify the config file location is correct for your OS

Make sure the config file has valid JSON format


Still Having Issues?

Check the MCP logs for specific error messages

Visit our documentation: https://agentpmt.com/docs

Send us a message on Discord: Tech Support



Advanced Topics


Multiple Budgets

You can create separate configurations for different budgets or use cases:

  1. Add multiple entries with different names (e.g., "agentpmt-research", "agentpmt-production")
  2. Use different Budget Keys for each
  3. Each will show as a separate server in your AI tool


Example:

{
"mcpServers": {
"agentpmt-research": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "RESEARCH_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"claude_desktop\",\"platform\":\"darwin\"}"
}
},
"agentpmt-production": {
"command": "npx",
"args": ["--package=@agentpmt/mcp-router@latest", "agentpmt-router"],
"env": {
"X_API_KEY": "YOUR_API_KEY",
"X_BUDGET_KEY": "PRODUCTION_BUDGET_KEY",
"X_INSTANCE_METADATA": "{\"client\":\"claude_desktop\",\"platform\":\"darwin\"}"
}
}
}
}


Uninstalling

To remove the MCP router:

npm uninstall -g @agentpmt/mcp-router


Then manually remove the "agentpmt" entry from your AI tool's configuration file.


Support Resources

📖 Documentation: https://agentpmt.com/docs

🐛 Issues: https://github.com/Apoth3osis-ai/agent-payment-mcp/issues

🌐 Website: https://agentpmt.com

📦 npm Package: https://www.npmjs.com/package/@agentpmt/mcp-router