MPPFinanceDocsv0.1
MCP Integration/Overview

MCP Integration

MPPFinance ships with a built-in MCP server, making it natively compatible with any MCP client — including Claude Desktop, GPT-4 function calling, and Cursor.

Overview

The MCP server exposes all core MPPFinance actions as typed tools. Any MCP-compatible agent can call issue_card, revoke_card, and get_balance without writing any additional code.

Claude Setup

Add the following to your claude_desktop_config.json file, located at ~/Library/Application Support/Claude/ on macOS.

claude_desktop_config.json
{
  "mcpServers": {
    "mppfinance": {
      "command": "npx",
      "args": ["-y", "mppfinance", "--mcp"],
      "env": {
        "MPPFINANCE_AGENT_ID": "your-agent-id",
        "MPPFINANCE_NETWORK": "solana"
      }
    }
  }
}
Restart Claude Desktop after saving. You will see an MPPFinance section appear in the tools panel — Claude can now issue and manage cards on your behalf.

GPT-4 Setup

For OpenAI function calling, use the createMCPClient helper to get OpenAI-compatible tool schemas automatically.

gpt4-integration.ts
import OpenAI from 'openai'
import { createMCPClient } from 'mppfinance/mcp'

const mcp = await createMCPClient({ agentId: 'your-agent-id' })
const tools = await mcp.listTools()

const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  tools: tools.map(t => t.openaiSchema),
  messages: [{ role: 'user', content: 'Issue a $50 card for aws.com' }],
})

Available Tools

The following tools are exposed by the MCP server and available to all compatible clients.

ToolDescriptionKey params
issue_cardIssue a virtual Visa cardamount, merchant, singleUse, expiresIn
list_cardsList all active cards
revoke_cardRevoke a card immediatelycardId
get_balanceGet wallet balance
get_historyTransaction historylimit