letta -railway
MCP server from SNYCFIRE-CORE/letta-mcp-server-railway
claude mcp add --transport stdio snycfire-core-letta-mcp-server-railway python -m letta_mcp_server_railway.server \ --env PORT="8000" \ --env LETTA_API_KEY="Your Letta API key from api.letta.com" \ --env LETTA_TIMEOUT="60" \ --env LETTA_BASE_URL="https://api.letta.com" \ --env LETTA_MAX_RETRIES="3"
How to use
This Letta MCP Server on Railway exposes a cloud-optimized HTTP transport interface that connects MCP clients to Letta.ai's stateful agents. The server uses a streamable HTTP transport to enable scalable, cloud-friendly conversations with multiple agents and tools, including memory management, tool attachment, and conversation streaming. You can manage agents, messages, memories, and tools through the built-in functions exposed by the Letta API (for example, letta_list_agents, letta_send_message, letta_get_memory, letta_attach_tool, etc.). To connect clients, configure them to use the streamable_http transport and point them at your Railway-hosted /mcp endpoint, e.g., https://your-app.up.railway.app/mcp. The server also includes MCP Inspector testing and sample configurations for Claude Desktop, GitHub Copilot/VS Code, and other MCP clients.
How to install
Prerequisites:
- Python 3.10+ installed on your machine
- Git installed
- Access to a Letta API key
Step-by-step installation:
-
Clone the repository git clone https://github.com/SNYCFIRE-CORE/letta-mcp-server-railway.git cd letta-mcp-server-railway
-
Create and activate a Python environment (optional but recommended) python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
-
Install the package in editable mode pip install -e .
-
Set required environment variables (example) export LETTA_API_KEY=your_api_key_here export LETTA_BASE_URL=https://api.letta.com export PORT=8000 export LETTA_TIMEOUT=60 export LETTA_MAX_RETRIES=3
-
Run the server locally python -m letta_mcp_server_railway.server
-
Test locally with MCP Inspector or an MCP client npx @modelcontextprotocol/inspector http://localhost:8000/mcp
Prerequisites summary:
- Python 3.10+
- Letta API key
- Optional: virtual environment tool (venv) and Git
Additional notes
Tips and common considerations:
- The Railway deployment uses streamable HTTP transport for cloud efficiency; ensure your MCP clients are configured with transport: streamable_http and the correct /mcp URL.
- Environment variables: LETTA_API_KEY is required. Other LETTA_* vars are optional but can customize base URL, timeout, and retry behavior.
- If you encounter connection issues, verify the health endpoint at https://your-app.up.railway.app/health and confirm environment variables are correctly set in Railway.
- For local testing, use the MCP Inspector or curl/postman to send Council-like JSON-RPC payloads to http://localhost:8000/mcp.
- When updating code, use typical Python development commands (pytest, black, mypy, ruff) as listed in the repository to maintain code quality.
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