Cartesi Knowledge MCP Server
Cartesi Knowledge MCP Server
PostgreSQLから厳選されたCartesi開発者リソースを、ストリーミング可能なHTTP経由でAIエージェントに公開する、本番環境を意識したModel Context Protocolサーバーです。
現在の機能
FastMCP (
mcp[cli]1.26.x) とstreamable_http_app()— セッションの寿命が正しく実行されるよう、本番環境でFastMCPのStarletteアプリを直接使用します(src/main.pyのcreate_app()を参照)。Async SQLAlchemy + asyncpg — 知識データベースへの読み取り専用アクセス用。
階層レイアウト: 設定とログ (
src/core/)、DBセッションとモデル (src/db/)、リポジトリ、ドメインサービス (src/domain/resource_service.py)、スキーマ、フォーマッタ、およびsrc/server/下のサーバーモジュール。トランスポートセキュリティ: DNSリバインディング保護、および
src/server/server.pyで設定可能なallowed_hosts/allowed_origins(デプロイ先のホスト名に合わせて拡張してください)。プレーンHTTPヘルスチェック: MCPルートと並行して
GET /healthzが{"status":"ok"}を返します。
知識のレスポンスはメタデータとリンク(タイトル、URI、canonical_url、ドキュメントルート)です。これらには、取得したページ本文の全文は含まれません。エージェントが生のHTMLやマークダウンを必要とする場合は、外部URLを取得する必要があります。
ワークフローツール (prepare_cartesi_*、send_input_to_application、prepare_*_deposit_instructions、get_cartesi_app_logic_guidance) は、ユーザーのコンピューター用の手順とコマンドテンプレートのみを返します。これらは、このサーバーからCartesi CLI、cast、またはチェーンRPCを実行することはありません。
Related MCP server: read-docs-mcp
要件
Python ≥ 3.11 (
pyproject.tomlを参照。同梱のDockerfileはPython 3.12を使用しています)。src/db/models.pyおよびResourceServiceが期待する厳選されたリソーススキーマで構成されたPostgreSQLデータベース。
環境変数
.env.example を .env にコピーして調整してください。デフォルト値とフィールド名は src/core/config.py で定義されています(特に DATABASE_URL、APP_HOST、APP_PORT、MCP_BASE_URL、ページネーション制限)。PostgreSQLのURLについては、postgres://... は postgresql+asyncpg://... に正規化され、sslmode はasyncpg互換の ssl に変換されます(例: sslmode=disable は ssl=false になります)。
インストール
uv を使用(推奨):
uv syncpip を使用:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt実行
python -m src.mainuv run python -m src.mainuv run uvicorn src.main:create_app --factory --host 0.0.0.0 --port 8000MCPエンドポイントは以下のストリーミング可能なHTTPです:
http://<host>:<port>/mcp(デフォルト:http://0.0.0.0:8000/mcp)
Docker
このリポジトリには、uv で依存関係をインストールし、python -m src.main を実行するマルチステージの Dockerfile が含まれています。実行時に DATABASE_URL やその他の環境変数を設定してください(-e やオーケストレーター経由など)。
推奨されるクライアントテスト
MCP Inspectorまたは任意のMCP互換クライアントを使用し、以下に接続してください:
http://localhost:8000/mcpMCPリソース
URI | 目的 |
| サーバー名、環境、 |
| カタログ: リソースURI、ツール名、プロンプト、推奨エージェントフローのインデックス |
| 正規化されたリソースメタデータ |
| ドキュメントリソースビュー(同じ形状。ドキュメント以外のIDはエラー) |
| 親コンテキストを持つ単一のドキュメントルート |
| リポジトリ同期 / 新鮮度メタデータ |
| タグごとにグループ化されたリソース |
| ソースごとにグループ化されたリソース |
MCPツール(登録名)
これらはクライアントが見る name= の値です(Pythonのハンドラー名とは異なる場合があります)。
知識
summarize_knowledge_base— カバレッジ、カウント、オリエンテーションget_knowledge_taxonomy— 既知のタグとソースのタイトルsearch_knowledge_resources— クエリ、タグ、ソース、種類による検索get_resource_detail— IDによる1つのリソース、オプションのルートlist_resource_doc_routes— ドキュメントリソースのルートsearch_documentation_routes— リソース全体にわたるルートの検索list_resources_for_tag/list_resources_for_sourceget_repository_sync_statusbuild_debugging_context— 問題に焦点を当てたリソースとルートのバンドル
ホスト側のCartesiワークフロー(手順のみ)
prepare_cartesi_create_command— 安定版v1.5.xとアルファ版v2.0の作成ガイダンスprepare_cartesi_build_commandprepare_cartesi_run_commandsend_input_to_application— InputBox +castテンプレートprepare_erc20_deposit_instructions— ERC20Portalフローprepare_erc721_deposit_instructions— ERC721Portalフローprepare_erc1155_deposit_instructions— ERC1155SinglePortalフローget_cartesi_app_logic_guidance— アドレス帳、ポータル、バウチャー、通知、レポート
MCPプロンプト
debug_cartesi_issue— 厳選された知識を使用した構造化デバッグfind_cartesi_docs— トピックのドキュメントルートの発見explain_repository_context— リポジトリリソース + ステータスの概要
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared, versioned context that humans and AI agents can publish, review, annotate, and continue.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Intelligent context infrastructure for AI teams: knowledge graph, sessions, tasks, documents.
Related MCP Servers
FlicenseAqualityBmaintenanceA server that exposes blockchain data (balances, tokens, NFTs, contract metadata) via the Model Context Protocol, enabling AI agents and tools to access and analyze blockchain information contextually.1845-- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI agents to access, search, and understand structured package documentation and source code from Git repositories. It automatically generates specialized tools to browse module overviews, components, and detailed documentation for technical libraries.1698 npm7MIT
- AlicenseNot gradedqualityDmaintenanceA read-only Model Context Protocol server that exposes a semantic knowledge base to AI agents via 27 tools. It enables querying of documents and data integrated from sources like Notion, SharePoint, HubSpot, and Slack.MIT

cfabric-mcpofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform corpus analysis tasks such as discovery, search, and data access via the Model Context Protocol.10MIT