Wraps the WorkspaceGuard CLI as a single generic MCP tool for workspace usage checks.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Install β’ Quickstart β’ CLI Reference β’ Comparison β’ FAQ
Per-workspace usage metering and fail-closed quota caps for one shared self-hosted AI assistant deployment (Odysseus or a compatible backend).

Run Odysseus (or a compatible self-hosted assistant) for your household or small team and there's no way to see who sent how many messages this month, or to stop one person's usage from burning through everyone else's API budget. WorkspaceGuard is a sidecar that adds that layer: per-workspace message counts, an optional monthly cap that fails closed, and a CLI (or JSON) report an admin or another agent can read.
Or run it without installing:
The package is workspaceguard-cli; the command it installs is workspaceguard. A genuine, independent Python port with the same CLI surface and --json shapes is published separately as workspaceguard-cli on PyPI (pip install workspaceguard-cli, see python/).
Real output from a fresh install:

chat() entry point increments a per-workspace, per-month counter (src/core/usage.ts), isolated so one workspace's usage never leaks into another's.QuotaExceededError before the backend is ever called. If the usage store is corrupted or unreadable, WorkspaceGuard blocks requests instead of silently resetting everyone's count to zero (see CHANGELOG.md).--json on every command. workspaceguard usage --json returns structured output an orchestrator can parse directly, no screen-scraping.workspaceguard rotate-key <id> re-encrypts a workspace's secrets under a new key and invalidates the old ciphertext.chat() in src/core/isolation-guard.ts is the single place every request flows through: resolve workspace, check quota, call backend, record usage.Every command accepts --json for a structured, agent-native output shape instead of the human-readable text shown below.
| Command | What it does |
|---|---|
workspaceguard init | Initializes the data directory and vault for this deployment. |
workspaceguard add-workspace <id> --identity <value> | Registers a workspace, idempotent on repeat calls for the same id. --identity is parsed positionally and must immediately follow <id>; it is not a free-standing flag. |
workspaceguard status [--json] | Lists configured workspaces. |
workspaceguard usage [--json] | Per-workspace message count, cap, and percent-used for the current month. |
workspaceguard set-cap <id> <count|none> | Sets or clears a workspace's monthly message cap. |
workspaceguard rotate-key <id> | Rotates a workspace's vault encryption key (invalidates the old ciphertext). |
workspaceguard scan [--json] | Isolation config scan (scaffold stub, carried over from the original build; always returns an empty finding list today). |
workspaceguard -h, --help | Prints the command list above and exits 0. |
workspaceguard -V, --version | Prints the installed package version and exits 0. |

| Option | What it does |
|---|---|
--data-dir <path> | Data directory for config, vault, and usage data. Takes precedence over WORKSPACEGUARD_DATA_DIR. |
--force | init only: regenerate the master key even if an existing key file at the resolved data dir looks corrupted or truncated. |
--json | Structured, agent-native output instead of human-readable text. |
[!WARNING]
--forcepermanently invalidates anything already encrypted under the old master key. Only use it when the existing key file is confirmed unrecoverable.
Data directory resolution, in order: --data-dir flag, then WORKSPACEGUARD_DATA_DIR env var, then ~/.workspaceguard. This used to default to the current working directory with no override -- running init from the wrong shell could silently write a live encryption key into an unrelated directory. init on an existing, valid key is idempotent (it loads and reuses that key); init on a key file that exists but doesn't decode to a valid key refuses to overwrite it without --force.
The --json mode is what makes this agent-native rather than just human-convenient: an orchestrator or monitoring agent can call workspaceguard usage --json and parse the result directly instead of scraping terminal output.
The Python port exposes the same shape: from workspaceguard import create_workspace_guard, MockAdapter, QuotaExceededError.
WorkspaceGuard's Python distribution ships a Model Context Protocol server, so an MCP-compatible agent (Claude Desktop, Claude Code, an orchestrator) can call WorkspaceGuard directly as a tool instead of shelling out to the CLI and parsing text.
It exposes one tool, run, a generic subprocess wrapper: pass it the same argument list you'd pass on the command line, and it shells out to the installed workspaceguard binary, parses the resulting JSON, and returns it. Every failure mode (missing binary, launch error, timeout, non-zero exit, unparseable output) comes back as a plain {"error": ...} dict instead of raising, so a bad call can't crash the server.
To register it with an MCP-compatible client such as Claude Desktop, add it to the client's server config:
This assumes workspaceguard-mcp is already on PATH (installed via the mcp extra above). If you installed it somewhere else, replace "command" with the full path to the console script.
WorkspaceGuard is a sidecar, not a competing product. It sits in front of an Odysseus deployment (or a compatible backend) and adds the one layer that backend doesn't provide.
| Capability | WorkspaceGuard | Odysseus (native) |
|---|---|---|
| Per-user isolation (chat history, memory, API keys) | Not reimplemented; treated as already solved | Yes, built in by default |
| Per-workspace message counting | Yes | No |
| Monthly quota caps, fail-closed | Yes | No |
CLI / --json usage report | Yes | No |
| License | MIT | AGPL-3.0 |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/workspaceguard)<a href="https://allmcps.com/mcp/workspaceguard"><img src="https://allmcps.com/api/badge/workspaceguard?style=directory" alt="Workspaceguard on AllMCPs" /></a>