@agentskit/mcp
v0.4.4
Published
Expose AgentsKit tools as an MCP server for hosts supporting the documented 2024-11-05 tools bridge.
Maintainers
Readme
@agentskit/mcp
Profile: major-package
Tags: agentskit · typescript · ai-agents
Expose AgentsKit tools as an MCP server — use
them from Claude Desktop, Cursor, Windsurf, or another host that supports the
documented 2024-11-05 tools bridge.
Verified proof
- Package metadata and tests live under
packages/mcp/. - MCP package guide: https://www.agentskit.io/docs/agents/tools/mcp
- Stability map: docs/STABILITY.md
How this fits the ecosystem
@agentskit/mcp is the bridge from AgentsKit tools and agents into MCP-compatible coding agents.
- AgentsKit: expose tools, integrations, and registry agents through a standard MCP server.
- Registry: serve ready agents from registry.agentskit.io as callable MCP tools.
- Playbook: use playbook.agentskit.io for safe tool design, approvals, and agent handoff patterns.
- AKOS: run the same model with enterprise deployment, governance, and observability at akos.agentskit.io.
Docs: MCP package guide · agent handoff
npx -y @agentskit/[email protected] --tools fetch,searchThen point your MCP host at the command. Claude Desktop, Cursor, Codex, and OpenClaw all launch the same stdio server with host-specific configuration.
Claude Desktop or Cursor (mcpServers / .cursor/mcp.json):
{
"mcpServers": {
"agentskit": { "command": "npx", "args": ["-y", "@agentskit/[email protected]", "--tools", "fetch,search"] }
}
}Codex (~/.codex/config.toml):
[mcp_servers.agentskit]
command = "npx"
args = ["-y", "@agentskit/[email protected]", "--tools", "fetch,search"]OpenClaw:
openclaw mcp add agentskit \
--command npx \
--arg -y \
--arg @agentskit/[email protected] \
--arg --tools \
--arg fetch,search
openclaw mcp doctor agentskit --probeVerify the server in each host with its MCP tool-list command before enabling additional tools. Pi does not have a native MCP host path in this recipe; use a Pi extension or package when a dedicated integration is available.
Flags
| Flag | Effect |
|------|--------|
| --tools <a,b> | which tools to expose (default fetch,search). Available: fetch, search, filesystem, shell, sqlite |
| --fs-root <dir> | enable the filesystem tool, rooted at <dir> |
| --sqlite <file> | enable the sqlite query tool against <file> |
| --allow-shell | enable the shell tool (off by default — it runs commands) |
stdout is the MCP JSON-RPC channel; human output goes to stderr.
The bridge supports MCP protocol revision 2024-11-05 and the
initialize/tools/list/tools/call lifecycle over stdio, in-memory, or an
injected transport. Hosts own resources, prompts, sampling, tasks,
HTTP/WebSocket, authentication, rate limiting, and persistence. Tool arguments are
validated against their JSON Schema before execution; tools without a schema
accept only an empty object. Invalid protocol envelopes and params are
rejected, and tool failures are sanitized by default.
Programmatic
import { createAgentsKitMcpServer } from '@agentskit/mcp'
import { fetchUrl } from '@agentskit/tools'
createAgentsKitMcpServer({ tools: [fetchUrl()] }) // stdio by defaultPass transport to use a custom MCP transport (e.g. in-memory for tests).
Expose whole agents (agents as MCP tools)
Run a registry agent server-side and expose it as a single MCP tool — the host delegates a specialized job instead of orchestrating primitives:
npx @agentskit/[email protected] --agents legal-contract-reviewer,fintech-kyc-screener --provider openai--provider covers the first-class adapters (openai, anthropic, gemini, ollama)
plus the OpenAI-compatible set (deepseek, grok, groq, mistral, cohere, together,
fireworks, openrouter, cerebras, kimi, huggingface, qwen, lmstudio, vllm, llamacpp)
and any other OpenAI-compatible provider in the models.dev catalog. Key from
--api-key or <PROVIDER>_API_KEY; --model / --base-url optional.
import { createAgentTool } from '@agentskit/mcp'
createAgentsKitMcpServer({ tools: [createAgentTool({ id, description, systemPrompt, adapter })] })Typed Registry projections use fetchAgent + createTypedAgentTool; their
input/output JSON Schemas are preserved. fetchAgentSkill intentionally
rejects typed projections so they cannot be flattened into a text tool.
Quick start
import { createAgentsKitMcpServer } from '@agentskit/mcp'
import { createInMemoryTransportPair } from '@agentskit/tools/mcp'
const [, transport] = createInMemoryTransportPair()
const server = createAgentsKitMcpServer({ tools: [], transport })
await server.close()Maturity and compatibility
- Stability: beta — see docs/STABILITY.md
- Node.js 20+ and TypeScript strict mode
- Published as
@agentskit/mcp
Contributing
See CONTRIBUTING.md and the monorepo LICENSE.
