Control-PromotionMCP
Portable governance control-promotion CLI and MCP server.
README
control-promotion-mcp
Portable governance control-promotion CLI and MCP server.
This repository turns recurring engineering experience into a structured control lifecycle:
raw evidence
-> reusable observation
-> docs / Skill / scoped AGENTS
-> static guard / QA harness
-> type, schema, or contract prevention
-> retired guard
The package has three layers:
control_promotion # deterministic core and CLI
control_promotion_mcp # read-only MCP server
.control-promotion.yaml # project adapter
Why MCP
MCP lets a server expose callable tools, readable resources, and reusable prompts over JSON-RPC. The 2025-06-18 specification defines stdio and Streamable HTTP transports; stdio messages are newline-delimited JSON-RPC, and Streamable HTTP uses POST requests to a single MCP endpoint. This server follows that model for a read-only governance control plane.
References:
- https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle
- https://modelcontextprotocol.io/specification/2025-06-18/basic/transports
- https://modelcontextprotocol.io/specification/2025-06-18/server/tools
- https://modelcontextprotocol.io/specification/2025-06-18/server/resources
- https://modelcontextprotocol.io/specification/2025-06-18/server/prompts
Install
pip install control-promotion-mcp
For local development:
python -m venv .venv
. .venv/bin/activate
pip install -e .
CLI
control-promotion inspect --project-root .
control-promotion validate-adapter .control-promotion.yaml
control-promotion validate-catalog references/smell-catalog.yaml
control-promotion route \
--failure-class frontend_semantic_metric_without_source \
--detectability static \
--recurrence repeated \
--harm high
control-promotion review --candidate candidate.yaml --format markdown
Candidate file:
candidate_text: |
frontend-metric-source-guard prevents hard-coded semantic KPI literals.
evidence:
paths:
- scripts/quality/check_frontend_metric_source_guard.py
commands:
- bash scripts/quality/run_frontend_metric_source_guard.sh --mode ci
context:
recurrence: repeated
harm: high
MCP stdio
{
"mcpServers": {
"control-promotion": {
"command": "control-promotion-mcp",
"args": [
"--project-root",
".",
"--adapter",
".control-promotion.yaml",
"--mode",
"stdio"
]
}
}
}
MCP HTTP
control-promotion-mcp \
--project-root . \
--adapter .control-promotion.yaml \
--mode http \
--host 127.0.0.1 \
--port 8765
The V1 HTTP server exposes POST /mcp and returns one JSON response. It binds to localhost by default and rejects non-local Origin headers. It intentionally does not expose write tools.
Exposed MCP Tools
inspect_projectevaluate_control_candidateroute_control_destinationvalidate_smell_catalogvalidate_project_adapterrender_smell_gate_reportcheck_ssot_links
Exposed MCP Resources
control://laddercontrol://routing-matrixcontrol://smell-rubriccontrol://proof-obligationscontrol://retirement-policycatalog://basecatalog://projectadapter://projecttemplate://smell-gate-report
Exposed MCP Prompts
review-control-candidatepromote-experienceretire-guard
Project Adapter
Every consuming repository should keep project-specific paths and policies in .control-promotion.yaml instead of forking this server. The adapter expresses:
- project type
- AGENTS, Skill, docs, quality, QA, and generated paths
- SSOT links
- baseline quality commands
- routing overrides
- generated artifact and write-tool policies
Safety Model
V1 is read-only. It can inspect files, validate catalogs/adapters, classify candidates, and render reports. It does not write repository files, run arbitrary project commands, or mutate governance rules through MCP.
Future write tools should remain disabled by default, require explicit path scopes, forbid generated and secret paths, and return diffs plus verification commands before applying changes.
Development
python -m unittest discover -s tests
PYTHONPATH=src python -m control_promotion.cli validate-adapter .control-promotion.yaml
PYTHONPATH=src python -m control_promotion.cli validate-catalog references/smell-catalog.yaml
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。