convez.ai
MCP ServerIntegração & APIsIntermediário
VtronTokito

Tokito MCP — Catálogo KiCad via Protocol de Contexto de Modelo

VtronTokito/tokito-mcp

Acesso programático ao catálogo KiCad para agentes LLM e APIs REST

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server que expõe a biblioteca de símbolos KiCad do CERN (~22.7k símbolos) através do Protocol de Contexto de Modelo, permitindo agentes LLM buscarem, filtrarem e resolverem símbolos eletrônicos com herança de componentes. Também oferece REST API para clientes não-MCP, com busca FTS5, resolução de extends-chains e filtro por pinagem/footprint.

Instalação

$npx convez-ai VtronTokito/tokito-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 1 dia
Versão
v0.1.9
Issues abertas
17
Contribuidores
1

Casos de uso

  • Assistentes LLM buscarem símbolos eletrônicos por descrição em projetos KiCad
  • Automação de design eletrônico filtrando componentes por pinos e padrão de footprint
  • Integração de bancos de símbolos em ferramentas de desenvolvimento de hardware

Veredito

Solução robusta em Rust para expor dados estruturados de engenharia eletrônica. MCP + REST dual-face é prático, mas a documentação de deployment e exemplos de clientes reais ajudaria adoção.

README

A tradução para o português deste README ainda está na fila.

tokito-mcp

A KiCad symbol catalog as an MCP server — and a REST API on the same body.

tokito-mcp packs CERN's kicad-symbols library into a single SQLite artifact and serves it over two faces:

  • MCP (POST /mcp) — streamable HTTP JSON-RPC for LLM agents.
  • REST (GET /v1/*) — the same queries for humans and non-MCP clients.

Both faces hit the same in-process store: ~22.7k symbols across 220+ libraries, with extends-chains resolved (a child symbol's body comes back fully merged with its parent) and FTS5-ranked search.

Workspace

crates/
  symbols/   # shared lib: SQLite schema, FTS5 search, extends resolver, postcard body decode
  server/    # axum: REST routes + rmcp MCP service over /mcp
  pack/      # CLI: walk kicad-symbols → emit symbols.sqlite + manifest.json + build.log

The server is read-only. pack is the only writer.

Quick start

Docker

docker pull ghcr.io/vtrontokito/tokito-mcp:latest
docker run -p 8090:8090 ghcr.io/vtrontokito/tokito-mcp:latest
curl http://localhost:8090/v1/health

The image bakes in symbols.sqlite — no volume mount needed.

From source

Prereqs: Rust 1.88+. sqlite3 is bundled via rusqlite's bundled feature (no system dep).

# 1. Build the binaries
cargo build --release

# 2. Build the artifact from a checkout of CERN's kicad-symbols
git clone https://gitlab.com/kicad/libraries/kicad-symbols
cargo run --release -p tokito-mcp-pack -- \
    --src ./kicad-symbols \
    --out ./symbols.sqlite \
    --source-commit "$(git -C kicad-symbols rev-parse HEAD)"

# 3. Serve it
cargo run --release -p tokito-mcp-server -- --db ./symbols.sqlite

# 4. Smoke test
./scripts/smoke.sh

scripts/smoke.sh exercises every REST endpoint and every MCP tool against the running server. Override the target with TOKITO_MCP_URL=http://host:port.

MCP face

Endpoint: POST /mcp (streamable HTTP JSON-RPC, mcp-session-id header).

Four tools:

ToolPurpose
search_symbolsFTS5 ranked search across symbol name, description, keywords ({query, limit})
get_symbolFetch a symbol by {lib, name} with its parent's body merged in
list_librariesEnumerate the ~220 libraries in the artifact
find_compatiblePin-count and footprint-pattern filter ({pins, fp_pattern, query?, limit?})

Example client config (Claude Desktop or any MCP client supporting streamable HTTP):

{
  "mcpServers": {
    "tokito": {
      "url": "http://127.0.0.1:8090/mcp"
    }
  }
}

REST face

All under /v1, all JSON:

EndpointReturns
GET /v1/healthok
GET /v1/manifest{schema_version, source_commit, symbol_count, lib_count, generated_at}
GET /v1/libraries[{lib, symbol_count}, …]
GET /v1/libraries/:lib/symbols?limit&offsetPaginated symbol list
GET /v1/search?q=&limit=FTS5 search (bad_request on empty query)
GET /v1/symbols/:lib/:nameFull symbol with extends resolved (404 if missing)
GET /v1/compatible?pins=&fp_pattern=&query=&limit=Pin+footprint filter (bad_request if no filter)

Errors are typed: {"error": {"code": "bad_request" | "not_found" | ..., "message": "..."}}.

Configuration

tokito-mcp-server:

FlagEnvDefaultPurpose
--dbTOKITO_MCP_DB(required)Path to symbols.sqlite
--addrTOKITO_MCP_ADDR127.0.0.1:8090Bind address
--cacheTOKITO_MCP_CACHE2048Per-process resolved-symbol LRU capacity

Tracing: RUST_LOG=tokito_mcp_server=debug,tower_http=debug cargo run ....

Artifact format

symbols.sqlite is a self-contained SQLite database. Schema lives in crates/symbols/src/schema.sql. Symbol bodies (pins, graphics, fp_filters) are stored as compact postcard blobs decoded lazily; an FTS5 virtual table backs search_symbols. The pack CLI also accepts --slim-out to emit a metadata-only variant (body columns NULLed) for desktop bundles that don't need geometry.

Alongside symbols.sqlite, pack writes:

  • manifest.json — {schema_version, source_commit, symbol_count, lib_count, generated_at, generator_version}
  • build.log — ingest errors, dangling extends references, top libraries by symbol count

Performance notes

  • The resolver caches fully-resolved (extends-merged) symbols in a moka LRU. The default --cache 2048 covers the working set for typical agent workloads.
  • FTS5 search is single-digit ms on the bundled artifact; find_compatible filters scale linearly in matches but cap at limit.
  • The server is single-process, single-DB, no auth — bind it to localhost or put it behind a reverse proxy if you need either.

Source data

The artifact is built from CERN's kicad-symbols repository. pack records the source git SHA in meta.source_commit and stamps it into manifest.json so any served artifact is fully traceable to an upstream commit.

License

MIT — see LICENSE. The bundled symbol artifact derives from upstream KiCad libraries and inherits their license terms.

Ver o original no GitHub

Bom para

Relacionados