A new published package that exposes every OneBot action's docs + a ready-to-use JSON Schema to LLM clients over stdio. Tools: list_actions / get_action / search_actions / list_categories, plus the whole catalog as a resource. The catalog is a build-time snapshot generated from @snowluma/onebot's live action specs (collectActionDocs()) — so it auto-tracks action add/remove and the published package carries zero runtime dependency on the private onebot package. action-kit enrichment (the data source): - Field.toJsonSchema() per coercer (uint→integer/minimum:1, messageId→integer/ not-const-0, int→min/max, string→minLength/maxLength, array→items, enum→enum). - describe() composes a per-action inputSchema; ActionDoc gains inputSchema + category. action-docs.ts tags each doc with its domain category. Wiring: onebot exports ./action-kit + ./action-docs; root build:all includes mcp; mcp-npm-publish.yml mirrors the sdk/ui publish workflows (triggers on changes under packages/mcp/** or packages/onebot/**, since the catalog derives from it). onebot typecheck + 318 tests green; mcp typecheck/build/smoke green; the 142 registered OneBot action names are unchanged.
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"name": "@snowluma/mcp",
|
|
"version": "1.9.4",
|
|
"description": "MCP server exposing the SnowLuma OneBot action catalog (read-only docs + JSON Schemas) to LLM clients.",
|
|
"type": "module",
|
|
"bin": {
|
|
"snowluma-mcp": "./dist/server.js"
|
|
},
|
|
"main": "./dist/server.js",
|
|
"types": "./dist/server.d.ts",
|
|
"files": [
|
|
"dist",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"clean": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
"gen": "vitest run scripts/gen-catalog.test.ts",
|
|
"prebuild": "pnpm run clean && pnpm run gen",
|
|
"build": "tsc -p tsconfig.json",
|
|
"prepack": "pnpm run build",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"start": "node dist/server.js"
|
|
},
|
|
"keywords": [
|
|
"mcp",
|
|
"model-context-protocol",
|
|
"onebot",
|
|
"snowluma",
|
|
"qq"
|
|
],
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@snowluma/onebot": "workspace:*",
|
|
"@snowluma/proton": "workspace:*",
|
|
"@types/node": "^24.12.2",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest": "^4.1.4"
|
|
},
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
}
|
|
}
|