GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者提供的说明(英文原文)
Wraps the WorkspaceGuard CLI as a single generic MCP tool for workspace usage checks.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"workspaceguard": {
"command": "uvx",
"args": [
"workspaceguard-cli",
"workspaceguard-mcp"
]
}
}
}在终端中运行这条命令
claude mcp add workspaceguard -- uvx workspaceguard-cli workspaceguard-mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"workspaceguard": {
"command": "uvx",
"args": [
"workspaceguard-cli",
"workspaceguard-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"workspaceguard": {
"type": "stdio",
"command": "uvx",
"args": [
"workspaceguard-cli",
"workspaceguard-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 RudrenduPaul 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.6)于3个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:GitHub, Desktop Commander, Cloudflare MCP
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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.
npx workspaceguard-cli usage
-> alex [alex@example.com]: 812 messages this period, cap 1000 (81%) -> jordan [jordan@example.com]: 203 messages this period, cap unlimited
npm install -g workspaceguard-cli
Or run it without installing:
npx workspaceguard-cli usage
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/).
# Register the workspaces sharing one deployment (identity = the header value
workspaceguard add-workspace alex --identity alex@example.com workspaceguard add-workspace jordan --identity jordan@example.com
workspaceguard set-cap alex 1000
workspaceguard usage
Real output from a fresh install:
-> alex [alex@example.com]: 0 messages this period, cap 1000 (0%)
-> jordan [jordan@example.com]: 0 messages this period, cap unlimited
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).workspaceguard usage --json returns structured output an orchestrator can parse directly, no screen-scraping.workspaceguard rotate-key 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 --identity | Registers a workspace, idempotent on repeat calls for the same id. --identity is parsed positionally and must immediately follow ; 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 | Sets or clears a workspace's monthly message cap. |
workspaceguard rotate-key | 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 | 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.
$ workspaceguard usage --json
{"ok":true,"usage":[{"workspaceId":"alex","identity":"alex@example.com","monthlyMessageCap":1000,"percentUsed":81,"period":"2026-07","messageCount":812,"estimatedBytes":48213}]}
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.
import { createWorkspaceGuard, MockAdapter, QuotaExceededError } from "workspaceguard-cli";
const guard = await createWorkspaceGuard({ dataDir: "./data", backend: new MockAdapter() }); await guard.addWorkspace("alex", "alex@example.com"); await guard.setCap("alex", 1000);
try { await guard.chat("alex@example.com", "hello"); } catch (err) { if (err instanceof QuotaExceededError) { // alex is over their monthly cap } }
const report = await guard.usageReport();
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.
pip install "workspaceguard-cli[mcp]"
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.
run(args=["usage", "--json"])
To register it with an MCP-compatible client such as Claude Desktop, add it to the client's server config:
{
"mcpServers": { "workspaceguard": { "command": "workspaceguard-mcp" } } }
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 |
This project originally set out to add per-user workspace isolation (separate chat history, memory, API keys) to a self-hosted AI chat platform. A feasibility spike found that Odysseus already enforces per-user ownership on chat history, memory, and API tokens by default, so building a competing isolation layer would have duplicated work Odysseus already does correctly.
WorkspaceGuard instead keeps its tested isolation engine (namespace separation, an AES-256-GCM vault with real key rotation, fail-closed identity resolution, a self-healing circuit breaker) as the identity-resolution substrate, and builds the layer Odysseus doesn't provide: usage metering and quota enforcement per workspace.
Free tier (this repo, MIT): per-workspace message counting, monthly cap enforcement, a CLI/JSON usage report. Not in this repo: a hosted, multi-tenant billing dashboard is a separate, closed-source product, mentioned here only as a roadmap item and never merged into this MIT codebase.
src/core/isolation-guard.ts -- the single choke point (chat()) every request flows through: resolve workspace, check quota, call backend, record usage.src/core/usage.ts -- the usage-metering engine this project adds: per-workspace, per-month counters with automatic period rollover, and QuotaExceededError enforcement.src/core/vault.ts, src/core/namespace.ts, src/core/circuit-breaker.ts -- the original isolation-engine code, kept as the identity and workspace-boundary substrate the metering layer reads from.src/adapters/ -- the BackendAdapter interface. MockAdapter is the only implementation today; a real Odysseus HTTP adapter has not been built yet.Backend-specific behavior never enters src/core/ directly. Everything goes through BackendAdapter.
WorkspaceGuard trusts an upstream identity header (default: Cf-Access-Authenticated-User-Email) to resolve the workspace.
[!WARNING]
This service must never be directly reachable from the network. Only r
只显示了开头部分;其余内容请在仓库中阅读