Commit723970a5Recorded25 Apr 2026Repositorysigil-mcp
Reframe as a library for building MCP servers in Sigil
Message
The repo had been described and README'd as 'an MCP server for Sigil development' but its primary purpose is the server-loop + protocol + channel-routing library that other Sigil projects build their own MCP servers on (bureau, courier, folio, minder, tally). The bundled dev-tools server invoked via 'sigil mcp serve' is just one consumer.
Changed
README.md | 47 ++++++++++++++++++++++++-----------------------
package.sgl | 10 ++++++----
2 files changed, 30 insertions(+), 27 deletions(-)Diff
README.mdmodified
@@ -1,38 +1,39 @@
1
# sigil-mcp 2
−3
Model Context Protocol server for−4
[Sigil](https://codeberg.org/sigil/sigil). Exposes documentation,−5
procedure discovery, code linting, formatting, test execution, and−6
nREPL-backed evaluation as MCP tools and resources, so AI agents can−7
write idiomatic Sigil code against a live project.+3
Library for building Model Context Protocol servers in+4
[Sigil](https://codeberg.org/sigil/sigil). Provides the server loop,+5
JSON-RPC 2.0 framing, and channel-based message routing primitives so+6
any Sigil project can expose tools and resources to MCP clients. 7
−9
Invoked through `sigil mcp serve` (registered as a subcommand of−10
sigil-cli).+8
sigil-cli ships a built-in dev-tools server on top of this library,+9
invoked via `sigil mcp serve`, which exposes documentation, lint,+10
format, test execution, and nREPL-backed evaluation so AI agents can+11
work idiomatically against a live Sigil project. 12
13
## Modules 14
−14
| Module | Purpose |−15
|-----------------------------|-------------------------------------------------------------|−16
| `(sigil mcp)` | Top-level `mcp-serve` entry point and re-exports |−17
| `(sigil mcp server)` | Server loop, message routing, handler registration |−18
| `(sigil mcp protocol)` | JSON-RPC 2.0 framing and MCP message shapes |−19
| `(sigil mcp channel)` | Helpers for building channel-based MCP servers |−20
| `(sigil mcp tools)` | Built-in MCP tool implementations (docs, format, test, ...) |−21
| `(sigil mcp nrepl)` | MCP tools backed by an attached nREPL session |−22
| `(sigil mcp resources)` | MCP resource providers (docs, package metadata) |−23
| `(sigil mcp lint)` | Code linting surface exposed as an MCP tool |−24
| `(sigil mcp commands)` | `sigil mcp` CLI subcommand registration |+15
| Module | Purpose |+16
|-------------------------|---------------------------------------------------------------|+17
| `(sigil mcp)` | Top-level `mcp-serve` plus re-exports for the bundled server |+18
| `(sigil mcp server)` | Server loop, message routing, handler registration |+19
| `(sigil mcp protocol)` | JSON-RPC 2.0 framing and MCP message shapes |+20
| `(sigil mcp channel)` | Helpers for channel-based server transports |+21
| `(sigil mcp tools)` | Built-in dev-tools (docs, format, test, ...) |+22
| `(sigil mcp nrepl)` | Dev-tools backed by an attached nREPL session |+23
| `(sigil mcp resources)` | Resource providers (docs, package metadata) |+24
| `(sigil mcp lint)` | Code linting surface as an MCP tool |+25
| `(sigil mcp commands)` | `sigil mcp` CLI subcommand registration | 26
−26
## Usage+27
## Building your own MCP server 28
29
```scheme−29
(import (sigil mcp))+30
(import (sigil mcp server)+31
(sigil mcp protocol)) 32
−31
;; Start the MCP server (reads from stdin, writes to stdout)−32
(mcp-serve)+33
;; Define your tools, register handlers, then run the server loop. 34
``` 35
−35
Or from the command line via sigil-cli:+36
## Running the bundled dev-tools server 37
38
``` 39
sigil mcp servepackage.sglmodified
@@ -1,12 +1,14 @@
−1
;;; sigil-mcp - Model Context Protocol server for Sigil+1
;;; sigil-mcp - Library for building Model Context Protocol servers in Sigil 2
;;;−3
;;; Enables AI agents to write idiomatic Sigil code by providing−4
;;; documentation, procedure discovery, and development tools.+3
;;; Provides the server loop, JSON-RPC 2.0 framing, and channel-based+4
;;; message routing primitives so any Sigil project can expose tools+5
;;; and resources to MCP clients. sigil-cli ships a built-in dev-tools+6
;;; server on top of this library, invoked via `sigil mcp serve`. 7
8
(package 9
name: "sigil-mcp" 10
version: "0.13.1"−9
description: "MCP server for AI-assisted Sigil development"+11
description: "Library for building MCP servers in Sigil" 12
url: "https://codeberg.org/sigil/sigil-mcp" 13
license: "BSD-3-Clause" 14
authors: (list "David Wilson <[email protected]>")