MCP server overview
sextant-mcp is the Model Context Protocol
server that exposes Sextant’s grading engine to agents. It speaks
JSON-RPC 2.0 over either stdio or HTTP and surfaces five tools.
| Tool | Purpose |
|---|---|
grade_diff | Grade just the changed lines. Inner-loop fast. |
grade_files | Grade entire files. Slower, thorough. |
list_rules | List every loaded rule. |
explain_rule | Fetch a rule’s full markdown documentation. |
get_config | Return the resolved Sextant config. |
The schemas come straight from the engine’s
Report /
Verdict types — same data the CLI
returns in --format json.
Transports
Section titled “Transports”stdio (default)
Section titled “stdio (default)”sextant-mcpThe standard MCP transport: JSON-RPC over stdin/stdout, one message per line. Logging goes to stderr. This is what Claude Code, Claude Desktop, and most other MCP clients use.
sextant-mcp --http 127.0.0.1:7878Newline-delimited JSON-RPC over HTTP at the bound address. Each request
is a single POST to /. Useful for clients that don’t speak stdio,
debugging via curl, or running the server as a long-lived daemon.
curl -sS http://127.0.0.1:7878/ \ -H 'content-type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Environment
Section titled “Environment”| Variable | Purpose |
|---|---|
RUST_LOG | tracing env-filter. Defaults to warn. Try RUST_LOG=sextant_mcp=debug while debugging. |
ANTHROPIC_API_KEY | Used by LLM-evaluated rules when [judge] selects an Anthropic model. |
OPENAI_API_KEY | Same, for OpenAI models. |
SEXTANT_NO_LLM | If set to 1, disables LLM evaluators globally — same as the CLI’s --no-llm. |
The server reads .sextant/config.toml and .sextant/rules/**/*.md
from the current working directory’s repository root, just like the
CLI. Run it from the repo root.
Setup guides
Section titled “Setup guides”- Use with Claude Code — easy path is the bundled plugin.
- Use with Claude Desktop — manual config.
Logging
Section titled “Logging”All log output goes to stderr. The stdio transport reserves stdout for the JSON-RPC protocol, so any println! to stdout would corrupt the stream. In HTTP mode, stderr still gets the logs.
For verbose tracing during development:
RUST_LOG=sextant_mcp=debug,sextant_engine=debug sextant-mcpSee also
Section titled “See also”- grade_diff, grade_files, list_rules, explain_rule, get_config — tool reference.
- Claude Code plugin — bundles this server with hooks and skills.
- Configuration — what the server reads.