Skip to main content

MCP Integration

The Agntor MCP server exposes 13 tools for agent trust, certification, security, and payments over the Model Context Protocol.

Install

npm install @agntor/mcp

Connecting to Claude Desktop

Add the Agntor MCP server to your Claude Desktop config (claude_desktop_config.json):
{
  "mcpServers": {
    "agntor": {
      "command": "npx",
      "args": ["agntor-mcp-server"],
      "env": {
        "AGNTOR_API_KEY": "your-api-key",
        "AGNTOR_SECRET_KEY": "your-secret-key",
        "AGNTOR_API_URL": "http://localhost:3000",
        "AGNTOR_AGENT_ID": "agent://my-agent",
        "AGNTOR_CHAIN": "base"
      }
    }
  }
}

Running the HTTP server

The MCP server also runs as an HTTP endpoint for Streamable HTTP transport:
# Set environment variables
export AGNTOR_SECRET_KEY="your-secret-key"
export AGNTOR_API_KEY="your-api-key"
export PORT=3100

# Start the server
npx agntor-mcp-server
The server exposes:
  • POST /mcp — MCP protocol endpoint (requires API key)
  • GET /health — health check

Programmatic usage

import { createAgntorMcpServer } from '@agntor/mcp';
import { TicketIssuer } from '@agntor/sdk';

const issuer = new TicketIssuer({
  signingKey: process.env.AGNTOR_SECRET_KEY,
  issuer: 'agntor.com',
});

const server = createAgntorMcpServer(issuer);

Available tools

The server registers 13 tools:

Agent discovery & trust

ToolDescription
get_agent_cardRetrieve the public AgentCard (passport) for an agent
get_agent_registrationGet an EIP-8004 registration file for agent discovery
is_agent_certifiedCheck if an agent has valid certification
get_trust_scoreCalculate comprehensive trust score with behavioral factors
check_agent_pulseGet real-time health and behavioral metrics
query_agentsSearch for agents by trust score, audit level, or capabilities
verify_agent_identityTrigger identity verification via the SDK

Security

ToolDescription
guard_inputScan prompts for injection attacks and unsafe instructions
redact_outputRedact PII, secrets, and sensitive data from outputs
guard_toolCheck tool execution against allow/deny policies

Operations

ToolDescription
issue_audit_ticketGenerate a signed JWT ticket for x402 transactions
create_escrowCreate an escrow task for payment
activate_kill_switchEmergency disable an agent

Environment variables

VariableRequiredDescription
AGNTOR_SECRET_KEYYesSecret key for JWT ticket signing
AGNTOR_API_KEYYesAPI key for authentication
AGNTOR_API_URLNoAPI base URL (default: http://localhost:3000)
AGNTOR_AGENT_IDNoAgent ID for the MCP server itself (default: agent://mcp-server)
AGNTOR_CHAINNoBlockchain network (default: base)
PORTNoHTTP server port (default: 3100)

Security

The HTTP server validates API keys on every /mcp request via the x-agntor-api-key header or Authorization: Bearer header. Keys are checked against:
  1. The AGNTOR_API_KEY environment variable (bootstrap key)
  2. The database api_keys table (for production multi-tenant setups)
In development mode (no AGNTOR_API_KEY set), authentication is bypassed.