MCP server
P402
Multi-provider AI router with x402 micropayment settlement on Base L2. 1% flat fee.
Runs locallyStatus and history
- Pricing
- Open source
- Runs
- Locally
- Version
- 1.0.0
- Listing updated
- 5 days ago
About P402
P402 is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add p402 --env P402_API_KEY='<P402_API_KEY>' -- npx -y @p402/mcp-serverAdd to claude_desktop_config.json
{
"mcpServers": {
"p402": {
"command": "npx",
"args": [
"-y",
"@p402/mcp-server"
],
"env": {
"P402_API_KEY": "<P402_API_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"p402": {
"command": "npx",
"args": [
"-y",
"@p402/mcp-server"
],
"env": {
"P402_API_KEY": "<P402_API_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"p402": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@p402/mcp-server"
],
"env": {
"P402_API_KEY": "<P402_API_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"p402": {
"command": "npx",
"args": [
"-y",
"@p402/mcp-server"
],
"env": {
"P402_API_KEY": "<P402_API_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"p402": {
"command": "npx",
"args": [
"-y",
"@p402/mcp-server"
],
"env": {
"P402_API_KEY": "<P402_API_KEY>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
P402_API_KEYYour P402 API key. Get one at https://p402.io/dashboard/settingsRequiredP402_ROUTER_URLP402 router base URL override. Defaults to https://p402.io
Pricing
Open source
P402 FAQ
Is P402 free?
Yes. P402 is open source, so you can use and self-host it for free.
How do I add P402 to Claude Code?
Run this command in your terminal: claude mcp add p402 --env P402_API_KEY='<P402_API_KEY>' -- npx -y @p402/mcp-server
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.