Docs/MCP Integration

MCP Integration

Agentverse Memory is MCP-native. Connect any JSON-RPC 2.0 client — Claude Desktop, Cursor, Windsurf, LangChain, CrewAI — without installing any SDK.

Published as io.github.fetchai/agentverse-memory on the MCP Registry.

What is MCP?

The Model Context Protocol (MCP) is an open standard for exposing tools and resources to AI agents over JSON-RPC 2.0. Rather than building a bespoke SDK for every framework, MCP lets any compatible client — Claude Desktop, Cursor, LangChain, a custom agent loop — discover and call tools via a single HTTPS endpoint.

Agentverse Memory exposes all 35 memory tools over a single MCP endpoint. No SDK required, though Python and TypeScript SDKs are available for convenience.

Connection Details

PropertyValue
Endpointhttps://am-server-jbneh74b5q-uc.a.run.app/mcp
ProtocolJSON-RPC 2.0 over HTTPS (POST)
Auth headerAuthorization: Bearer avmem_sk_your_key_here
Content-Typeapplication/json
Tool discoveryPOST /mcp with method tools/list

Give Claude Persistent Memory in 5 Minutes

This walkthrough gives Claude Desktop access to all 35 Agentverse Memory tools — episodic, semantic, graph, procedural, working, and shared — with zero code.

1

Get your API key

Sign up at memory.agentverse.ai. The Explorer tier is free and includes graph memory. No credit card required. Your key looks like: avmem_sk_...

2

Find your Claude Desktop config file

OSConfig file path
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

If the file does not exist, create it.

3

Add the MCP server

Option A — Direct HTTP (recommended, no install needed):

claude_desktop_config.json
{
"mcpServers": {
"agentverse-memory": {
"url": "https://am-server-jbneh74b5q-uc.a.run.app/mcp",
"headers": {
"Authorization": "Bearer avmem_sk_your_key_here"
}
}
}
}

Option B — Local proxy via npx (useful for local dev, request logging, custom routing):

npm install -g agentverse-memory-mcp
claude_desktop_config.json
{
"mcpServers": {
"agentverse-memory": {
"command": "npx",
"args": ["-y", "agentverse-memory-mcp", "--agent-id", "claude-desktop"],
"env": {
"AVMEM_API_KEY": "avmem_sk_your_key_here"
}
}
}
}

The proxy starts automatically when Claude Desktop launches. Logs: ~/.agentverse-memory-mcp/proxy.log

4

Restart Claude Desktop

Fully quit and relaunch Claude Desktop (Cmd+Q / Alt+F4 — not just close the window). The config is loaded at startup.

5

Verify it's working

Open a new conversation and ask Claude:

“What memory tools do you have available? Call memory_health and tell me the result.”

Claude will list all 35 tools and return the health check:

{ "status": "ok", "version": "0.1.0", "uptime_s": 12345 }
6

Store your first memory

“Remember that I prefer concise bullet-point responses. Store that as a procedural memory.”

Claude calls memory_store_procedure automatically. From this point forward, every conversation can reference this preference — across sessions and across restarts.

Client Configurations

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent Windows/Linux path:

claude_desktop_config.json
{
"mcpServers": {
"agentverse-memory": {
"url": "https://am-server-jbneh74b5q-uc.a.run.app/mcp",
"headers": {
"Authorization": "Bearer avmem_sk_your_key_here"
}
}
}
}

Restart Claude Desktop after saving. All 35 tools appear automatically in Claude's tool list.

Cursor IDE

Create or edit .cursor/mcp.json in your project root:

.cursor/mcp.json
{
"mcpServers": {
"agentverse-memory": {
"url": "https://am-server-jbneh74b5q-uc.a.run.app/mcp",
"headers": {
"Authorization": "Bearer avmem_sk_your_key_here"
}
}
}
}

Cursor hot-reloads the config — no restart needed.

For a project-scoped agent_id shared by all team members, add "X-Agent-Id": "project-myapp-dev" to the headers object.

Windsurf / Codeium

Add via Settings → MCP Servers:

{
"agentverse-memory": {
"serverUrl": "https://am-server-jbneh74b5q-uc.a.run.app/mcp",
"headers": {
"Authorization": "Bearer avmem_sk_your_key_here"
}
}
}

Generic MCP Client (cURL)

Any client implementing JSON-RPC 2.0 can connect. Discover all tools with tools/list:

curl -X POST https://am-server-jbneh74b5q-uc.a.run.app/mcp \
-H "Authorization: Bearer avmem_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'

Call a tool:

curl -X POST https://am-server-jbneh74b5q-uc.a.run.app/mcp \
-H "Authorization: Bearer avmem_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "memory_store_episode",
"arguments": {
"agent_id": "my-agent",
"content": "Completed Q1 analysis for user_42."
}
}
}'

All 35 MCP Tools

All tools are available at every plan tier unless noted. Graph traversal tools (memory_traverse_graph, memory_find_path) are available on all tiers including Explorer (free). See the API Reference for full parameter schemas.

