<!-- DOCS_MCP:stdio-tools -->
# MCP server

Canonical HTML: https://spoolis.com/docs/mcp. This page is also available in machine-readable Markdown.

Run the Spoolis MCP stdio server and call its REST-backed Spool tools.

## Configuration

Run the published package with npx @spoolis/mcp, or run the repository server with npm run mcp. Without SPOOLIS_API_KEY, the server uses the sandbox at SPOOLIS_BASE_URL or https://spoolis.com. With a key, SPOOLIS_API_URL defaults to https://spoolis.com; set it to a local URL for development.

## Tools

Spoolis determines earned value and signs the Outcome Receipt. A wallet, marketplace, payment system, or configured integration may verify and consume it, then act under its own authorization and settlement policy.

In the canonical example, a buyer pays for 100 enrichment records at $1.00 per accepted record. Spoolis accepts 98, rejects 2 with reasons, and signs an Outcome Receipt for $98.00 earned.

## Settlement

The optional built-in path uses a configured settlement adapter. commit_payment asks the adapter to authorize and, where supported, hold. complete_spool only reads an already completed Spool.
