feat(mcp): G6.2 stdio MCP 服務與真實 client 驗證 - #19
Merged
Merged
Conversation
- feat(mcp): 新增 packages/mcp(@mebular/mcp,bin mebular);`mebular mcp` 走 serveStdio - feat(mcp): 11 工具 + memory_policy prompt,薄殼委託 MemoryService;入參鉗制 limit≤50/depth≤5/batch≤100 - feat(mcp): .mebular/config.json + env 配置載入;主密鑰缺失則生成並持久化(0600) - chore(core): 根包改 @mebular/core(workspaces + exports);@mebular/mcp 以 file:../.. 本地鏈接(D41) - test(mcp): scripts/verify-mcp-stdio.mjs(真實 @modelcontextprotocol/client + StdioClientTransport) - ci: build-test-lint job 增 stdio MCP 驗證步驟 對應 goal-v0.1.md G6.2 與 project-status.md D41。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
G6.2 stdio MCP(通用接入层)
mebular mcp以 stdio 暴露 Mebular 记忆能力,供任意 MCP client 接入;行为薄壳委托MemoryService。变更
packages/mcp(@mebular/mcp,binmebular):bin/mebular.mjs→mebular mcp走@modelcontextprotocol/server/stdio的serveStdio。src/tools.mjs:11 工具(memory_write/_write_batch/_query/_search/_profile/_skills/_history/_graph/_import/_status/_sync),入参钳制limit≤50(默认 10)、depth≤5、batch≤100;输出content:[{type:'text'}]+structuredContent。src/server.mjs:注册memory_policyprompt。src/config.mjs:.mebular/config.json+ env(MEBULAR_HOME/CONFIG/STORAGE_PATH/DEVICE_ID/USER_MASTER_KEY(_FILE)/...);主密钥缺失则生成并持久化(0600)。@mebular/core(去 private、workspaces、exports);@mebular/mcp以file:../..本地链接(本环境 npm 不支持workspace:且根包非 workspace 成员);发布期处理记 D41。build-test-lintjob 增「stdio MCP (real client)」步骤。验证(E1)
npm run verify:mcp:stdio:真实@modelcontextprotocol/client+StdioClientTransport启动mebular mcp,断言tools/list=11、工具名与冻结面一致、逐个tools/call(write/batch/query/search/profile/skills/history/graph/import/status/sync)、钳制(depth 超限被钳、batch>100 被拒)、memory_sync网络未启用诚实失败、memory_policyprompt → 退出码 0。npm run build && npm run test:coverage && npm run lint全绿(50 套件/377 用例);npm run verify0–6 全过。决策:D41(G6.2)。