rsigma-mcp

A Model Context Protocol server that exposes the rsigma toolchain (parse, lint, validate, evaluate, convert, fields, pipelines, ADS authoring) as MCP tools for AI agents. Built on rmcp, the official Rust MCP SDK.

When to use

  • You are wiring rsigma into an MCP client (Cursor, Claude Code) — use the rsigma mcp serve command, which embeds this crate.
  • You are building your own agent host and want to serve the rsigma tool surface from your binary — depend on this crate and call serve_stdio.

For the end-to-end workflow, client setup, and the tool reference with example calls, see the MCP server guide.

Install

[dependencies]
rsigma-mcp = "0.18.0"

Public surface

Item Purpose
RsigmaMcp::new(root, lint_config, allow_sigma_cli) Build the handler with an optional default root for relative path-based tool calls, a lint configuration, and the sigma-cli delegation switch for convert_rules (pass false to keep conversion native-only).
RsigmaMcp::default() A handler with no root, default lint configuration, and delegation disabled.
serve_stdio(handler) Serve the handler over stdio, blocking until the client disconnects. The caller owns the tokio runtime.

The handler implements rmcp::ServerHandler, so it can also be served over any rmcp transport.

Minimum example

use rsigma_mcp::RsigmaMcp;
use rsigma_parser::LintConfig;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let handler = RsigmaMcp::new(None, LintConfig::default(), false);
    rsigma_mcp::serve_stdio(handler).await
}

See also