This page covers concepts and client integrations for
@xentfi/mcp-sdk. For the tool-by-tool argument/return reference, see Tools Reference in the Agent tab.Overview
@xentfi/mcp-sdk is XentFi’s official Model Context Protocol (MCP) server — it exposes an agent’s XentFi wallet, spend policy, and payments as 15 tools any MCP-compatible client can call directly, with no custom integration code.
🔑 One credential
Your agent’s Agent API Key authenticates every tool call — no separate OAuth flow to build.
🛡️ Server-side guardrails
Every payment is checked against the agent’s XentFi Policy (limits, allowlists, allowed hours) before it executes — enforced by the API, not the client.
🔌 Two transports
xentfi-mcp (stdio) for local desktop clients, xentfi-mcp-http (Streamable HTTP) for remote and multi-tenant deployments.🧩 Programmatic SDK
Import
createXentfiMcpServer() or the raw XentfiClient to embed XentFi tools in your own MCP server or agent framework./v1/agent-self/* routes documented in API Reference — the SDK doesn’t add new backend behavior, it exposes that surface with agent-friendly names, descriptions, and error messages.
Client integrations
Pick your client below. Every one ultimately needs the same two pieces of information: commandnpx, args ["-y", "@xentfi/mcp-sdk"], and env XENTFI_AGENT_API_KEY.
Claude Desktop & Claude Code
Claude Desktop & Claude Code
Claude Desktop — edit (Settings → Developer → Edit Config, or directly):Fully quit and reopen the app, open a new chat, and confirm Set
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
xentfi appears with 15 tools.Claude Code:XENTFI_AGENT_API_KEY in the shell Claude Code runs in, or in the generated config’s env block. Verify with claude mcp list.Global install alternative: npm install -g @xentfi/mcp-sdk, then use "command": "xentfi-mcp" instead of npx.Troubleshooting: no server showing → check Settings → Developer → Open Logs Folder for [xentfi-mcp] lines or a Missing XENTFI_AGENT_API_KEY error. Tool errors about a missing key → the env block isn’t inside the xentfi entry.Cursor
Cursor
Edit Check Cursor Settings → MCP for a green/active
~/.cursor/mcp.json (global) or .cursor/mcp.json in your repo root (project-only, useful for per-project Agent API keys):xentfi entry. Cursor spawns one subprocess per config entry and keeps it running for the session — restart only needed after editing mcp.json.For a key that can read but never move funds unattended, restrict the Policy attached to that agent’s Agent API Key rather than relying on client-side restrictions — xentfi_create_payment is still callable by any client holding a valid key.VS Code
VS Code
Create Using
.vscode/mcp.json:inputs means VS Code prompts for the key once and stores it securely instead of writing it to a file you might commit.Command Palette → MCP: List Servers to confirm xentfi is running, then use Copilot Chat’s Agent mode. Debug with MCP: Show Server Output.ChatGPT (custom connector)
ChatGPT (custom connector)
ChatGPT speaks MCP over remote Streamable HTTP, not stdio — deploy
xentfi-mcp-http first (see Remote HTTP Deployment below), then:- Configure a custom
Authorization: Bearer sk_agent_xxxheader in ChatGPT’s connector setup. - Settings → Connectors → Advanced settings → Add custom connector: Name
XentFi, MCP Server URLhttps://your-deployment/mcp, auth via the custom headers above. - Enable the connector via the ”+“/tools menu in a chat.
xentfi_create_payment calls are surfaced for confirmation before finalizing.ElizaOS
ElizaOS
ElizaOS reaches MCP servers through the community MCP plugin (Since ElizaOS agents often act with minimal human review, set tight
@elizaos/plugin-mcp or equivalent):perTransactionLimitUsd/dailyLimitUsd and an allowedRecipients allowlist on the attached Policy, make sure your action logic sets confirm: true deliberately rather than reflexively, and call xentfi_get_policy in planning before large payments.CrewAI
CrewAI
CrewAI (Python) consumes MCP servers via For a two-step audit trail, split into a planner agent (decides what to pay, no payment tools) and an executor agent (only has
crewai-tools’ MCPServerAdapter:xentfi_create_payment, calls it with confirm: true only after your own validation passes).Newer crewai-tools versions also support connecting MCPServerAdapter to a remote server over SSE/Streamable HTTP — point it at a shared xentfi-mcp-http deployment with an Authorization: Bearer <agent-api-key> header.Codex CLI & OpenAI Agents SDK
Codex CLI & OpenAI Agents SDK
Codex CLI — OpenAI Agents SDK (Python):Both SDKs cache the tool list at connect time — restart/reconnect after rotating the Agent API Key. Combine the Agents SDK’s tool-use approval hooks with
~/.codex/config.toml:confirm: true for a human-in-the-loop checkpoint on top of server-side Policy enforcement.Any other MCP client
Any other MCP client
All any stdio-based client needs: command
npx, args ["-y", "@xentfi/mcp-sdk"], env XENTFI_AGENT_API_KEY.To test without any client at all, use the MCP Inspector:Remote HTTP deployment
Usexentfi-mcp-http instead of the stdio server when you need a hosted, network-reachable MCP endpoint — for ChatGPT connectors, a shared team deployment, or any client that only supports remote servers.
It runs stateless: every request builds a fresh MCP server + client pair bound to that request’s own credentials, then tears it down. One process safely serves many agents/organizations at once, with no session state to scale.
Put this behind a TLS-terminating reverse proxy — ChatGPT requires HTTPS. Fly.io, Render, and Railway all provision HTTPS automatically.
Programmatic embedding
Related
Tools Reference
Every
xentfi_* tool, arguments, and return shape.Quickstart
Get credentials and make your first call.
x402 guide
The other way an agent can transact — pay per call.

