AtlatestRenderedmarkdown
Readme
sigil-mcp
Library for building Model Context Protocol 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
| Module | Purpose |
|---|---|
(sigil mcp) | Top-level re-exports plus package-tool discovery |
(sigil mcp server) | Server loop, message routing, handler registration |
(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
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.