unified-ai-systemBLOCK
Self-hosted model routing gateway and agent control plane for OpenAI, Anthropic, Gemini and A2A agents behind one OpenAI-compatible API, protocol-first. MCP server security, governed tools, prompt enhancement, virtual-key budgets, cache, observability, audit chain and agent governance. Zero-key loca
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Open-source AI gateway for deterministic prompt enhancement, governed execution, and reproducible verification.
English | zh-CN | Project Site
<img src="docs/assets/readme-hero.png" alt="Unified AI System — self-hosted AI gateway: one governed boundary for models, agents, tools, budgets and evidence, with four release gates and zero credentials to start" width="100%" />
Unified AI System turns a rough request into a structured, reviewable prompt before execution. It gives
a44fb804e4bbOBSERVED · 2026-10-10Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-server:0.8.0 --env AI_GATEWAY_MCP_AUTH_TOKEN=${AI_GATEWAY_MCP_AUTH_TOKEN} -- docker run -i --rm ghcr.io/happy520ai/unified-ai-system/mcp-server:0.8.0:NoneExposed tools (83)
65 read · 18 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Documentation | read | Plan user docs, manuals, or API docs with structure, examples, and acceptance criteria. |
LocalRunner | read | 在当前进程内执行任务(用于开发/测试环境) |
SubProcessRunner | read | 在独立子进程中执行任务(用于生产环境,提供进程级隔离) |
a | read | A |
add-function | write | Add a new exported function to an existing module. The function must be |
add-test | write | Write comprehensive tests for an existing function or module that |
agent_governance_describe | read | |
agent_governance_list | read | List only the governed Agents visible to the Gateway-authenticated tenant. The tool accepts no tenant or owner override. |
agent_governance_status | read | Inspect Agent Governance status through the authenticated Gateway identity. The tool accepts no tenant override and fails closed when that identity is not authorized for platform status. |
alpha | read | a |
ast_edit | write | AST-aware code editor that understands scope. Supports: rename_identifier (scope-safe rename avoiding strings/comments), extract_function (extract lines into a function), wrap_in_condition, wrap_in_try. Safer than string replacement for identifiers. |
audit_events | read | Immutable audit log |
b | read | B |
beta | read | b |
c | read | C |
code_format | read | Format code in a file. Supports JavaScript/TypeScript with basic formatting: consistent indentation (2 spaces), trailing newline, remove trailing whitespace, normalize line endings. Does NOT require external tools like prettier. |
code_run | write | 在显式配置的隔离容器中执行 JavaScript。需要 code:run 权限;未配置隔离后端时拒绝执行。无网络、无项目文件挂载,不在宿主进程运行代码。 |
custom_attested_read | read | attested read |
custom_unattested_read | read | unattested read |
custom_undeclared_write | write | undeclared write |
custom_without_permission | read | missing permission |
d | read | e |
documented_tool | read | Reads one record by id. Use |
explain-code | read | Produce a human-readable explanation of what a piece of code does. |
external_denied_result | read | Test denial signaling |
external_missing_context | read | Test missing irreversible context |
external_test | read | Test irreversible effect |
file_insert | write | Insert new content at a specific line number in a file. Useful for adding new functions, imports, or sections. |
file_read | read | Read a file |
file_read_probe | read | probe |
file_write | write | 写入或覆盖文件内容。需要 file:write 权限。会自动创建父目录。内容限制 50MB。 |
fix-bug | read | Fix a known bug described in a comment or failing test. The fix must |
fixture_write | write | Write only the owned fixture |
gateway-response | read | Fake-provider output from Unified AI System. |
gateway_chat | read | |
gateway_health | read | Inspect gateway health, provider mode, and the real-provider safety flag. |
gateway_prompt_enhance | read | |
gateway_prompt_enhance_llm | read | |
gateway_readiness | write | Inspect first-run readiness for chat and the local gateway runtime. |
generate_test | read | Generate a basic test scaffold for a JavaScript/TypeScript source file. Analyzes the file for exported functions and creates a test file using node:test. The generated test imports the source and creates one test case per exported function. |
get_weather | read | Get weather |
git_branch | write | List, create, or switch branches. Use for branch management operations. |
git_commit | write | Stage files and create a commit. Always review changes with git_diff before committing. |
git_create_pr | write | Create a Pull Request using the GitHub CLI (gh). Requires gh to be installed and authenticated. The current branch will be used as the head branch. |
git_diff | read | Show differences between working tree and index, between commits, or between branches. Use this to review changes before committing. |
git_log | write | Show commit history. Returns structured commit information including hash, author, date, and message. |
git_push | write | Push commits to a remote repository. This is a dangerous operation that requires explicit approval. Always verify with git_status and git_log before pushing. |
git_status | read | Show the working tree status. Returns modified, staged, untracked, and branch information. |
glob | read | Fast file pattern matching tool. Returns matching file paths sorted by modification time. Supports glob patterns like |
governed_budget_probe | read | governed sanitizer budget probe |
governed_effect_probe | read | committed effect audit probe |
governed_key_probe | read | governed key sanitizer probe |
governed_output_probe | read | governed output probe |
grep | read | A powerful content search tool using regular expressions. Searches file contents and returns matching lines with optional context. Use this to find code patterns, function usages, imports, etc. |
image_read | read | Read an image file and return it as visual context. The image will be included in the response for visual analysis. |
knowledge_readiness | read | Inspect the gateway knowledge infrastructure without loading or changing data. |
knowledge_retrieve | read | |
lookup | read | Look up the fixture |
lsp_definition | read | 查找符号定义(跳转到定义)。给定文件路径和行列位置,返回符号的定义位置。 |
lsp_hover | read | 获取符号类型信息和文档。返回 hover 信息,包括类型签名、JSDoc/docstring 等。 |
lsp_references | read | 查找符号引用。返回符号在项目中被使用的所有位置。 |
lsp_symbols | read | 列出文件中的所有符号(函数、类、变量等)。返回文档符号的层次结构。 |
ops__create_ticket | write | Create a ticket |
read_file | read | Read one file |
recorded_search | read | test |
refactor | read | Refactor existing code to use a specified pattern (e.g. replace |
s | read | d |
semantic_search | read | Semantic code search using TF-IDF scoring over code files. Finds code chunks most relevant to a natural language query. Use for |
shell_exec | write | 执行 shell 命令。需要 shell:exec 权限。命令会被分类标记风险等级。 |
strat | read | desc |
test | read | x |
test_tool | read | A test |
type_check | write | Run TypeScript type checking on a file or project. Uses |
web_fetch | read | 获取 URL 的网页内容并提取文本。需要 network:fetch 权限。 |
web_search | read | Search the web for up-to-date information, documentation, API references, tutorials, and more. Returns titles, URLs, and snippets. |
workflow_actions | read | List workflow action definitions without invoking any action. |
workflow_executions | read | Execution records |
workflow_health | read | Inspect the governed workflow subsystem without starting a workflow. |
workflow_run | write | |
workflows | read | Workflow definitions |
workforce-analysis | read | Workforce role-based analysis from Unified AI System. |
workforce_agents | read | List configured workforce agent descriptors without dispatching them. |
workforce_health | read | Inspect the workforce subsystem without planning or executing work. |
Trust audit
BLOCKgrade F · trust 38/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (10 observation(s))
- Network
- declared (16 observation(s))
- Shell
- declared (6 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
{ pattern: /eval\s*\(/, label: "禁止 eval()" },message: "Code contains eval() which is a security risk",
name: 'eval() usage',
message: 'eval() usage is dangerous and may allow code injection.',
name: 'eval()/exec() usage',
".netrc", ".git-credentials", "credentials", "credentials.json", "auth.json", "evidence"]);
const PROTECTED = new Set(['.git', '.gitattributes', '.gitmodules', '.gitconfig', '.forge', '.mcp.json', '.ssh', '.aws', '.azure', '.gcp', '.npmrc', '.netrc', '.git-credentials', 'credentials', 'crede
/\.netrc/i,
".netrc", ".git-credentials", "credentials", "credentials.json", "auth.json", "evidence"]);
const sensitivePathPattern = /(^|[/\\])(\.env|\.npmrc|\.netrc|id_rsa|id_ed25519)(\.|$|[/\\])/i;
if (ip === "metadata.google.internal" || ip === "metadata" || ip === "instance-data") return true;
if (ip === "metadata.google.internal" || ip === "metadata" || ip === "instance-data") return true;
"metadata.google.internal", "metadata.google",
"169.254.169.254", // AWS/GCP metadata
console.log("NOTE api.github.com leg ran " + (TOKEN ? "authenticated (job token present)" : "anonymous (60 reads/hour per IP; set GH_TOKEN)"));{ path: "Data exfiltration via http_request step", actor: "Editor role user", scenario: "Targets internal services to exfiltrate data", mitigation: "URL allowlist; block internal IPs; egress filteringregex: /\b(send|post|transmit|forward|exfiltrate)\s+(this\s+)?(data|content|response|output|conversation)\s+(to|at)\s+(https?:\/\/|[\w.-]+\.\w{2,})/i,category: 'data-exfiltration',
category: 'data-exfiltration',
category: 'data-exfiltration',
AI_GATEWAY_SERVICE_URL=http://127.0.0.1:3100
# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4318/v1/traces
AI_GATEWAY_CORS_ALLOWED_ORIGINS=http://127.0.0.1:3100,http://localhost:3100
AI_GATEWAY_SERVICE_URL=http://127.0.0.1:3100
# AI_GATEWAY_LOCAL_CLIENT_LOOPBACK_ENDPOINT=http://127.0.0.1:43120
Gates applied: no_behavioural_pass.
a44fb804e4bbfull audit observations/trust-audit/mcp-server/happy520ai__unified-ai-system.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | a44fb804e4bb | BLOCK | F | 38 | first audit |
Questions
What is the unified-ai-system MCP server?
Self-hosted model routing gateway and agent control plane for OpenAI, Anthropic, Gemini and A2A agents behind one OpenAI-compatible API, protocol-first. MCP server security, governed tools, prompt enhancement, virtual-key budgets, cache, observability, audit chain and agent governance. Zero-key loca
What tools does unified-ai-system expose?
83 in total: 65 read-only, 18 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is unified-ai-system safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (38/100) and found 14 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does unified-ai-system need?
It reads AI_GATEWAY_MCP_AUTH_TOKEN, ANTHROPIC_API_KEY, API_KEY, AUTH_TOKEN_SECRET, BAI_API_KEY, BRAVE_SEARCH_API_KEY, ENCRYPTION_MASTER_KEY, FORGE_CONTAINER_SECRET_CANARY, FORGE_MAX_TOKENS, FORGE_SANDBOX_SECRET_CANARY, GEMINI_API_KEY and GH_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does unified-ai-system run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @unified-ai-system/workforce-scheduler at 0.1.0.
How current is this page?
The grade is for one exact copy of the source (a44fb804e4bb), read on 2026-10-10. The repository is watched and re-audited when it changes.