{"_id":"@agiflowai/clawdbot-mcp-plugin","_rev":"3-d1d7fe5798a3c2b96c0d8dd38ab9f793","name":"@agiflowai/clawdbot-mcp-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@agiflowai/clawdbot-mcp-plugin","version":"0.1.0","keywords":["typescript","library","clawdbot","mcp","plugin"],"author":{"name":"AgiflowIO"},"license":"AGPL-3.0","_id":"@agiflowai/clawdbot-mcp-plugin@0.1.0","maintainers":[{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"}],"homepage":"https://github.com/AgiFlow/aicode-toolkit#readme","bugs":{"url":"https://github.com/AgiFlow/aicode-toolkit/issues"},"dist":{"shasum":"a9218a439f51c5e2f071447ac4dd7562964c6f9a","tarball":"https://registry.npmjs.org/@agiflowai/clawdbot-mcp-plugin/-/clawdbot-mcp-plugin-0.1.0.tgz","fileCount":14,"integrity":"sha512-Fmtko3nEfZ2N2jJU93KxdJMM0HiSMg4v1Mf9dpJcgTqtmCOGym508FS0UMIZgCtaSMTTdIhHgs+sQm4U3ZqBAg==","signatures":[{"sig":"MEUCIDvACHSflWc+/2Zt5GJusVfVcE2ZFj6njKgF43Tx5KfmAiEAyDfTKaLtxkkAJGmM++tlglF8j28Qb/EiPwTbxSFTGoE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69061},"main":"./dist/index.cjs","type":"module","_from":"file:agiflowai-clawdbot-mcp-plugin-0.1.0.tgz","types":"./dist/index.d.cts","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./plugin":{"import":"./dist/plugin.js","require":"./dist/plugin.cjs"},"./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"},"clawdbot":{"extensions":["dist/plugin.js"]},"_resolved":"/private/var/folders/35/_klvbykx3s99bpfh7lcqwrgw0000gn/T/885b664ed1f502fcdfd9233854af4018/agiflowai-clawdbot-mcp-plugin-0.1.0.tgz","_integrity":"sha512-Fmtko3nEfZ2N2jJU93KxdJMM0HiSMg4v1Mf9dpJcgTqtmCOGym508FS0UMIZgCtaSMTTdIhHgs+sQm4U3ZqBAg==","repository":{"url":"git+https://github.com/AgiFlow/aicode-toolkit.git","type":"git","directory":"packages/clawdbot-mcp-plugin"},"_npmVersion":"11.4.2","description":"Clawdbot plugin for MCP server integration with progressive tool disclosure","directories":{},"_nodeVersion":"24.4.1","dependencies":{"@sinclair/typebox":"^0.34.0","@agiflowai/one-mcp":"0.3.6"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.6","vitest":"4.0.15","typescript":"5.9.3","@types/node":"^22.0.0","@vitest/coverage-v8":"^3.0.0","@modelcontextprotocol/sdk":"1.24.0"},"peerDependencies":{"clawdbot":">=0.1.0"},"peerDependenciesMeta":{"clawdbot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/clawdbot-mcp-plugin_0.1.0_1769402010849_0.9011555655494605","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agiflowai/clawdbot-mcp-plugin","version":"0.1.1","keywords":["typescript","library","clawdbot","mcp","plugin"],"author":{"name":"AgiflowIO"},"license":"AGPL-3.0","_id":"@agiflowai/clawdbot-mcp-plugin@0.1.1","maintainers":[{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"}],"homepage":"https://github.com/AgiFlow/aicode-toolkit#readme","bugs":{"url":"https://github.com/AgiFlow/aicode-toolkit/issues"},"dist":{"shasum":"60aa770304493adfe81a089410ca5b7087be524e","tarball":"https://registry.npmjs.org/@agiflowai/clawdbot-mcp-plugin/-/clawdbot-mcp-plugin-0.1.1.tgz","fileCount":14,"integrity":"sha512-q9KFGjj/s/pT5sVt0TBbEEHQnF2pDx2vFsIjJaRQYUDwuQ3SMruaBh5zBubQXzFJxDUp12QNIOV6rrIrlRDfIA==","signatures":[{"sig":"MEUCIQC86fkHCftbL+k9OubHqRzpTreuq+WA8AR7q6xb9tNdawIgeGykWwTRa5C+z61c/mJwzpmMACBD8PP2+hXbJ+FJ5/4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69061},"main":"./dist/index.cjs","type":"module","_from":"file:agiflowai-clawdbot-mcp-plugin-0.1.1.tgz","types":"./dist/index.d.cts","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./plugin":{"import":"./dist/plugin.js","require":"./dist/plugin.cjs"},"./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"},"clawdbot":{"extensions":["dist/plugin.js"]},"_resolved":"/private/var/folders/35/_klvbykx3s99bpfh7lcqwrgw0000gn/T/dea2e9262b63f9f6ed0f258daad4b658/agiflowai-clawdbot-mcp-plugin-0.1.1.tgz","_integrity":"sha512-q9KFGjj/s/pT5sVt0TBbEEHQnF2pDx2vFsIjJaRQYUDwuQ3SMruaBh5zBubQXzFJxDUp12QNIOV6rrIrlRDfIA==","repository":{"url":"git+https://github.com/AgiFlow/aicode-toolkit.git","type":"git","directory":"packages/clawdbot-mcp-plugin"},"_npmVersion":"11.4.2","description":"Clawdbot plugin for MCP server integration with progressive tool disclosure","directories":{},"_nodeVersion":"24.4.1","dependencies":{"@sinclair/typebox":"^0.34.0","@agiflowai/one-mcp":"0.3.7"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.6","vitest":"4.0.15","typescript":"5.9.3","@types/node":"^22.0.0","@vitest/coverage-v8":"^3.0.0","@modelcontextprotocol/sdk":"1.24.0"},"peerDependencies":{"clawdbot":">=0.1.0"},"peerDependenciesMeta":{"clawdbot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/clawdbot-mcp-plugin_0.1.1_1769402152056_0.17813374034457152","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agiflowai/clawdbot-mcp-plugin","description":"Clawdbot plugin for MCP server integration with progressive tool disclosure","version":"0.1.2","license":"AGPL-3.0","author":{"name":"AgiflowIO"},"repository":{"type":"git","url":"git+https://github.com/AgiFlow/aicode-toolkit.git","directory":"packages/clawdbot-mcp-plugin"},"homepage":"https://github.com/AgiFlow/aicode-toolkit#readme","bugs":{"url":"https://github.com/AgiFlow/aicode-toolkit/issues"},"keywords":["typescript","library","clawdbot","mcp","plugin"],"clawdbot":{"extensions":["dist/plugin.js"]},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.cts","dependencies":{"@sinclair/typebox":"^0.34.0","@agiflowai/one-mcp":"0.3.7"},"devDependencies":{"@modelcontextprotocol/sdk":"1.25.2","@types/node":"^22.0.0","@vitest/coverage-v8":"^3.0.0","tsdown":"^0.15.6","typescript":"5.9.3","vitest":"4.0.15"},"peerDependencies":{"clawdbot":">=0.1.0"},"peerDependenciesMeta":{"clawdbot":{"optional":true}},"type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./plugin":{"import":"./dist/plugin.js","require":"./dist/plugin.cjs"},"./package.json":"./package.json"},"scripts":{"build":"tsdown","test":"vitest --run","typecheck":"tsc --noEmit"},"_id":"@agiflowai/clawdbot-mcp-plugin@0.1.2","_integrity":"sha512-Jl6zEVCYsAFCPr9clGdbV/kfycMY+eMt+XFzGHIqEmML5uB5b+HOIqV+T3AzYwnFfiIYwE7z8wnHQO+oWwTbBQ==","_resolved":"/private/var/folders/35/_klvbykx3s99bpfh7lcqwrgw0000gn/T/f8d5af77b593b622474dd41ef5b6049a/agiflowai-clawdbot-mcp-plugin-0.1.2.tgz","_from":"file:agiflowai-clawdbot-mcp-plugin-0.1.2.tgz","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-Jl6zEVCYsAFCPr9clGdbV/kfycMY+eMt+XFzGHIqEmML5uB5b+HOIqV+T3AzYwnFfiIYwE7z8wnHQO+oWwTbBQ==","shasum":"5613bca9f44b773c0b74b572c6e9da0a77cd7714","tarball":"https://registry.npmjs.org/@agiflowai/clawdbot-mcp-plugin/-/clawdbot-mcp-plugin-0.1.2.tgz","fileCount":14,"unpackedSize":4787325,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGj3O4fg/0lkSEjjITG2/gdCikI2Z1V0OfSZQG8fc/OUAiEA2/JfRnT3D1uSrDB+UOMq1Y9zTUMoeYtq8rpjV3I4/q4="}]},"_npmUser":{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"},"directories":{},"maintainers":[{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawdbot-mcp-plugin_0.1.2_1769423075629_0.22485100413825898"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-26T04:33:30.756Z","modified":"2026-01-26T10:24:35.965Z","0.1.0":"2026-01-26T04:33:30.988Z","0.1.1":"2026-01-26T04:35:52.222Z","0.1.2":"2026-01-26T10:24:35.839Z"},"bugs":{"url":"https://github.com/AgiFlow/aicode-toolkit/issues"},"author":{"name":"AgiflowIO"},"license":"AGPL-3.0","homepage":"https://github.com/AgiFlow/aicode-toolkit#readme","keywords":["typescript","library","clawdbot","mcp","plugin"],"repository":{"type":"git","url":"git+https://github.com/AgiFlow/aicode-toolkit.git","directory":"packages/clawdbot-mcp-plugin"},"description":"Clawdbot plugin for MCP server integration with progressive tool disclosure","maintainers":[{"name":"agiflow-ai","email":"agiflow.ai@gmail.com"}],"readme":"# @agiflowai/clawdbot-mcp-plugin\n\nClawdbot plugin for integrating Model Context Protocol (MCP) servers with progressive tool disclosure.\n\n## Overview\n\nThis plugin bridges the `@agiflowai/one-mcp` package to enable MCP server support in Clawdbot. It exposes only two tools (`mcp__describe_tools` and `mcp__use_tool`) using progressive disclosure, allowing agents to discover and use MCP tools on-demand without cluttering the tool list.\n\n## Features\n\n- **Progressive Disclosure**: Only 2 tools registered (`mcp__describe_tools`, `mcp__use_tool`)\n- **Dynamic Tool Discovery**: Tools are described on-demand, not pre-registered\n- **Multiple MCP Servers**: Connect to multiple MCP servers simultaneously\n- **Skill Support**: Integrate skills from file-based or prompt-based sources\n- **Clean Separation**: Reuses one-mcp as a library dependency (no code duplication)\n\n## Installation\n\n```bash\nnpm install @agiflowai/clawdbot-mcp-plugin\n# or\npnpm add @agiflowai/clawdbot-mcp-plugin\n```\n\n## Configuration\n\n### Clawdbot Gateway Config\n\nAdd the plugin to your Clawdbot configuration (`~/.clawdbot/clawdbot.json`):\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"clawdbot-mcp-plugin\": {\n        \"enabled\": true,\n        \"config\": {\n          \"configFilePath\": \"/Users/username/.clawdbot/mcp-config.yaml\",\n          \"serverId\": \"clawdbot-toolkit\",\n          \"noCache\": false\n        }\n      }\n    }\n  },\n  \"agents\": {\n    \"list\": [\n      {\n        \"id\": \"main\",\n        \"tools\": {\n          \"allow\": [\n            \"mcp__describe_tools\",\n            \"mcp__use_tool\"\n          ]\n        }\n      }\n    ]\n  }\n}\n```\n\n**Important**:\n- Plugin config must be nested under `\"config\"` key\n- Plugin ID in `entries` must match the plugin manifest ID: `\"clawdbot-mcp-plugin\"`\n- Use absolute path for `configFilePath` to avoid path resolution issues\n\n### MCP Server Config\n\nCreate `.clawdbot/mcp-config.yaml`:\n\n```yaml\nmcpServers:\n  memory:\n    name: \"Memory Storage\"\n    instruction: \"Simple key-value storage\"\n    transport: \"stdio\"\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol/server-memory\"]\n\n  filesystem:\n    name: \"Filesystem Operations\"\n    instruction: \"File operations\"\n    transport: \"stdio\"\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/Users/username/workspace\"]\n```\n\n**Note**: `command` and `args` are at top level, NOT nested under `config`.\n\n## Usage\n\nAgents use two tools to access MCP servers:\n\n```typescript\n// 1. Discover tools\nmcp__describe_tools({ toolNames: [\"read_file\", \"write_file\"] })\n\n// 2. Execute tools\nmcp__use_tool({\n  toolName: \"read_file\",\n  toolArgs: { path: \"/path/to/file.txt\" }\n})\n```\n\n## Architecture\n\n### Plugin Structure\n\nThe plugin exports an object (not a function) with the following structure:\n\n```typescript\nconst mcpBridgePlugin = {\n  id: 'clawdbot-mcp-plugin',\n  name: 'MCP Server Bridge',\n  description: 'Enables MCP server integration...',\n  configSchema: Type.Object({\n    // TypeBox schema for config validation\n  }),\n  register(api: ClawdbotPluginApi) {\n    // Register services and tools\n    api.registerService({ id: 'mcp-server', start() {...}, stop() {...} });\n    api.registerTool({ name: 'mcp__describe_tools', ... }, { name: 'mcp__describe_tools' });\n    api.registerTool({ name: 'mcp__use_tool', ... }, { name: 'mcp__use_tool' });\n  }\n};\n\nexport default mcpBridgePlugin;\n```\n\n### Plugin Lifecycle\n\n1. **Discovery & Loading**: Gateway scans plugin directories and loads manifests\n2. **Registration**: Gateway calls `plugin.register(api)` with Clawdbot API\n3. **Service Start**: Gateway calls all registered service `start()` methods (async initialization happens here)\n4. **Runtime**: Tools execute and forward requests to one-mcp\n5. **Service Stop**: Gateway calls service `stop()` methods on shutdown\n\n### Progressive Disclosure Pattern\n\n- **Minimal Surface Area**: Only 2 tools exposed to agents\n- **On-Demand Discovery**: Tools are described when requested via `mcp__describe_tools`\n- **Dynamic Description**: Toolkit description generated after MCP servers connect\n- **No Tool Bloat**: Avoid registering hundreds of individual MCP tools\n\n### Key Implementation Details\n\n- **Plugin Object**: Exports object with `register()` method, not a plain function\n- **Tool Registration**: Second parameter must be `{ name: 'tool_name' }`, not `{ optional: false }`\n- **Service Registration**: Use `id:` property, not `name:`\n- **API Access**: Use `api.pluginConfig` (not `api.getConfig()`), `api.logger` (not `api.log`), `api.registerTool`, `api.registerService`\n- **Async Work**: Do all async initialization in `service.start()`, not in `register()` function\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the package\npnpm build\n\n# Type check\npnpm typecheck\n\n# Run tests\npnpm test\n```\n\n## Configuration Schema\n\nThe plugin accepts the following configuration options:\n\n- `configFilePath` (string): Path to mcp-config.yaml file (default: `.clawdbot/mcp-config.yaml`)\n- `serverId` (string): Unique identifier for the toolkit (default: `clawdbot-mcp`)\n- `noCache` (boolean): Disable configuration caching (default: `false`)\n\n## Error Handling\n\n- **Connection Failures**: Logged but don't crash the plugin\n- **Tool Execution Errors**: Returned as structured error responses\n- **Configuration Errors**: Validated against JSON schema, fail fast\n\n## License\n\nAGPL-3.0\n\n## Contributing\n\nSee [CONTRIBUTING.md](../../CONTRIBUTING.md) for development guidelines.\n","readmeFilename":"README.md"}