nautilus-trader MCP server
nautilus-trader MCP server
これは何か
MCP(Model Context Protocol)サーバーで、LLM(Claude Code、Codex CLI など)が nautilus_trader に対してストラテジーコードを書く際に、2つの方法で情報を調べられるようにします:
コード検索 (
index.py) -- 実際のソース(Python + Rust)をシンボル名で構造的に検索します。ファジーテキスト/埋め込み検索ではなく、実際のクラス/関数/構造体を見つけて、その docstring または完全なソースを返します。ドキュメント検索 (
rags/) -- プロジェクトのマークダウンドキュメント(コンセプト、ガイド、チュートリアル)に対する意味的(埋め込みベース)検索で、「どうやって...」という単一のシンボル名にマッピングされない質問のためのものです。
Related MCP server: MCPyDoc
仕組み
index.py は、2つの実際の言語サーバーをサブプロセスとして起動し、それらと直接 LSP(stdio 上の JSON-RPC)で通信します。pylsp は nautilus_trader/python/nautilus_trader 配下の Python ソース用、rust-analyzer は nautilus_trader/crates 配下の Rust ソース用です。documentSymbol はトップレベルのクラス/関数/構造体/impl を見つけ、hover は docstring を取得します(Python のみ -- 既知の制限を参照)。結果は .code_index_cache.json にキャッシュされます。構築には約25秒かかるためです(主に rust-analyzer が約2600ファイルを処理します)。
rags/rag_build.py は docs/ 配下のすべてのファイルをチャンク化し、dspy.retrievers.Embeddings インデックス(Gemini 埋め込み)を構築して、rags/ に保存します(config.json + corpus_embeddings.npy)。さらに shape.json には元のフォルダ構造が記録され、rags/search.py がサブフォルダにフィルタリングできるようになります。
mcp_server.py は、両方を5つの MCP ツールに接続します:search_code、get_code_doc、get_code_source、search_docs、show_doc_keys。
セットアップ
git clone https://github.com/GwangPyo/NautilusTraderMCP.git
cd NautilusTraderMCP
cp .env.example .env # fill in GEMINI_API_KEY (and OPENAI/ANTHROPIC if you use load_model)
./install.sh # conda env "mcp" + deps, nautilus_trader clone, code index, doc indexinstall.sh は冪等です:再実行すると、nautilus_trader のクローン、docs/ のコピー、および(有料の)ドキュメント埋め込みビルドが既に存在する場合はスキップされます。ENV_NAME=<name> を設定すると、別の conda 環境名を使用できます(テスト用で、実際の mcp 環境には触れません)。
環境マネージャーは必須ではありません -- uv venv && uv pip install -e . でも動作します。install.sh は、再現可能なワンコマンドセットアップのために conda に標準化しているだけです。
クライアントへの登録
./add_claude.sh # claude mcp add
./add_codex.sh # codex mcp addどちらも、クライアントを <conda mcp env>/bin/python3 mcp_server.py に stdio 経由で向けるだけです。
既知の制限 / TODO
.code_index_cache.jsonとrags/{config.json,corpus_embeddings.npy,shape.json}には無効化の仕組みがありません --nautilus_trader/またはdocs/が変更された場合、キャッシュファイルを手動で削除して再実行する必要があります。自動テストはありません -- これまでのところ、すべて手動で検証されています(新しい conda 環境、新しい uv 環境、実際の MCP クライアントを stdio 経由で)。
nautilus_trader/はmain(ピン留めなし)からクローンされます -- 時間とともにドリフトする可能性があります。現在、既知の良好なコミット/タグに対してチェックするものはありません。
This server cannot be installed
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
Flicense-qualityDmaintenanceProvides AI coding agents with structured access to indexed codebases via semantic search, symbol analysis, and file reading tools.12- Alicense-qualityCmaintenanceProvides real-time access to Python package documentation, source code, and symbol search to prevent AI hallucinations.6MIT
- Alicense-qualityDmaintenanceExposes type-aware code navigation and fast file search to AI agents via language servers, enabling definitions, references, symbols, and file lookup without reading entire codebases.3,520MIT
- AlicenseAqualityBmaintenanceEnables LLMs to efficiently navigate large codebases by providing surgical access to specific code symbols via semantic search and call-graph queries.6MIT
Related MCP Connectors
Token-efficient search for coding agents over public and private documentation.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Search @imqueue docs and scaffold typed services & clients from your AI coding agent.
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/GwangPyo/NautilusTraderMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server