Integrations

MCP server

Five tools for any MCP host. The policy and the key stay with the server; the model can only narrow limits.

Local (stdio)

{ "mcpServers": { "tollex": { "command": "tollex", "args": ["mcp"], "env": { "TOLLEX_URL": "https://<service>", "TOLLEX_POLICY_FILE": "/path/policy.json", "TOLLEX_WALLET_KEY_FILE": "/path/payer.key" } } } }

Hosted (Streamable HTTP)

An operator can host the server with a bearer token and an origin allow list. Clients connect to its URL with Authorization: Bearer. Requests without the token are refused.

Tools

ToolSpendsWhat it does
tollex_resolveneverThe capability Tollex would buy, its route and maximum price, and a reason code for each rejected candidate
tollex_dowithin policyBuys and runs it; returns the result, the charge, the operation id and the signed receipt
tollex_operationneverExecution, settlement and reconciliation state of a purchase
tollex_verify_receiptneverSignature and binding checks for a receipt
tollex_discoverneverCategories, indicative prices and the limits that apply

Each tool declares read-only or destructive hints and an output schema; results arrive as structured content. Output from third-party capabilities is marked untrusted. Unset optional arguments may be sent as null.

LangChain, CrewAI and ElizaOS

These frameworks connect through their own MCP clients; no Tollex-specific package is needed.

// LangChain.js
const tollex = new MCPAdapter({ servers: { tollex: { transport: "http", url: TOLLEX_MCP_URL, headers: { authorization: `Bearer ${TOKEN}` } } } });
const tools = await tollex.listTools();
# CrewAI
server = {"url": TOLLEX_MCP_URL, "transport": "streamable-http", "headers": {"Authorization": f"Bearer {TOKEN}"}}
with MCPServerAdapter(server) as tools:
    agent = Agent(role="analyst", goal="...", backstory="...", tools=tools)
{ "plugins": ["@elizaos/plugin-mcp"], "settings": { "mcp": { "servers": { "tollex": { "type": "streamable-http", "url": "<TOLLEX_MCP_URL>", "headers": { "Authorization": "Bearer <token>" } } } } } }

All three are tested against a Tollex service with real payments. ElizaOS: @elizaos/plugin-mcp 1.7.1 works with the current stable core.