letta
MCP Server to make building Letta agents easy!
claude mcp add --transport stdio snycfire-core-letta-mcp-server letta-mcp run \ --env LETTA_API_KEY="your-api-key"
How to use
The Letta MCP Server acts as a universal bridge that connects any MCP-compatible client to Letta.ai's stateful agents. It exposes a standard JSON-RPC 2.0 interface and provides persistent memory, tool orchestration, and real-time streaming, enabling clients like Claude Desktop, GitHub Copilot, Cursor, Replit, Sourcegraph Cody, and OpenAI ChatGPT to interact with Letta's agents without bespoke integrations. You can manage agents, send messages, access memory, and attach tools through a consistent set of MCP commands. The included toolset supports agent management (list/create/get/update/delete), conversations (send/stream/get history/export), memory operations (get/update/search/create blocks), and tool workflows (list/attach/create/set rules). To use it, configure your MCP client to point at the letta server entry and supply your API key for Letta services, then invoke the standard letta_* tools from your client’s workflow.
Typical usage involves starting the MCP server with the configured command, then in your MCP client adding a server entry like the example configuration shown in the documentation, and finally issuing letta_* commands such as letta_list_agents, letta_send_message, letta_update_memory, or letta_attach_tool to interact with the agents.
From any supported client, you can perform agent conversations, manage memory, orchestrate tools, and stream responses in real time, all through the unified MCP interface. For example, use letta_list_agents to discover available agents, then letta_send_message to chat with a selected agent, and use streaming letta_stream_message to receive real-time results.
How to install
Prerequisites:
- Python 3.9 or newer
- pip (Python package installer)
-
Create a virtual environment (recommended) python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
-
Install the Letta MCP Server package pip install letta-mcp-server
-
Configure environment (example)
- Obtain a Letta API key from your Letta account.
- Set LETTA_API_KEY in your environment or pass it via your MCP configuration (see mcp_config example).
-
Run the MCP server (example) // If using the provided npm/CLI wrapper, ensure your PATH includes letta-mcp letta-mcp run
-
Verify startup
- Check logs for successful initialization and connection to Letta API.
- Confirm the MCP endpoint is reachable from your MCP clients.
Additional notes
Tips and common issues:
- Ensure LETTA_API_KEY is valid and has the necessary permissions for agent access and memory operations.
- If using a self-hosted Letta base URL, set LETTA_BASE_URL to the correct endpoint (e.g., https://api.letta.com or http://localhost:8283).
- Configure timeouts and retries via environment or your MCP client, if needed (LETTA_TIMEOUT, LETTA_MAX_RETRIES).
- The server supports streaming responses; enable it in clients that support MCP streaming for better UX.
- When updating to newer versions, review breaking changes in the MCP protocol or agent tooling sections.
- If you run into connection pool limits, adjust LETTA_MAX_RETRIES and related performance settings in the configuration file.
Environment variables to know:
- LETTA_API_KEY: Required API key for Letta Cloud access
- LETTA_BASE_URL: Base URL for Letta API (default: https://api.letta.com)
- LETTA_DEFAULT_MODEL: Default model to use if not specified by the client
- LETTA_DEFAULT_EMBEDDING: Default embedding model
- LETTA_TIMEOUT: Request timeout in seconds
- LETTA_MAX_RETRIES: Number of retry attempts on failure
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP