mcp-server · marchward — Claude Code MCP server: agent action controls
Connect an agent to Marchward to evaluate tool calls against policies and keep an audit trail. Useful when you need approval gates or limits on agent spend.
claude mcp add mcp-server -e MARCHWARD_API_URL=<MARCHWARD_API_URL> -e MARCHWARD_API_KEY=<MARCHWARD_API_KEY> -- npx -y @marchward/mcp-serverWhat mcp-server does
Marchward checks a tool call before it runs and can allow it, block it, or pause for human approval. It also tracks agent spend and appends decisions to a hash-chained audit log that can be verified offline. Decisions account for the resolved action, so a destructive operation is gated even when its tool has an innocuous name.
The MCP server starts through npx and connects to Marchward using MARCHWARD_API_URL and MARCHWARD_API_KEY. Claude Code, Codex, Cursor, GitHub Copilot, and Gemini CLI have setup instructions. You need a Marchward URL and API key to configure this server. The separate local proxy can run without contacting Marchward, but that is not the MCP server setup described here.
What it helps with
- apply policies before agent tool calls run
- pause destructive actions for human review
- block calls that violate an execution policy
- keep an offline-verifiable record of decisions
- track agent spend against a cap
Example prompts for the agent
- Check whether this tool call is allowed by the policy.
- Ask for approval before deleting these records.
- Review the decisions recorded for the agent.
How to install mcp-server
Platform CLI
claude mcp add mcp-server -e MARCHWARD_API_URL=<MARCHWARD_API_URL> -e MARCHWARD_API_KEY=<MARCHWARD_API_KEY> -- npx -y @marchward/mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add marchward-mcp-server --env MARCHWARD_API_URL=<MARCHWARD_API_URL> --env MARCHWARD_API_KEY=<MARCHWARD_API_KEY> -- npx -y @marchward/mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"marchward-mcp-server": {
"command": "npx",
"args": [
"-y",
"@marchward/mcp-server"
],
"env": {
"MARCHWARD_API_URL": "<MARCHWARD_API_URL>",
"MARCHWARD_API_KEY": "<MARCHWARD_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"marchward-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@marchward/mcp-server"
],
"env": {
"MARCHWARD_API_URL": "<MARCHWARD_API_URL>",
"MARCHWARD_API_KEY": "<MARCHWARD_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e MARCHWARD_API_URL=<MARCHWARD_API_URL> -e MARCHWARD_API_KEY=<MARCHWARD_API_KEY> marchward-mcp-server npx -y @marchward/mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-server
How do I install mcp-server in Claude Code?
Run claude mcp add mcp-server -e MARCHWARD_API_URL=<MARCHWARD_API_URL> -e MARCHWARD_API_KEY=<MARCHWARD_API_KEY> -- npx -y @marchward/mcp-server. Replace the placeholders with the Marchward URL and API key.
What does mcp-server do?
It connects an agent to Marchward, which evaluates tool calls before execution. A policy decision can allow a call, block it, or require human approval.
What credentials does the MCP server need?
Configure MARCHWARD_API_URL and MARCHWARD_API_KEY. Marchward’s local proxy is a separate option and can run without a network call to Marchward.
Similar MCP servers
MCP servers catalog →mcp-server by other authors comes first.