Cartesi Knowledge MCP Server

Cartesi Knowledge MCP Server

Enables AI agents to query curated Cartesi developer resources, documentation, and repository metadata through the Model Context Protocol. Provides read-only knowledge access and host-side workflow guidance for building Cartesi blockchain applications via streamable HTTP.

Category
访问服务器

README

Cartesi Knowledge MCP Server

Production-minded Model Context Protocol server that exposes curated Cartesi developer resources from PostgreSQL to AI agents over streamable HTTP.

Current capabilities

  • FastMCP (mcp[cli] 1.26.x) with streamable_http_app() — use FastMCP’s Starlette app directly in production so session lifespan runs correctly (see create_app() in src/main.py).
  • Async SQLAlchemy + asyncpg for read-only access to the knowledge database.
  • Layered layout: config and logging (src/core/), DB session and models (src/db/), repositories, domain service (src/domain/resource_service.py), schemas, formatters, and server modules under src/server/.
  • Transport security: DNS rebinding protection and configurable allowed_hosts / allowed_origins in src/server/server.py (extend for your deployment hostname).
  • Plain HTTP health: GET /healthz returns {"status":"ok"} alongside the MCP route.

Knowledge responses are metadata and links (titles, URIs, canonical_url, doc routes). They do not include full fetched page bodies; agents should fetch external URLs when they need raw HTML or markdown.

Workflow tools (prepare_cartesi_*, send_input_to_application, prepare_*_deposit_instructions, get_cartesi_app_logic_guidance) only return instructions and command templates for the user’s machine. They do not run the Cartesi CLI, cast, or chain RPC from this server.

Requirements

  • Python ≥ 3.11 (see pyproject.toml; the included Dockerfile uses Python 3.12).
  • A PostgreSQL database populated with the curated resource schema expected by src/db/models.py and ResourceService.

Environment variables

Copy .env.example to .env and adjust. Defaults and field names are defined in src/core/config.py (notably DATABASE_URL, APP_HOST, APP_PORT, MCP_BASE_URL, pagination limits).

Install

Using uv (recommended):

uv sync

Using pip:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run

python -m src.main
uv run python -m src.main
uv run uvicorn src.main:create_app --factory --host 0.0.0.0 --port 8000

The MCP endpoint is streamable HTTP at:

  • http://<host>:<port>/mcp (default: http://0.0.0.0:8000/mcp)

Docker

The repository includes a multi-stage Dockerfile that installs dependencies with uv and runs python -m src.main. Set DATABASE_URL and other env vars at runtime (for example via -e or your orchestrator).

Suggested client test

Use MCP Inspector or any MCP-compatible client and connect to:

http://localhost:8000/mcp

MCP resources

URI Purpose
cartesi://health Server name, environment, MCP_BASE_URL, read-only flag, capabilities, content policy
cartesi://resources Catalog: index of resource URIs, tool names, prompts, and suggested agent flow
cartesi://resources/{resource_id} Normalized resource metadata
cartesi://docs/{resource_id} Documentation resource view (same shape; non-doc IDs error)
cartesi://docs/routes/{route_id} Single doc route with parent context
cartesi://repositories/{resource_id} Repository sync / freshness metadata
cartesi://collections/tag/{tag} Resources grouped by tag
cartesi://collections/source/{source} Resources grouped by source

MCP tools (registered names)

These are the name= values clients see (Python handler names may differ).

Knowledge

  • summarize_knowledge_base — coverage, counts, orientation
  • get_knowledge_taxonomy — known tag and source titles
  • search_knowledge_resources — search by query, tag, source, kind
  • get_resource_detail — one resource by ID, optional routes
  • list_resource_doc_routes — routes for a documentation resource
  • search_documentation_routes — search routes across resources
  • list_resources_for_tag / list_resources_for_source
  • get_repository_sync_status
  • build_debugging_context — issue-focused bundle of resources and routes

Host-side Cartesi workflow (instructions only)

  • prepare_cartesi_create_command — stable v1.5.x vs alpha v2.0 create guidance
  • prepare_cartesi_build_command
  • prepare_cartesi_run_command
  • send_input_to_application — InputBox + cast templates
  • prepare_erc20_deposit_instructions — ERC20Portal flow
  • prepare_erc721_deposit_instructions — ERC721Portal flow
  • prepare_erc1155_deposit_instructions — ERC1155SinglePortal flow
  • get_cartesi_app_logic_guidance — address-book, portals, vouchers, notices, reports

MCP prompts

  • debug_cartesi_issue — structured debugging using curated knowledge
  • find_cartesi_docs — doc route discovery for a topic
  • explain_repository_context — repository resource + status summary

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选