@agentskit/mcp 0.2.16 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -2
- package/dist/bin.cjs +386 -120
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +176 -85
- package/dist/bin.js.map +1 -1
- package/dist/chunk-CKAUENP5.js +258 -0
- package/dist/chunk-CKAUENP5.js.map +1 -0
- package/dist/index.cjs +207 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +1 -1
- package/package.json +12 -8
- package/dist/chunk-F5SVUT7Z.js +0 -85
- package/dist/chunk-F5SVUT7Z.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
# @agentskit/mcp
|
|
2
2
|
|
|
3
|
-
<
|
|
3
|
+
Profile: <code>major-package</code>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center"><img alt="AgentsKit" src="https://raw.githubusercontent.com/AgentsKit-io/agentskit/main/apps/docs-next/public/brand/logo-wordmark.svg" width="180" /></p>
|
|
6
|
+
|
|
7
|
+
**Tags:** `agentskit` · `typescript` · `ai-agents`
|
|
8
|
+
|
|
9
|
+
[](../../docs/STABILITY.md)
|
|
6
10
|
|
|
7
11
|
Expose AgentsKit tools as an [MCP](https://modelcontextprotocol.io) server — use
|
|
8
12
|
them from Claude Desktop, Cursor, Windsurf, or any MCP host.
|
|
9
13
|
|
|
14
|
+
|
|
15
|
+
## Verified proof
|
|
16
|
+
|
|
17
|
+
- Package metadata and tests live under `packages/mcp/`.
|
|
18
|
+
- Package guide: https://www.agentskit.io/docs/agents/tools/mcp
|
|
19
|
+
- Stability map: [docs/STABILITY.md](../../docs/STABILITY.md)
|
|
20
|
+
|
|
10
21
|
## How this fits the ecosystem
|
|
11
22
|
|
|
12
23
|
@agentskit/mcp is the bridge from AgentsKit tools and agents into MCP-compatible coding agents.
|
|
@@ -18,6 +29,7 @@ them from Claude Desktop, Cursor, Windsurf, or any MCP host.
|
|
|
18
29
|
|
|
19
30
|
Docs: [package guide](https://www.agentskit.io/docs/packages/mcp) · [agent handoff](https://github.com/AgentsKit-io/agentskit/blob/main/llms.txt)
|
|
20
31
|
|
|
32
|
+
<!-- readme-command:install -->
|
|
21
33
|
```bash
|
|
22
34
|
npx @agentskit/mcp --tools fetch,search
|
|
23
35
|
```
|
|
@@ -40,6 +52,13 @@ Then point your MCP host at the command. Example (Claude Desktop config):
|
|
|
40
52
|
| `--fs-root <dir>` | enable the filesystem tool, rooted at `<dir>` |
|
|
41
53
|
| `--sqlite <file>` | enable the sqlite query tool against `<file>` |
|
|
42
54
|
| `--allow-shell` | enable the shell tool (off by default — it runs commands) |
|
|
55
|
+
| `--agents <a,b>` | expose bounded, runnable registry agents as MCP tools |
|
|
56
|
+
| `--provider <id>` | provider for registry agents (default `openai`) |
|
|
57
|
+
| `--model <id>` | explicit provider model; required when no maintained default exists |
|
|
58
|
+
| `--max-steps <1-100>` | bound each delegated agent run (default `8`) |
|
|
59
|
+
| `--api-key <value>` | provider key; prefer `<PROVIDER>_API_KEY` to avoid process-list exposure |
|
|
60
|
+
| `--base-url <url>` | override a compatible provider endpoint |
|
|
61
|
+
| `--help` | print help to `stderr` without contaminating the protocol channel |
|
|
43
62
|
|
|
44
63
|
`stdout` is the MCP JSON-RPC channel; human output goes to `stderr`.
|
|
45
64
|
|
|
@@ -53,6 +72,11 @@ createAgentsKitMcpServer({ tools: [fetchUrl()] }) // stdio by default
|
|
|
53
72
|
```
|
|
54
73
|
|
|
55
74
|
Pass `transport` to use a custom MCP transport (e.g. in-memory for tests).
|
|
75
|
+
Server construction rejects malformed metadata, invalid or duplicate tool names,
|
|
76
|
+
and invalid transports with `AK_CONFIG_INVALID`. The published tool list and
|
|
77
|
+
top-level definition fields are snapshotted, and observer exceptions or rejected
|
|
78
|
+
promises cannot alter protocol behavior. Nested schemas remain trusted tool-owned
|
|
79
|
+
configuration.
|
|
56
80
|
|
|
57
81
|
## Expose whole agents (agents as MCP tools)
|
|
58
82
|
|
|
@@ -69,7 +93,37 @@ fireworks, openrouter, cerebras, kimi, huggingface, qwen, lmstudio, vllm, llamac
|
|
|
69
93
|
and any other OpenAI-compatible provider in the models.dev catalog. Key from
|
|
70
94
|
`--api-key` or `<PROVIDER>_API_KEY`; `--model` / `--base-url` optional.
|
|
71
95
|
|
|
96
|
+
Registry IDs are validated before URL construction. Each remote request is
|
|
97
|
+
abortable, defaults to a 10-second timeout, and is capped at 128 KiB. Registry
|
|
98
|
+
source is parsed as bounded text and is never executed.
|
|
99
|
+
|
|
72
100
|
```ts
|
|
73
101
|
import { createAgentTool } from '@agentskit/mcp'
|
|
74
102
|
createAgentsKitMcpServer({ tools: [createAgentTool({ id, description, systemPrompt, adapter })] })
|
|
75
103
|
```
|
|
104
|
+
|
|
105
|
+
## Quick start
|
|
106
|
+
|
|
107
|
+
<!-- readme-example:quickstart -->
|
|
108
|
+
```ts
|
|
109
|
+
import { createAgentsKitMcpServer } from '@agentskit/mcp'
|
|
110
|
+
import { createInMemoryTransportPair } from '@agentskit/tools/mcp'
|
|
111
|
+
|
|
112
|
+
const [, transport] = createInMemoryTransportPair()
|
|
113
|
+
const server = createAgentsKitMcpServer({ tools: [], transport })
|
|
114
|
+
await server.close()
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Maturity and compatibility
|
|
118
|
+
|
|
119
|
+
- Stability: **beta** — see [docs/STABILITY.md](../../docs/STABILITY.md)
|
|
120
|
+
- **Node.js 20+** and **TypeScript** strict mode
|
|
121
|
+
- Published as `@agentskit/mcp`
|
|
122
|
+
|
|
123
|
+
This package intentionally implements the MCP tools subset over stdio or an
|
|
124
|
+
injected transport. HTTP/WebSocket transports, resources, prompts, sampling,
|
|
125
|
+
authentication, rate limiting, and persistence are not built in.
|
|
126
|
+
|
|
127
|
+
## Contributing
|
|
128
|
+
|
|
129
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) and the monorepo [LICENSE](../../LICENSE).
|