feat: add MCP (Model Context Protocol) support with /mcp command#48
Merged
Conversation
- MCP stdio client for connecting to MCP servers - Support for playwright, fetch, and memory MCP servers - Add /mcp slash command to display MCP server status 新增 MCP(模型上下文协议)支持 - 实现 MCP stdio 客户端,用于连接 MCP 服务器 - 支持 playwright、fetch、memory 三个 MCP 服务器 - 新增 /mcp 命令,显示 MCP 服务器状态和可用工具
Collaborator
|
@dengmik-commits 感谢贡献。但是这个分支已经落后最新main分支,并且有冲突,请解决冲突,不然无法合并。或者开启允许管理员修改,我来帮你解决冲突。
|
…other fixes Resolved conflicts in slashCommands.ts and test by keeping both /mcp and /model commands.
Contributor
Author
|
冲突已经解决,已同步上游最新代码,请审核。 |
Collaborator
|
已合并,但发现一些问题:
我会在发布前接着修复这些问题,也欢迎继续提PR优化MCP相关功能。 |
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.


Summary
/mcp命令,管理 MCP 服务器连接Changes
src/tools/mcp-client.ts— MCP JSON-RPC 客户端,通过 stdin/stdout 管道与 MCP 服务器通信src/tools/mcp-manager.ts— MCP 服务器管理器,管理连接、工具命名空间、执行调度src/tools/executor.ts— 集成 MCP 工具路由(mcp__前缀)src/session.ts— 会话初始化时启动 MCP 管理器src/settings.ts— 新增McpServerConfig类型和mcpServers配置字段docs/mcp.md— MCP 配置指南(含 GitHub、Playwright、文件系统等示例)README.md— 新增 MCP 功能说明及链接