Skip to main content
Glama

cellc-mcp

MCP server wrapping the cellc CellScript compiler so a local agentic model can write CKB Cell contracts in a write → check → explain → inspect loop.

Install

python -m venv .venv && . .venv/bin/activate
pip install -e .

Related MCP server: Rust Coder

Requirements

  • A built cellc binary. Build it once: cd ~/CellScript && cargo install --path . (Needs a sibling ckb-sdk-rust checkout at tag v5.1.0 per CellScript AGENTS.md.)

Configuration (env)

  • CELLC_BIN — path to the cellc binary (else found on PATH)

  • CELLSCRIPT_REPO — CellScript checkout for examples/reference (default ~/CellScript)

  • CELLC_TIMEOUT — per-call timeout seconds (default 30)

MCP client config

{
  "mcpServers": {
    "cellc": {
      "command": "cellc-mcp",
      "env": { "CELLSCRIPT_REPO": "/home/phill/CellScript" }
    }
  }
}

Tools

  • cellc_check — type-check; terse diagnostics (max 5; full=true for all)

  • cellc_explain — explain an error code (E####)

  • cellc_metadata — compiler metadata summary (full=true for schema-30 JSON)

  • cellc_constraints — verifier obligations + runtime-error registry

  • cellc_language_reference — the full language surface, in-context

  • cellc_list_examples / cellc_get_example — example contracts for grounding

Tests

python -m pytest -v                 # offline unit tests
python -m pytest -m needs_cellc -v  # integration (needs cellc)

Available Tools

7 tools
cellc_checkA

Type-check a CellScript contract. Returns ok + diagnostics (terse, max 5; full=true for all).

Inputs: full, path, source, target_profile.

cellc_constraintsC

Verifier obligations + runtime-error registry for a contract. Summary by default.

Inputs: full, path, source, target_profile.

cellc_explainA

Explain a CellScript error code (e.g. E0014) with description and fix hint.

Inputs: code (required).

cellc_get_exampleB

Return one example .cell contract's source for few-shot grounding.

Inputs: name (required).

cellc_language_referenceA

The full CellScript language surface (keywords, effects, worked example).

Inputs: no named parameters. Returns: result

cellc_list_examplesA

List bundled example .cell contracts with one-line summaries.

Inputs: no named parameters. Returns: result

cellc_metadataC

Compiler-emitted metadata: resources, actions, effects, obligations. Summary by default.

Inputs: full, path, source, target_profile.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: type-checking (cellc_check), verifier obligations (cellc_constraints), error explanation (cellc_explain), examples (cellc_get_example, cellc_list_examples), language reference (cellc_language_reference), and metadata (cellc_metadata). No overlap in functionality.

    Naming Consistency3/5

    All tools start with 'cellc_' prefix, but the naming pattern is inconsistent: some use verbs (cellc_check, cellc_explain, cellc_get_example, cellc_list_examples) while others are nouns (cellc_constraints, cellc_language_reference, cellc_metadata). This mixed convention reduces predictability.

    Tool Count5/5

    With 7 tools covering essential aspects of CellScript contract development (checking, constraints, error help, examples, language reference, metadata), the count is well-scoped and appropriate for the domain.

    Completeness4/5

    The tool set covers key workflows: type-checking, error resolution, language reference, and example retrieval. Minor gaps exist (e.g., no tool to fetch a specific example by name or compile a contract), but the core development cycle is supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers