Letta MCP Server
Letta MCP 서버
Letta AI를 위한 고성능 Model Context Protocol (MCP) 서버로, Rust와 TurboMCP 프레임워크로 구축되었습니다.
기능
7개의 통합 도구: 판별자(discriminator) 패턴을 사용하여 103개의 작업을 처리
고성능 -- Rust 기반, 약 10-30MB 메모리 사용, 500ms 미만의 시작 시간,
tokio::join!및buffer_unordered를 통한 병렬 팬아웃이중 전송 -- stdio (Claude Desktop, Cursor 등) 및 HTTP (프로덕션 배포)
응답 크기 최적화 -- LLM 컨텍스트 효율성을 위해 응답 크기를 68-96% 감소
타입이 지정된 스키마 -- 매개변수별 설명이 포함된 구체적인
object/array타입 (일반Value매개변수 없음)멀티 플랫폼 -- macOS, Linux, Windows (x64 및 arm64)
Letta 0.16.x 호환 -- 아카이브, 대화, MCP 서버 v2
MCP 2025-11-25 준수 -- SSE를 통한 스트리밍 가능한 HTTP 전송
컴파일 타임 라우팅 -- TurboMCP v3 매크로를 통한 도구 디스패치 시 런타임 오버헤드 제로
Related MCP server: A2A Client MCP Server
빠른 시작
npm (권장)
npm install -g letta-mcp-server사용 중인 플랫폼에 맞는 바이너리가 자동으로 설치됩니다.
플랫폼 | 패키지 |
macOS Intel |
|
macOS Apple Silicon |
|
Linux x64 |
|
Linux arm64 |
|
Windows x64 |
|
Docker
docker pull ghcr.io/oculairmedia/letta-mcp-server-rust:rust-latest
docker run -d \
-p 6507:6507 \
-e LETTA_BASE_URL=http://your-letta-instance:8283 \
-e LETTA_PASSWORD=your-password \
-e TRANSPORT=http \
--name letta-mcp \
ghcr.io/oculairmedia/letta-mcp-server-rust:rust-latestDocker Compose
services:
letta-mcp:
image: ghcr.io/oculairmedia/letta-mcp-server-rust:rust-latest
container_name: letta-mcp
restart: unless-stopped
ports:
- '6507:6507'
environment:
LETTA_BASE_URL: ${LETTA_BASE_URL}
LETTA_PASSWORD: ${LETTA_PASSWORD}
TRANSPORT: http
PORT: 6507
RUST_LOG: info
env_file:
- .env
healthcheck:
test: ['CMD-SHELL', "timeout 1 bash -c '</dev/tcp/localhost/6507' || exit 1"]
interval: 30s
timeout: 10s
retries: 3환경 변수
변수 | 필수 | 기본값 | 설명 |
| 예 | — | Letta API URL (예: |
| 예 | — | Letta API 비밀번호 |
| 아니오 |
| 전송 모드: |
| 아니오 |
| HTTP 포트 ( |
| 아니오 |
| 로그 레벨: |
| 아니오 |
| 백트레이스 활성화 ( |
| 아니오 |
| 블록/구절/검색 값의 최대 문자 수 |
| 아니오 |
| 코어 메모리 미리보기의 최대 문자 수 |
사용 가능한 도구
이 서버는 103개의 작업을 수행하는 7개의 통합 도구를 제공합니다:
도구 | 작업 수 | 설명 |
| 28 | 에이전트 수명 주기, 메시징, 대화, 컨텍스트, 내보내기/가져오기 |
| 24 | 코어 메모리, 블록, 아카이브 구절, 아카이브, 검색 |
| 13 | 도구 CRUD, 연결/해제, 대량 작업 |
| 15 | 데이터 소스, 파일, 구절, 첨부 파일 |
| 4 | 작업 추적, 취소, 활성 모니터링 |
| 8 | 파일 세션, 폴더 관리 |
| 11 | MCP 서버 수명 주기, 도구 검색, v2 API 지원 |
도구 작업
letta_agent_advanced (28개 작업)
list, create, get, update, delete, search, list_tools, send_message,
export, import, clone, get_config, bulk_delete, context, reset_messages,
summarize, stream, async_message, cancel_message, preview_payload,
search_messages, get_message, count, list_conversations,
get_conversation, send_conversation_message, cancel_conversation,
compact_conversationletta_memory_unified (24개 작업)
get_core_memory, update_core_memory, get_block_by_label, list_blocks,
create_block, get_block, update_block, attach_block, detach_block,
list_agents_using_block, search_archival, list_passages, create_passage,
update_passage, delete_passage, search_memory, list_archives,
get_archive, create_archive, update_archive, delete_archive,
attach_archive, detach_archive, list_agents_using_archiveletta_tool_manager (13개 작업)
list, get, create, update, delete, upsert, attach, detach, bulk_attach,
generate_from_prompt, generate_schema, run_from_source, add_base_toolsletta_source_manager (15개 작업)
list, get, create, update, delete, count, attach, detach, list_attached,
upload, delete_files, list_files, list_folders, get_folder_contents,
list_agents_usingletta_job_monitor (4개 작업)
list, get, cancel, list_activeletta_file_folder_ops (8개 작업)
list_files, open_file, close_file, close_all_files, list_folders,
attach_folder, detach_folder, list_agents_in_folderletta_mcp_ops (11개 작업)
add, update, delete, test, connect, resync, list_servers, list_tools,
register_tool, execute, attach_mcp_server응답 크기 최적화
Rust 구현체에는 LLM 컨텍스트 효율성을 위한 상당한 응답 크기 최적화가 포함되어 있습니다:
작업 | 최적화 | 크기 감소 |
에이전트 목록 | 기본 페이지네이션 (15개 항목), 요약 모드 | 68-85% |
도구 목록 | 기본 페이지네이션 (25개 항목), 잘린 설명 | 70-90% |
메모리 블록 | 목록 모드에서 무거운 필드 제외 | 60-80% |
소스 목록 | 요약 모드, 페이지네이션 | 75-95% |
페이지네이션
모든 목록 작업은 페이지네이션을 지원합니다:
{
"operation": "list",
"pagination": {
"limit": 25,
"offset": 0
}
}요약 모드 vs 전체 모드
목록 작업은 기본적으로 요약 데이터를 반환합니다. 전체 세부 정보를 보려면 특정 ID와 함께 get 작업을 사용하세요:
// Summary (default for list)
{
"id": "agent-123",
"name": "My Agent",
"model": "gpt-4",
"tool_count": 5
}
// Full (with get operation)
{
"id": "agent-123",
"name": "My Agent",
"model": "gpt-4",
"system_prompt": "...",
"tools": [...],
"memory_blocks": [...]
}MCP 클라이언트 설정
Claude Desktop
{
"mcpServers": {
"letta": {
"command": "letta-mcp",
"env": {
"LETTA_BASE_URL": "http://localhost:8283",
"LETTA_PASSWORD": "your-password"
}
}
}
}Cursor / Windsurf
{
"mcpServers": {
"letta": {
"command": "letta-mcp",
"env": {
"LETTA_BASE_URL": "http://localhost:8283",
"LETTA_PASSWORD": "your-password"
}
}
}
}OpenCode (HTTP)
{
"mcp": {
"letta-mcp": {
"type": "remote",
"url": "http://localhost:6507/mcp",
"enabled": true
}
}
}소스에서 빌드하기
사전 요구 사항
Rust nightly (2024 에디션 지원) - rustup을 통해 설치
Docker (선택 사항, 컨테이너 빌드용)
로컬 빌드
git clone https://github.com/oculairmedia/Letta-MCP-server.git
cd Letta-MCP-server
cargo build --release
LETTA_BASE_URL=http://your-letta:8283 \
LETTA_PASSWORD=your-password \
./target/release/letta-serverDocker 빌드
docker build -f Dockerfile.rust -t letta-mcp .
docker run -d \
-p 6507:6507 \
-e LETTA_BASE_URL=http://your-letta:8283 \
-e LETTA_PASSWORD=your-password \
-e TRANSPORT=http \
letta-mcp아키텍처
letta-server/
├── src/
│ ├── main.rs # Entry point, transport selection
│ ├── lib.rs # Server init, compile-time tool registration
│ └── tools/
│ ├── mod.rs # Tool module exports
│ ├── response_utils.rs # Unified ToolResponse, pagination helpers
│ ├── validation_utils.rs # require_field, require_id, sdk_err
│ ├── id_utils.rs # ID parsing utilities
│ ├── agent_advanced/ # Agent operations (28 ops)
│ │ ├── crud.rs # list, create, get, update, delete, search
│ │ ├── messaging.rs # send_message, stream, async, preview
│ │ ├── conversations.rs # list, get, send, cancel, compact
│ │ └── management.rs # export, import, clone, config, bulk_delete
│ ├── memory_unified/ # Memory operations (24 ops)
│ │ ├── core.rs # get/update core memory
│ │ ├── blocks.rs # block CRUD, attach/detach
│ │ ├── passages.rs # archival passage CRUD
│ │ ├── archives.rs # archive CRUD, attach/detach
│ │ └── search.rs # search_archival, search_memory
│ ├── tool_manager.rs # Tool operations (13 ops)
│ ├── source_manager.rs # Source operations (15 ops)
│ ├── job_monitor.rs # Job operations (4 ops)
│ ├── file_folder_ops.rs # File/folder operations (8 ops)
│ └── mcp_ops.rs # MCP server v2 operations (11 ops)
├── tests/ # Integration tests
└── Cargo.toml주요 의존성
TurboMCP v3 -- 컴파일 타임 라우팅 및 스트리밍 가능한 HTTP를 지원하는 MCP 프레임워크
letta-rs -- Vendored Rust Letta API 클라이언트 (0.16.x)
Tokio -- 비동기 런타임
Futures -- 스트림 결합기 (병렬 팬아웃을 위한
buffer_unordered)Serde -- 직렬화/역직렬화
문제 해결
연결 거부 (Connection Refused)
서버가 실행 중인지 확인:
docker ps | grep letta-mcp로그 확인:
docker logs letta-mcp포트 접근 가능 여부 확인:
curl http://localhost:6507/mcp
인증 오류
LETTA_BASE_URL이 Letta 인스턴스를 가리키는지 확인LETTA_PASSWORD가 올바른지 확인컨테이너에서 Letta 서버에 접근할 수 있는지 확인
도구를 찾을 수 없음
MCP를 통해 사용 가능한 도구 목록 확인:
tools/list올바른 작업 이름을 사용 중인지 확인 (예:
list_agents가 아닌list)
로그
# View server logs
docker logs -f letta-mcp
# Enable debug logging
RUST_LOG=debug letta-mcp기여하기
저장소를 포크하세요
기능 브랜치를 만드세요:
git checkout -b feature/my-feature변경 사항을 적용하고 테스트를 추가하세요
테스트 실행:
cargo test풀 리퀘스트를 제출하세요
라이선스
MIT 라이선스 - 자세한 내용은 LICENSE 파일을 참조하세요.
관련 프로젝트
Letta - Letta AI 프레임워크
TurboMCP - Rust용 MCP 프레임워크
Model Context Protocol - MCP 사양
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- MIT
- FlicenseAqualityDmaintenanceAn MCP server that enables LLMs to interact with Agent-to-Agent (A2A) protocol compatible agents, allowing for sending messages, tracking tasks, and receiving streaming responses.528
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to interact with the SpaceTraders API, managing agents, fleets, contracts, and trading operations in the SpaceTraders universe.MIT
- AlicenseBqualityDmaintenanceConnects any MCP-compatible AI client to Letta.ai's stateful agents for agent conversations, memory management, and tool orchestration.1812MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI dialogue using various LLM models via AceDataCloud
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oculairmedia/Letta-MCP-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server