Install Claude Code, register AGNT as an MCP server, and start calling real venue tools from inside your terminal.
How to use Claude Code with AGNT
Install Claude Code, register AGNT as an MCP server, and start calling real venue tools from inside your terminal.
Claude Code is Anthropic's terminal-native coding agent with first-class support for the Model Context Protocol. AGNT ships a production MCP server at /mcp/sse. Ten minutes of setup gives your Claude Code sessions real tools against the AGNT venue graph and user memory — no adapters, no glue code.
Prerequisites
- Node.js 18 or newer on your machine.
- An AGNT developer API key with the memory.read and venues.read scopes.
- An Anthropic account with API access (for Claude Code itself).
Claude Code is distributed on npm as @anthropic-ai/claude-code. Install it globally:
bash
npm install -g @anthropic-ai/claude-codeVerify the install by running claude in any directory. You should see the interactive welcome screen. On first run it prompts you to log in with your Anthropic account and pick a default model (Claude Sonnet 4.6 is the right choice for coding work).
Claude Code reads MCP server definitions from two places, in order of precedence. The project-local file .mcp.json in the current directory is checked first. If it does not exist, Claude Code falls back to the user-wide file at ~/.claude.json.
For an AGNT integration you usually want project-local scoping so the server only loads when you are working in that project. That way a key scoped to one user or one repo never leaks into a different session.
Create a .mcp.json in your project root with a single server entry:
json
{
"mcpServers": {
"agnt": {
"type": "http",
"url": "https://api.agntdot.com/mcp/sse",
"headers": {
"Authorization": "Bearer ${AGNT_API_KEY}"
}
}
}
}Export the key in your shell (never commit it to the repo):
bash
export AGNT_API_KEY="agnt_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"Claude Code substitutes the env var at startup and holds the value only in memory for the duration of the session.
Launch Claude Code in that directory with the claude command, then run the /mcp slash command. You should see a list of connected servers with 'agnt' showing a green 'connected' state. The available tools are enumerated underneath: search_venues, list_venues, read_user_memory, query_knowledge_graph, and (if your key has memory.write scope) write_user_memory.
If the handshake fails, the failure modes are predictable. 401 means the bearer token is wrong or missing. 403 means the key lacks a scope for a tool you enabled. A connection timeout usually means a corporate network is blocking the SSE upgrade — try a direct connection to verify.
Ask Claude Code a question that the model should resolve through a tool call: 'find me sunset-facing restaurants in Canggu and summarise their vibes'. Claude Code inspects the connected MCP tools, picks search_venues (by matching the intent against the tool description), calls it with a sensible payload, and composes a grounded answer from the structured response.
You do not write any prompt engineering. The tool description in the MCP server is enough for the model to route. This is the single biggest difference between MCP and a traditional REST integration — the protocol does the routing work the system prompt used to.
Before you enable write_user_memory in a session that is not strictly yours, scope the key. The AGNT developer dashboard lets you lock a key to: a specific user_id, a list of allowed memory key prefixes, a tier cap, and a per-day write quota.
Recommended settings for a personal Claude Code key: scoped to your own user_id, memory key prefixes limited to diet, interests, favourite_areas, writes capped at 20/day, reads unlimited. Tighten from there if you share the setup with teammates.
Claude Code will happily connect to multiple MCP servers in the same session. Drop a filesystem server alongside the AGNT one and your coding agent can read the project's code and AGNT's venue graph in the same turn. The two contexts compose without any additional routing code on your side.
Key terms
Next steps