Get the FREE Ultimate OpenClaw Setup Guide →

letta -railway

MCP server from SNYCFIRE-CORE/letta-mcp-server-railway

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository git clone https://github.com/SNYCFIRE-CORE/letta-mcp-server-railway.git cd letta-mcp-server-railway

  2. Create and activate a Python environment (optional but recommended) python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows

  3. Install the package in editable mode pip install -e .

  4. 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

  5. Run the server locally python -m letta_mcp_server_railway.server

  6. 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

Sponsor this space

Reach thousands of developers