@nevarn/mcp
v0.2.0
Published
Local stdio MCP server for a Nevarn tenant's agent, over @nevarn/sdk.
Readme
@nevarn/mcp
A local stdio MCP server for a Nevarn tenant's own agent, built on
@modelcontextprotocol/sdk (pinned exactly) and @nevarn/sdk. It is the
tenant's tool, not a UCP transport, and it adds no authority: the agent
proposes intents, never orders or keys. Contract:
docs/strategy/Contract.md; design: docs/workplans/agent-sdk.design.md.
Free to download, under the Apache License 2.0 (LICENSE, NOTICE). Using
the Nevarn platform it calls is licensed on the platform, by governed actions
or by subscription.
{
"mcpServers": {
"nevarn": {
"command": "nevarn-mcp",
"env": { "NEVARN_BASE_URL": "https://<your platform API>", "NEVARN_API_KEY": "nvk_…" }
}
}
}NEVARN_BASE_URL is required (https, or http on loopback). NEVARN_API_KEY
is an nvk_ key; give it the scopes the agent needs (intents, execute,
read, halt, invoices). Give execute only to an agent that should place
orders: in the tenant's Production it trades live funds, within the limits the
owner set on the key. A session token is refused and the server exits with
status 2.
| Tool | Key scope | What it does |
| --- | --- | --- |
| propose_intent | intents | Asks for a shadow ruling on an intent through POST /machine/intents. Nothing is sent to a venue; the result says whether it would have executed and why not. |
| execute_intent | execute | Executes an intent through POST /machine/executions, within the key's limits: a paper fill with shadow rulings in Sandbox, a live order ruled in ENFORCEMENT at the venue in Production. Marked destructive, so clients ask before calling it. |
| get_execution | execute | Reads one execution and its current state through GET /machine/executions/{id}. |
| get_mandate | read | Reads the tenant's bounds through GET /machine/mandate. |
| get_receipt | read | Reads one execution receipt through GET /machine/receipts/{id} (the id is the execution's). |
| halt | halt | Turns all signing off and stops the bots' unfinished executions through POST /machine/halt. There is no resume tool. |
| request_spend | invoices | Files a supplier invoice through POST /machine/invoices; the payables policy decides the outcome. A duplicate is a 409. |
Guarantees
- Tool names, descriptions and schemas are static constants
(
src/Tools.ts, pinned bytest/Tools.json); no remote text is interpolated into them. - Every schema has
additionalProperties: false, including each strategy's intent shape; amounts are integers andvendor_idis a UUID. Arguments outside the schema, and intents carrying anything named like a secret, are refused before any call. - Platform text comes back as JSON data. Errors carry only type, status, code and path - never the upstream message, the request or the key.
- Logs are JSON lines on stderr; stdout is the protocol channel.
Tests
npm test --workspace @nevarn/mcpThe test script builds the SDK and the server (tsc -b) before vitest;
test/Stdio.test.ts spawns the built dist/Main.js over real stdio against a
loopback stand-in for the platform.
Licence and release
Apache License 2.0 (LICENSE; NOTICE names Binaries Fort AB). The licence
covers this server only; the platform's use is licensed on the platform, by
governed actions or subscription.
Publishing stays the owner's: the @nevarn npm scope and the release
workflow. Whether a hosted MCP endpoint is wanted (it would need new ingress)
is still open. The package stays "private": true until the owner releases
it.
