Version0.18.0Verifiednot yet verifiedLicenseBSD-3-Clause

sigil-mcp

Library for building MCP clients and servers in Sigil

Report a bug or suggest a feature
Readme

sigil-mcp

Library for building Model Context Protocol clients and servers in Sigil. Provides the server loop, JSON-RPC 2.0 framing, and channel-based message routing primitives so any Sigil project can expose tools and resources to MCP clients.

sigil-cli ships a built-in dev-tools server on top of this library, invoked via sigil mcp serve, which exposes documentation, lint, format, test execution, and nREPL-backed evaluation so AI agents can work idiomatically against a live Sigil project.

Modules

ModulePurpose
(sigil mcp)Top-level re-exports plus package-tool discovery
(sigil mcp server)Server loop, message routing, handler registration
(sigil mcp client)Client lifecycle, correlation, cancellation, events
(sigil mcp protocol)JSON-RPC 2.0 framing and MCP message shapes
(sigil mcp channel)Helpers for channel-based server transports

Building your own MCP server

(import (sigil mcp))

(define server
  (mcp-server name: "my-server" version: "1.0"))

(mcp-server-register-tool! server
  name: "echo"
  description: "Echoes its input back."
  handler: (lambda (args) ...))

(mcp-server-run server)

For a complete example, see sigil-cli's (sigil cli mcp) module or projects like bureau, courier, folio, and minder.

Build and test

sigil deps install
sigil build
sigil test --report

The sigil executable bundles the released MCP modules. When testing local changes to a module that is also built in, add -L src before the command so the checkout takes precedence:

Read the rest
sigil -L src test test/test-protocol.sgl test/test-client.sgl --report

Run unchanged server integration suites through the normal package test path; the current toolchain's source-path override does not expose every private server binding used by those tests:

sigil test test/test-server.sgl test/test-nrepl-tools.sgl test/test-channel.sgl --report

Local development against an unreleased sigil monorepo:

sigil deps install --redirects ./dev-redirects.sgl
sigil build --redirects ./dev-redirects.sgl

License

BSD-3-Clause. See LICENSE in the sigil monorepo for the canonical copy.

Clone

$ git clone https://codeberg.org/sigil/sigil-mcp

Releases

v0.18.0 — latest by version, released 4 Sep 2026

All releases — 17 tags in this repository.

Source

Browse the latest source

One page per file, and every line has a permalink.

Recent commitsAtom

The last 20 commits keep a page here. Everything older lives in the clone.