agentskit.js
For agents

@agentskit/mcp — for agents

Expose AgentsKit tools as an MCP server over stdio for Claude Desktop, Cursor, Windsurf.

#Purpose

Serve AgentsKit tools to any MCP host. A thin bridge over @agentskit/tools/mcp (createMcpServer + createStdioTransport).

#Install

npm install @agentskit/mcp

#Primary exports

  • createAgentsKitMcpServer({ tools, serverInfo?, onEvent?, transport? }) — expose ToolDefinition[] as an MCP server. Defaults to stdio over the current process; pass transport to override (tests / custom hosts).
  • processStdio() — adapt the Node process into the StdioLikeProcess the transport expects (server receives on stdin, sends on stdout).
  • createAgentTool({ id, description, systemPrompt, adapter, maxSteps? }) — wrap a whole agent as one MCP tool. The host calls it with a task; the agent runs server-side on the given adapter and returns the result ("agents as MCP tools").
  • fetchAgentSkill(id, fetchImpl?) — fetch a registry agent's runnable skill (hosted index, raw-GitHub fallback); null for tool-composing agents.

#Bin

agentskit-mcpnpx @agentskit/mcp --tools fetch,search. Expose whole agents with --agents <ids> --provider <p> (any of ~20 providers + catalog OpenAI-compatible). Flags: --tools, --fs-root, --sqlite, --allow-shell. stdout is the JSON-RPC channel; logs go to stderr.

#Minimal example

import { createAgentsKitMcpServer } from '@agentskit/mcp'
import { fetchUrl } from '@agentskit/tools'

createAgentsKitMcpServer({ tools: [fetchUrl()] })

#Source

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page