Letta MCP Server
Letta MCP サーバー
Letta AI 用の高性能な Model Context Protocol (MCP) サーバーです。Rust と TurboMCP フレームワークを使用して構築されています。
特徴
7つの統合ツール:識別子パターンを使用して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