Docs · MCP

Configure the local AgentMemory MCP server

The desktop includes an MCP server using stdio transport. It exposes three read-only tools backed by the local workspace and requires an authorized desktop session.

Tools available to the client

`projects` lists project identifiers and names. `search_memory` takes a project and query. `build_context` takes a project and query and returns a formatted context package. There are no MCP write or administrative tools.

Point the client to the generated config

The desktop writes a private `mcp-config.json` and token file in its application data directory. Configure a compatible MCP client to launch the local `desktop/mcp.mjs` server with Node 24 and `AGENTMEMORY_MCP_CONFIG` set to the generated configuration-file path. Keep both files private.

Authorization and local transport

The stdio process reads the generated connection details and sends requests to a loopback-only desktop bridge with a random bearer token. The desktop checks its short-lived device authorization before responding. Keep AgentMemory running while using the tools.

Troubleshooting

If the client cannot connect, check that the desktop is open and authorized, the configured file path exists, and the client inherits the environment variable. Restart the desktop after changing the connection configuration.

Explore AgentMemory