Episodic Memory5 tools
ToolDescription
memory_store_episodeStore a time-stamped event — what happened, when, and to whom. No LLM at write time — sub-ms in-process engine write op.
memory_get_episodesRetrieve episodes for an agent, with filtering by time range, metadata, or pagination.
memory_search_episodesSearch episodes by natural language using BM25 + TF-IDF hybrid retrieval with pheromone weighting.
memory_search_timelineSearch episodes within a bounded time window — useful for "what happened last Tuesday?" queries.
memory_consolidate_episodesMerge two or more related episodes into a single consolidated record, preserving provenance.
Semantic Memory5 tools
ToolDescription
memory_store_entityStore a named entity with type and metadata. Automatically linked in the knowledge graph.
memory_get_entityRetrieve a specific entity by name or ID.
memory_list_entitiesList all entities for an agent, with optional type/metadata filters.
memory_store_relationStore a directed relationship (subject → predicate → object) between entities. No LLM at write — sub-ms in-process engine write op.
memory_get_relationsGet all relations for a given entity — inbound, outbound, or both.
Graph6 tools
ToolDescription
memory_query_graphRun a structured query over the knowledge graph — filter by entity types, relations, and metadata.
memory_semantic_searchSemantic similarity search across all memory types using BM25 + TF-IDF + pheromone reranking.
memory_get_neighborsGet immediate neighbors of a node — entities directly connected by one edge.
memory_graph_add_tripleAdd a (subject, predicate, object) triple directly to the graph. Batch-friendly.
memory_graph_neighborsExtended neighbor query with depth, direction, and relation-type filters.
memory_graph_shortest_pathFind the shortest path between two entities in the knowledge graph.
Procedural Memory4 tools
ToolDescription
memory_store_procedureStore a skill definition: goal description → ordered steps → expected outcome.
memory_get_procedureRetrieve a specific procedure by its ID (proc_...).
memory_match_procedureSearch procedures by goal — returns the most relevant skill for a given objective.
memory_update_procedureUpdate a procedure's steps (versioned) or record an execution outcome (success/failure rate).
Working Memory4 tools
ToolDescription
memory_set_workingSet a key-value pair in the agent's working memory, with optional TTL for auto-expiry.
memory_get_workingGet the current value for a working memory key. Returns null if key doesn't exist or has expired.
memory_list_workingList all active working memory keys for the agent — useful for state inspection.
memory_clear_workingClear all working memory for the agent. Called at task completion or session teardown.
Pheromones2 tools
ToolDescription
memory_deposit_pheromoneManually deposit a pheromone trace on a node or edge — boost retrieval weight for specific memories.
memory_get_pheromoneRead the current pheromone weight on a node or edge, including decay-adjusted value.
Shared Spaces5 tools — Builder+
ToolDescription
memory_create_shared_spaceCreate a shared memory space — a multi-agent knowledge pool with JWT/DID-based access control.
memory_join_shared_spaceJoin an existing shared space using an invite token issued by the space creator.
memory_shared_store_entityStore an entity into a shared space — visible to all agents that have joined.
memory_shared_queryQuery facts and episodes in a shared space — all agents in the space see the same graph.
memory_list_shared_spacesList all shared spaces the agent belongs to, with member counts and metadata.
System2 tools
ToolDescription
memory_get_statsGet usage statistics: memory counts by type, storage size, op counts, rate limit status, pheromone summary.
memory_delete_agentPermanently delete all memories for an agent. Irreversible — use with caution.
Graph Traversal2 tools
ToolDescription
memory_find_pathPheromone-weighted A* pathfinding between two concepts. Available on all tiers including Explorer (free).
memory_traverse_graphMulti-hop graph traversal from a seed concept — follows pheromone-weighted edges up to max_depth hops.

Authentication

All requests must include an Authorization header:

Authorization: Bearer avmem_sk_your_key_here
⚠️ Security: Never commit API keys to source control. Use environment variables:
export AVMEM_API_KEY="avmem_sk_your_key_here"

API keys are scoped to your account. You can issue multiple keys (one per agent, one per environment) and revoke individual keys without affecting others.

Rate Limits

Applied per API key (not per agent_id).

PlanMonthly opsBurst (req/min)
Explorer(Free)50,00060
Builder($19/mo)500,000300
Pro($99/mo)5,000,0001,200
Enterprise(Custom)CustomCustom

"Ops" are counted per MCP tool call. A memory_traverse_graph call counts as one op regardless of how many edges it traverses. When you exceed rate limits, the server returns HTTP 429 with a Retry-After header (rolling 30-day window).

Error Codes

HTTPJSON-RPC codeMeaningAction
401-32001Unauthorized — invalid API keyCheck Authorization header
403-32002Forbidden — feature not on your planUpgrade at /pricing
404-32004Not Found — resource ID missingCheck the ID in request
422-32602Invalid params — malformed argsCheck parameter types
429-32029Rate Limited — ops limit exceededRespect Retry-After; upgrade
500-32000Internal error — server faultRetry with backoff; report if persistent
503-32503Service UnavailableCheck status.memory.agentverse.ai

Example 429 error response:

{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32029,
"message": "Rate limit exceeded",
"data": {
"limit": 50000,
"used": 50001,
"reset_at": "2026-06-14T00:00:00Z",
"retry_after": 1814400
}
}
}