
Agentkit
io.github.Yacine-ai-tech由 GitHub 账号 Yacine-ai-tech 发布v0.1.18更新于 Oct 24, 2026
Governed MCP server: YAML-declared tools, typed effects, policy-gated and audited calls.
概览
一个受治理的 MCP 服务器,通过带类型效果和审计的策略门控工具,提供声明式的 KPI 商业智能查询能力。
- 可以做什么
- 查询内置 BI 包中的 KPI、公司健康度、指标异常、指标预测、可用指标和高管摘要,以及从 YAML 工具包加载的、基于自有 Postgres 或 HTTP API 的工具。按领域(财务、人力、运营、客户、工程、增长、物流、ESG、IT、安全)读取 KPI 资源,并使用月度高管简报提示。通过默认关闭的受控写入与破坏性工具记录或撤回指标注释。所有允许和拒绝的调用都会被审计,变更类工具支持试运行。
- 适用场景
- 适合让助手基于 KPI 数据回答商业智能问题,或希望把自有 Postgres 或 HTTP 后端工具以带类型效果、策略门控和审计的方式暴露给 MCP 客户端时使用。
- 运行要求
- 以 stdio 在本地运行,通常通过 uvx 或 pip 安装 agentkit-mcp 包(Python)。可选 POSTGRES_URL 连接自有 KPI 表,未设置时使用内置种子数据。写入和破坏性工具需要 AGENTKIT_ALLOW_WRITES 和由人持有的 AGENTKIT_APPROVAL_TOKEN。内置 LLM 工作流和示例需要 GROQ_API_KEY、ANTHROPIC_API_KEY 或 OPENAI_API_KEY 等提供商密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 Agentkit,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
AgentKit — A Governed MCP Tool Server
[CI] [License: AGPL v3] [AgentKit MCP server – quality score on Glama] [Live App] [Research] [Benchmarks] [Guide]
An MCP server where tools are declarative, effects are typed, and every action is policy-gated and audited. It works with any MCP client (Claude Desktop, Cursor, LangGraph, Claude Agent SDK, CrewAI).
Live Application: agentkit.ysiddo-ai-projects.app.
- Research Background:
RESEARCH.md/ Online Research Documentation - Empirical Benchmarks:
BENCHMARK.md/ Online Benchmark Dashboard - User Guide: Online User Guide
- Self-Hosting Guide:
SELF_HOSTING.md
Three things distinguish it from a typical MCP server:
- Declarative tools. Define tools in YAML over your own Postgres or HTTP API, with no Python and no fork. (docs/REUSE.md)
- Typed effects. Each tool declares an effect (
read,writeordestructive), and tools that mutate data do mutate it. - Guardrails that do not depend on the prompt. Writes are off by default, destructive actions need a human-held approval token the model never sees, every mutating tool supports dry-run, and every call (allowed and denied) is audited. (SECURITY.md)
The bundled business-intelligence tools below are the reference pack. They show the mechanics end to end; they are not the limit of what the server can serve.
What It Does
Reference BI pack (built in):
- 6 core MCP tools:
query_kpis,get_company_health,detect_kpi_anomalies,forecast_metric,list_available_metrics,get_executive_summary— plus any tools loaded from declarative YAML packs (packs/), so the real tool count at runtime is 6 or more, not a fixed number. The bundledannotationspack adds 3 more (list_annotations,annotate_metric,retract_annotation) demonstrating a guarded write/destructive path — see below. - 10 MCP resources:
kpi://{domain}/latestfor each of this project's real seeded domains — Finance, People, Operations, Customer, Engineering, Growth, Logistics, ESG, IT, Security (src/agentkit_mcp/data/seed.py). - 1 reusable prompt:
monthly_executive_briefing
The domain list, tool-pack set, and resource/prompt registration are all derived from the same data this server serves (
src/agentkit_mcp/data/seed.py,packs/*.yaml), not hardcoded, so adding a domain or tool pack extends this list automatically. You can also add your own@mcp.resource/@mcp.promptdecorators. See docs/REUSE.md.
Write and destructive actions. The annotations pack lets an agent record a durable
note on a metric (annotate_metric, effect write) and soft-delete one it got wrong
(retract_annotation, effect destructive, which requires a human-held
AGENTKIT_APPROVAL_TOKEN the model never sees). Both are off by default
(AGENTKIT_ALLOW_WRITES=false). See SECURITY.md
and RESEARCH.md section 2 for the policy-engine model.
Platform capabilities:
- Declarative tool packs — add tools over your own Postgres/HTTP in YAML (
packs/) - Typed effects + policy engine —
GET /api/policypublishes the capability envelope - Audit trail —
GET /api/audit, allowed and denied, with deny reasons - Multi-provider LLM routing incl. self-hosted —
GET /api/llm-routing - LangGraph 3-agent workflow in
workflow.py(Planner → Analyst → Reporter) - Claude Agent SDK demo in
demos/claude_agent_sdk_demo.py - CrewAI demo in
demos/crewai_demo.py - DSPy research scaffold in
research/dspy_experiment.py - 90+ tests across smoke, API, integration, MCP protocol, policy guardrails, and LangGraph workflow
PyPI Package
For an MCP client, uvx can run the published package without a checkout:
Quick Start
Claude Desktop Setup
Add to ~/.config/Claude/claude_desktop_config.json:
MCP_TRANSPORT=stdio is required here — without it mcp_server.py defaults to serving
over SSE (a network port) instead of talking JSON-RPC over the pipes Claude Desktop
spawns it with, and no tools will appear. Local stdio mode doesn't need
MCP_AUTH_TOKEN (the OS process boundary is the auth boundary); that variable only
matters for the SSE/network path.
Multi-Provider LLM Routing
The 3-agent LangGraph workflow (workflow.py) and the demos/research scripts route
each role to its own model via LiteLLM, configured with
plain provider/model strings — no code changes to switch providers:
LLM_REASONING— planner + reporter agents (defaults toanthropic/claude-sonnet-4-6)LLM_DEFAULT— the tool-calling analyst agent (defaults togroq/openai/gpt-oss-120b)LLM_JUDGE— used by the eval suite (defaults toanthropic/claude-haiku-4-5)LLM_LOCAL+INFERENCE_MODE=local— route to a local/self-hosted model (e.g. Ollama) instead of a hosted provider
Set the matching provider API key(s) (GROQ_API_KEY, ANTHROPIC_API_KEY,
OPENAI_API_KEY) for whichever models you reference above. See .env.example.
- Diagnostics: adjust
LOG_LEVELtoDEBUGfor verbose logs. - Telemetry: one anonymous startup ping (service name, version, random install ID; no
prompts, tool calls or application data), on by default for both the MCP console command and the
REST facade.
TELEMETRY_URLredirects it to your own collector;TELEMETRY_OPT_OUT=trueorDO_NOT_TRACK=1disables it. The Claude Desktop snippet above setsTELEMETRY_OPT_OUT.
Restart Claude Desktop, then ask:
- "What's our company health right now?"
- "Forecast revenue for the next 6 months."
- "Are there anomalies in the Finance KPIs?"
LangGraph Workflow
Architecture
The call funnel, policy model, tool packs and design decisions are described in
ARCHITECTURE.md, with an interactive version in the dashboard. The REST
facade (/api/...) exposes the same tools, policy, audit and routing views over HTTP for the
dashboard and ordinary callers. Every configuration variable is described in
.env.example.
Design notes
- One server, two transports. The same tool set is served over stdio (local clients) and SSE (network).
- Capability policy engine. Effects are separated (read, write, destructive) and enforced below the model, independent of the prompt.
- Client coverage. Exercised with Claude Desktop, Cursor and Devin configurations (see the integration guides below).
For the full formalization, literature context, and citation details, see RESEARCH.md.
Benchmark Replication Suite
Run the reproducible benchmark evaluation suites:
Integration Guides (Claude Desktop, Cursor, Devin)
- Claude Desktop: See claude_desktop_config.example.json and docs/INTEGRATION_GUIDE.md
- Cursor IDE: See cursor_mcp.example.json
- Devin AI Agent: See devin_mcp.example.json
Automated client verification:
Support the project
If AgentKit is useful to you, a star on the repository helps other engineers find it, and following @Yacine-ai-tech is the simplest way to hear about new releases. Passing the link to a colleague who has the same problem is just as welcome.
Questions and field notes go to Discussions; reproducible bugs go to Issues.
License & Enterprise Use (Dual-License)
This project is open-source under the AGPL-3.0 License. It is completely free for researchers, students, and open-source hobbyists. Commercial license: see COMMERCIAL.md.
来源:README.md,提交 7b587d8
工具
0版本历史
2- v0.1.18最新Oct 14, 2026
- v0.1.17Oct 13, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分