免责声明
好吧,这个问题有点难。很遗憾,需要一些设置。不过,如果你能把这个问题简化一下,请给我发个 PR。
mcp-inception MCP 服务器
从您的 mcp 客户端调用另一个 mcp 客户端。委托任务,卸载上下文窗口。为您的代理提供代理!
这是一个基于 TypeScript 的 MCP 服务器,实现了一个简单的 LLM 查询系统。
- MCP 服务器和客户端合二为一
- 使用mcp-client-cli制作
- 卸载上下文窗口
- 委派任务
- 任务的并行和 Map-Reduce 执行
特征
工具
execute_mcp_client
- 向单独的 LLM 提出问题,忽略查询其工具时所需的所有中间步骤,并返回输出。- 将问题作为必需参数
- 返回答案,忽略所有中间上下文
- 执行_parallel_mcp_client - 获取输入列表和主提示符,并针对输入中的每个字符串并行执行提示符。例如,获取 6 个主要城市的当前时间:伦敦、巴黎、东京、里约、纽约、悉尼。
- 接受主要提示“这个城市的时间是几点?”
- 获取输入列表,伦敦巴黎等
- 为每个输入并行运行提示
- 注意:使用此功能前请等待
execute_map_reduce_mcp_client
- 并行处理多个项目,然后按顺序将结果减少为单个输出。- 使用
mapPrompt
和{item}
占位符来处理单个项目 - 使用
reducePrompt
和{accumulator}
以及{result}
占位符来合并结果 - 获取要处理的
items
清单 - 累加器的可选
initialValue
- 并行处理项目,然后按顺序减少结果
- 用例示例:分析多个文档,然后将所有文档中的关键见解综合成摘要
- 使用
发展
依赖项:
- 安装 mcp-client-cli
- 还要安装配置文件,以及
~/.llm/config.json
中所需的 mcp 服务器
- 还要安装配置文件,以及
- 在某处创建一个 bash 文件,用于激活 venv 并执行
llm
可执行文件
安装包
安装依赖项:
构建服务器:
对于使用自动重建的开发:
安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
基于 TypeScript 的服务器,允许从您自己的 MCP 客户端调用其他 MCP 客户端,促进任务委派和上下文窗口卸载,以增强多代理交互。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA TypeScript-based MCP server designed for experimentation and integration with Calude Desktop and Cursor IDE, offering a modular playground for extending server capabilities.Last updated -21,0714JavaScript
- -securityFlicense-qualityA TypeScript implementation of the MCP Agent framework, providing tools for building context-aware agents with advanced workflow management, logging, and execution capabilities.Last updated -5TypeScript
- AsecurityAlicenseAqualityA TypeScript server implementing the Model Context Protocol (MCP) that provides datetime and timezone information to AI agents and chat interfaces, allowing them to access current time in various timezones.Last updated -42TypeScriptMozilla Public License 2.0
- -securityFlicense-qualityA TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.Last updated -67TypeScript