Minimal reference implementation for connecting an AI agent to the ALTER MCP server. ALTER is identity infrastructure for the AI economy -- psychometrically-grounded identity verification, multi-domain trait modelling, and privacy-preserving identity queries, all accessible via the Model Context Protocol (MCP).
- An ALTER API key (get one at truealter.com/developers)
- Python 3.10+ with
httpx, or Node.js 18+
Add ALTER to your Claude Desktop MCP config (claude_desktop_config.json):
{
"mcpServers": {
"alter-identity": {
"command": "npx",
"args": [
"-y",
"@anthropic-ai/sdk@latest",
"mcp-server",
"--transport", "sse",
"--url", "https://mcp.truealter.com/api/v1/mcp",
"--header", "X-ALTER-API-Key: YOUR_KEY"
]
}
}
}Replace YOUR_KEY with your API key. Restart Claude Desktop. Call hello_agent once — it reports your tier and the exact free / premium / messaging tool counts available to your key.
npx -y @anthropic-ai/sdk@latest mcp-server \
--transport sse \
--url https://mcp.truealter.com/api/v1/mcp \
--header "X-ALTER-API-Key: YOUR_KEY"ALTER's MCP server accepts JSON-RPC 2.0 over HTTP POST. No SDK required.
curl -s -X POST https://mcp.truealter.com/api/v1/mcp \
-H "Content-Type: application/json" \
-H "X-ALTER-API-Key: YOUR_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {"name": "hello_agent", "arguments": {}},
"id": 1
}'| File | Language | What it does |
|---|---|---|
examples/python/hello.py |
Python | Calls hello_agent -- first handshake, confirms connection |
examples/python/verify_and_match.py |
Python | Four-call read-only discovery flow — handshake, handle resolution, archetype taxonomy, network stats |
examples/typescript/hello.ts |
TypeScript | Calls hello_agent using fetch |
All requests use the X-ALTER-API-Key header. Without a key, you are treated as anonymous (10 req/min, L0 tools only). With a key, you get full access to your tier's tools and rate limits.
POST https://mcp.truealter.com/api/v1/mcp
Content-Type: application/json
X-ALTER-API-Key: alt_sk_live_...
Every MCP call follows this shape:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "tool_name_here",
"arguments": { }
},
"id": 1
}Successful responses contain result.content[0].text (human-readable text) and optionally result._meta (structured data). Errors contain error.code and error.message.
Agents can discover ALTER via:
- MCP registries -- ALTER is listed in public MCP tool registries
- DNS TXT --
_mcp._tcp.truealter.comcontains the server URL - agent-card.json --
https://truealter.com/.well-known/agent-card.json - llms.txt --
https://truealter.com/llms.txtandhttps://truealter.com/llms-full.txt
- Tool reference -- full tool catalogue with schemas and examples
- Transport protocol -- sessions, auth, error codes, rate limits
- Identity model -- Side Quest Graph, engagement levels, trust model
- Pricing -- tier pricing and x402 payment flow
Apache-2.0. See LICENSE.