Skip to main content
Glama
GwangPyo

nautilus-trader MCP server

by GwangPyo

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)で通信します。pylspnautilus_trader/python/nautilus_trader 配下の Python ソース用、rust-analyzernautilus_trader/crates 配下の Rust ソース用です。documentSymbol はトップレベルのクラス/関数/構造体/impl を見つけ、hover は docstring を取得します(Python のみ -- 既知の制限を参照)。結果は .code_index_cache.json にキャッシュされます。構築には約25秒かかるためです(主に rust-analyzer が約2600ファイルを処理します)。

rags/rag_build.pydocs/ 配下のすべてのファイルをチャンク化し、dspy.retrievers.Embeddings インデックス(Gemini 埋め込み)を構築して、rags/ に保存します(config.json + corpus_embeddings.npy)。さらに shape.json には元のフォルダ構造が記録され、rags/search.py がサブフォルダにフィルタリングできるようになります。

mcp_server.py は、両方を5つの MCP ツールに接続します:search_codeget_code_docget_code_sourcesearch_docsshow_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 index

install.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.jsonrags/{config.json,corpus_embeddings.npy,shape.json} には無効化の仕組みがありません -- nautilus_trader/ または docs/ が変更された場合、キャッシュファイルを手動で削除して再実行する必要があります。

  • 自動テストはありません -- これまでのところ、すべて手動で検証されています(新しい conda 環境、新しい uv 環境、実際の MCP クライアントを stdio 経由で)。

  • nautilus_trader/main(ピン留めなし)からクローンされます -- 時間とともにドリフトする可能性があります。現在、既知の良好なコミット/タグに対してチェックするものはありません。

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    -
    quality
    D
    maintenance
    Exposes 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,520
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables LLMs to efficiently navigate large codebases by providing surgical access to specific code symbols via semantic search and call-graph queries.
    6
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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