Skip to content

true-alter/alter-demo-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

alter-demo-agent

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).

Prerequisites

Quick start -- Claude Desktop

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.

Quick start -- npx one-liner

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"

Quick start -- raw HTTP

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
  }'

Examples

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

Authentication

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_...

JSON-RPC 2.0 format

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.

Discovery

Agents can discover ALTER via:

  • MCP registries -- ALTER is listed in public MCP tool registries
  • DNS TXT -- _mcp._tcp.truealter.com contains the server URL
  • agent-card.json -- https://truealter.com/.well-known/agent-card.json
  • llms.txt -- https://truealter.com/llms.txt and https://truealter.com/llms-full.txt

Documentation

Licence

Apache-2.0. See LICENSE.

About

Minimal reference implementation for connecting AI agents to ALTER's MCP identity server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors