← Back to Agent Chain
📦 AC-5 · SDK + MCP + CLI
JavaScript SDK, 86 MCP tools, CLI for terminal workflows — every interface shares your quota
Overview
Three interfaces, one API key. The JavaScript SDK, 86 MCP tools for VS Code / Claude, and a CLI tool all access the same Agent Chain API and share your monthly quota.
Installation
JavaScript SDK
npm install @agent-chain/sdk
Python SDK
pip install agent-chain-sdk
CLI
npm install -g @agent-chain/cli
MCP Server (VS Code / Claude)
{
"mcpServers": {
"agent-chain": {
"command": "npx",
"args": ["-y", "@agent-chain/mcp"],
"env": { "AGENT_CHAIN_API_KEY": "ac_live_xxx" }
}
}
}
SDK Quick Start
import { AgentChain } from '@agent-chain/sdk';
const ac = new AgentChain({ apiKey: 'ac_live_xxx' });
// Register agent
const agent = await ac.agents.register({ name: 'my-bot' });
// Scan output
const scan = await ac.scanner.scan({ output: 'Hello world' });
// Get trust score
const trust = await ac.trust.get(agent.did);
// Check threats
const threats = await ac.intel.check(agent.did);
CLI Commands
# Set your API key
ac config set apiKey ac_live_xxx
# Register an agent
ac agents register --name my-bot
# Scan output
ac scanner scan --output "Hello world"
# Get trust score
ac trust get did:agent:ac:abc123
# Check blockchain
ac chain blocks --limit 5
MCP Tools (86 total)
| Product | # Tools | Examples |
|---|---|---|
| AC-1 Agent ID | 8 | register_agent, verify_agent, issue_credential |
| AC-2 Scanner | 5 | scan_output, get_scan_history, create_rule |
| AC-3 Trust | 6 | get_trust, submit_attestation, compute_trust |
| AC-4 Intel | 7 | check_threat, submit_indicator, search_reports |
| AC-6 Audit | 6 | run_audit, get_frameworks, schedule_audit |
| AC-7 Shadow | 8 | deploy_honeypot, get_attacks, list_personas |
| AC-8 Firewall | 12 | create_config, add_rule, evaluate_traffic |
| AC-9 Tracker | 10 | ingest_sighting, list_agents, get_graph |
| AC-10 Chain | 9 | get_block, get_nft, mint_nft, verify_tx |
| AC-11 Payments | 8 | send_payment, open_channel, get_balance |
| AC-12 Market | 7 | list_agent, browse, connect_wallet, pay_crypto |
SDK Configuration
| Option | Default | Description |
|---|---|---|
apiKey | — | Your ac_live_xxx API key |
baseUrl | https://api.agent-chain.io | API base URL |
timeout | 30000 | Request timeout in ms |
retries | 2 | Auto-retry count on 5xx |
cache | true | Enable LRU cache (100 entries, 60s TTL) |
💡 Cached SDK responses do NOT count as API calls. Only requests that reach the server consume quota.