mcp-agent-kit
mcp-agent-kit
Claude Desktop、Cursor、および自律エージェント群のための、標準ライブラリのみを使用した純粋なModel Context Protocol (MCP) サーバー&ツールハーネス。
クイックスタート • アーキテクチャ • Claude Desktop セットアップ • 比較 • エンジニアリングの厳密性
アーキテクチャ
Related MCP server: MCP-123
なぜmcp-agent-kitなのか?
公式MCP SDKは、多数の重いサードパーティ依存関係(pydantic、anyio、httpx、starlette)を導入し、エンタープライズ環境において不要なサプライチェーン攻撃面とインストール時の摩擦を生み出します。
mcp-agent-kit は、100% Python標準ライブラリ を使用した、Model Context Protocolの完全かつ本番環境対応の実装を提供します:
🚀 ランタイム依存関係ゼロ: 純粋なPython(
json、sys、inspect、dataclasses)。🔒 エンタープライズ対応: パッケージの脆弱性曝露ゼロで、即時に監査可能。
⚡ 超軽量: サブミリ秒の起動時間。CLIツール、サーバーレス環境、組み込み型・前方展開型のエージェント統合に最適。
🛠️ 自動スキーマ生成: ネイティブなPython型ヒントとdocstringからJSON Schema定義を直接推論。
mcp-agent-kit vs 公式MCP SDK
項目 |
| 公式Python MCP SDK |
ランタイム依存関係 | 0(Python標準ライブラリのみ) | 18以上のサードパーティ依存関係 |
インストール済みパッケージサイズ | ~15 KB | ~42 MB(推移的依存関係を含む) |
プロセス起動時間 | < 1.2 ms | ~120 ms |
監査対象範囲 | 単一ファイル / CVEゼロ | 複数のサプライチェーン依存関係 |
トランスポート対応 |
|
|
クイックスタート
1. 20行でMCPサーバーを構築する
from mcp_agent_kit import MCPServer
app = MCPServer(name="my-agent-tools", version="1.0.0")
@app.tool(description="Calculate tax and total invoice amounts")
def calculate_invoice(subtotal: float, tax_rate: float = 0.07) -> dict:
tax = round(subtotal * tax_rate, 2)
return {"subtotal": subtotal, "tax": tax, "total": round(subtotal + tax, 2)}
if __name__ == "__main__":
app.run_stdio()Claude Desktop 統合
サーバーを claude_desktop_config.json に直接追加します:
{
"mcpServers": {
"my-tools": {
"command": "python",
"args": ["-m", "examples.simple_server"]
}
}
}Claude Desktopを再起動すると、カスタムツールがすぐにClaudeのツールベルトに表示されます! 🔨
機能
完全なMCPハンドシェイク:
initialize、notifications/initialized、ping。動的なツール検出: 自動JSONスキーマ生成を備えた
tools/list。堅牢なエラーバウンダリ:
tools/callはツールの実行時例外を分離し、stdioプロセスをクラッシュさせることなく、構造化されたエラーメッセージをLLMに報告します。依存関係ゼロ: Python 3.10+ でそのまま動作します。
エンジニアリングの厳密性と検証
テスト: 初期化、ツール検出、引数検証、例外処理をカバーする
pytestテストスイートが100%パス。依存関係: ランタイム依存関係はゼロ。
著者: Reuben Bowlby — LinkedIn | 履歴書
エンタープライズスケール
mcp-agent-kit は、HUMMBL デベロッパーエコシステムの一部です。エンタープライズグレードのマルチエージェントガバナンス(4段階のキルスイッチ、HMAC署名付き委任トークン、暗号監査バス)については、github.com/hummbl-io をご覧ください。
Available Tools
2 toolsadd_numbersA
Add two numbers together
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations to carry the safety profile, so the description carries the burden. It clearly states the operation, and a pure addition has no obvious destructive or persistent side effects, but it does not explicitly mention that the result is returned or how errors are handled.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. Every word contributes to the meaning without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-number addition tool with required parameters and no output schema, the description is minimally adequate. It could be more complete by explicitly stating that it returns the sum, but the operation is straightforward enough for an agent to infer the expected behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. 'Add two numbers together' clarifies that both a and b are operands in the same addition, which adds meaning over bare names and types. It does not discuss edge cases like type coercion or numeric bounds, but these are minor for simple addition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('add') and resource ('two numbers'), making the tool's purpose immediately clear. It is also clearly distinct from the only sibling, get_system_info, since arithmetic and system information share no overlap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied: use this tool when a sum of two numbers is needed. However, the description gives no explicit guidance about when not to use it or any alternative, though the operation is elementary enough that confusion is unlikely.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_system_infoA
Get host system architecture and OS details
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It correctly conveys that the operation is a read-like retrieval with no side effects, which is implicit in 'Get'. It does not detail the exact shape of the returned data (e.g., format, fields, possible failure modes), but for a simple system-info tool this is a moderate gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one short sentence and every word contributes to meaning. It is appropriately sized for the tool's simplicity, with no padding or redundant phrasing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with no output schema, the description tells the agent what it will get ('host system architecture and OS details'). It does not specify the exact return format, but the tool's extreme simplicity and the clear scope make the description adequate. A slightly richer mention of OS/platform field names would push it to 5, but current wording is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema already fully describes the input surface with 100% coverage. The description adds the key behavioral context—what kind of information is returned—which is more than the schema alone. The baseline of 4 for zero-parameter tools is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Get') and resource ('host system architecture and OS details'), and this distinguishes it clearly from the only sibling tool, add_numbers, which performs arithmetic. No ambiguity about what the tool returns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the intended use case—retrieving system-level information—and no complex context is required for a zero-parameter tool. It does not explicitly state when not to use it, but with only one sibling that does something entirely unrelated, explicit exclusion is unnecessary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
add_numbers - First observed
get_system_info
TDQS
Scored across 2 tools
The two tools are completely unrelated in purpose: one performs arithmetic and the other retrieves system information. There is no possibility of an agent confusing them.
Both tools follow the same verb_noun snake_case pattern: add_numbers and get_system_info. Naming is predictable and consistent.
With only two tools, the server sits at the low end of the acceptable range. The name mcp-agent-kit suggests a broader toolkit, so two tools feel thin.
The two tools do not form a coherent domain, and the server name implies a general-purpose agent kit, yet almost no common agent capabilities are represented. There are significant gaps if this is meant to be a functional toolkit.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseDqualityDmaintenanceA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.137MIT
- FlicenseNot gradedqualityDmaintenanceA minimal Python package for easily setting up and running MCP servers and clients, allowing functions to be automatically exposed as tools that LLMs can use with just 2 lines of code.22-
- AlicenseNot gradedqualityDmaintenanceA dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.8 npm6MIT
- FlicenseNot gradedqualityDmaintenanceEnables building and running MCP servers over streamable HTTP, exposing tools to AI assistants like Cursor, with examples of mounting multiple servers in FastAPI.-