关于 Openmcp Client
OpenMCP 是面向 MCP 开发的一体化 VSCode / Trae / Cursor 插件,用于调试 MCP 服务。它将 Inspector 与 MCP 客户端的基本功能合并,适合需要在同一环境中开发和测试 MCP 服务的开发者。
主要功能
- 01测试 MCP 工具、提示词和资源
- 02支持同时调试多个 MCP 服务
- 03项目级与全局级的 MCP 项目管理面板
- 04支持多种大模型及 Ollama 等本地模型
- 05可将测试通过的工具用于交互测试
- 06可将调试后的配置用于 openmcp-sdk 部署 Agent
适用场景
- 01在 IDE 中调试和验证自研 MCP 服务
- 02通过大模型对已接入的工具进行交互测试
- 03将调试完成的 MCP 配置部署为 Agent 应用
MCP 相关
作为 MCP 客户端,OpenMCP 连接并管理本地 MCP 服务,可对其工具、提示词和资源进行测试。
详细介绍
OpenMCP
一款用于 MCP 服务调试的一体化 VS Code/Trae/Cursor 插件。
👆 完整视频
openmcpent
集成 Inspector 和 MCP 客户端的基本功能,将开发与测试合二为一。
![]()
使用多种工具测试 MCP 工具、提示词和资源。
![]()
可以将测试过的工具放入“交互式测试”模块,进行大模型交互测试。
![]()
完善的项目级管理面板,可在项目和全局层面更轻松地管理 MCP 项目。
![]()
支持多种大模型:DeepSeek、OpenAI、Qwen、Gemini、Grok、Mistral、MiniMax、Groq、Perplexity、Kimi、Ollama、OpenRouter 等。
![]()
支持 XML 模式和自定义工具选择选项。
![]()
openmcp-sdk
在 openmcpent 中完成所有测试和验证后,你可以使用 openmcp-sdk 快速轻松地将 MCP 部署为 Agent 应用:
npm install openmcp-sdk
然后只需几行代码即可部署你的 Agent
import { OmAgent } from 'openmcp-sdk/service/sdk';
// create Agent
const agent = new OmAgent();
// Load configuration, which can be automatically generated after debugging with openmcp client
agent.loadMcpConfig('./mcpconfig.json');
// Read the debugged prompt
const prompt = await agent.getPrompt('hacknews', { topn: '5' });
// Execute the task
const res = await agent.ainvoke({ messages: prompt });
console.log('⚙️ Agent Response', res);
输出
[2025/6/20 20:47:31] 🚀 [crawl4ai-mcp] 1.9.1 connected
[2025/6/20 20:47:35] 🤖 Agent wants to use these tools get_web_markdown
[2025/6/20 20:47:35] 🔧 using tool get_web_markdown
[2025/6/20 20:47:39] ✓ use tools success
[2025/6/20 20:47:46] 🤖 Agent wants to use these tools get_web_markdown, get_web_markdown, get_web_markdown
[2025/6/20 20:47:46] 🔧 using tool get_web_markdown
[2025/6/20 20:47:48] ✓ use tools success
[2025/6/20 20:47:48] 🔧 using tool get_web_markdown
[2025/6/20 20:47:54] ✓ use tools success
[2025/6/20 20:47:54] 🔧 using tool get_web_markdown
[2025/6/20 20:47:57] ✓ use tools success
⚙️ Agent Response
⌨️ Today's Tech Article Roundup
📌 How to Detect or Observe Passing Gravitational Waves?
Summary: This article explores the physics of gravitational waves, explaining their effects on space-time and how humans might perceive or observe this cosmic phenomenon.
Author: ynoxinul
Posted: 2 hours ago
Link: https://physics.stackexchange.com/questions/338912/how-would-a-passing-gravitational-wave-look-or-feel
📌 Learn Makefile Tutorial
Summary: A comprehensive Makefile tutorial for beginners and advanced users, covering basic syntax, variables, automatic rules, and advanced features to help developers manage project builds efficiently.
Author: dsego
Posted: 4 hours ago
Link: https://makefiletutorial.com/
📌 Hurl: Run and Test HTTP Requests in Plain Text
Summary: Hurl is a command-line tool that allows defining and executing HTTP requests in plain text format, ideal for data fetching and HTTP session testing. It supports chained requests, value capture, and response queries, making it perfect for testing REST, SOAP, and GraphQL APIs.
Author: flykespice
Posted: 8 hours ago
Link: https://github.com/Orange-OpenSource/hurl
想成为贡献者?
点击此处了解如何为 OpenMCP 做出贡献。
加入我们的社区
- 邮箱:[email protected]
- QQ:782833642
- 微信:联系
lstmkirigaya - Discord:https://discord.gg/SKTZRf6NzU
TODO
功能路线图
| 模块 | 功能 | 优先级 | 状态 | 修复优先级 |
|---|---|---|---|---|
all | 完成基本基础设施 | Full Version | 100% | Done |
render | 支持聊天模式下的成本分析 | Iteration | 100% | Done |
ext | 支持基本 MCP 项目管理 | Iteration | 100% | P0 |
service | 支持集成自定义 OpenAI 兼容大模型 | Full Version | 100% | Done |
service | 支持集成自定义协议大模型 | MVP | 0% | P1 |
all | 支持同时调试多个 MCP 服务 | MVP | 100% | P0 |
all | 支持通过大模型进行在线验证 | Iteration | 100% | Done |
all | 支持保存用户的服务调试工作 | Iteration | 100% | Done |
render | 高风险操作权限确认 | MVP | 0% | P1 |
service | 已连接 MCP 服务的热更新 | MVP | 0% | P1 |
all | 系统提示词管理模块 | Iteration | 100% | Done |
service | 按工具记录日志的系统 | MVP | 0% | P1 |
service | MCP 安全检查(防止提示词注入等) | MVP | 0% | P1 |
service | 内置 OCR 字符识别 | Iteration | 100% | Done |
项目概念
OpenMCP 采用分层模块化设计。通过组装不同模块,可以在不同平台上以不同模式实现。
flowchart TD
subgraph OpenMCP Core Components
renderer[Renderer]
openmcpservice[OpenMCPService]
end
subgraph OpenMCP_Web["OpenMCP Web"]
renderer
openmcpservice
nginx[Nginx]
end
subgraph OpenMCP_Plugin["OpenMCP Plugin"]
renderer
openmcpservice
vscode[VSCode Plugin Code]
end
subgraph OpenMCP_App["OpenMCP App"]
renderer
openmcpservice
electron[Electron Code]
end
subgraph QQBot["OpenMCP-based QQ Bot"]
lagrange[Lagrange.OneBot]
openmcpservice
end
%% Dependencies
OpenMCP_Web -->|Frontend Rendering| renderer
OpenMCP_Web -->|Backend Service| openmcpservice
OpenMCP_Web -->|Reverse Proxy| nginx
OpenMCP_Plugin -->|UI Interface| renderer
OpenMCP_Plugin -->|Core Logic| openmcpservice
OpenMCP_Plugin -->|IDE Integration| vscode
OpenMCP_App -->|Frontend UI| renderer
OpenMCP_App -->|Local Service| openmcpservice
OpenMCP_App -->|Desktop Packaging| electron
QQBot -->|Protocol Adaptation| lagrange
QQBot -->|Business Logic| openmcpservice
OpenMCP CLI
只需一条命令,即可快速设置并运行 OpenMCP 开发环境:
# Install CLI globally
npm install -g @agent-ruler/openmcp
# Create a new project
openmcp init my-project
cd my-project
# Start development servers (service + renderer)
openmcp dev
CLI 命令
| 命令 | 说明 |
|---|---|
openmcp init <project-name> | 初始化一个新的 OpenMCP 项目 |
openmcp dev | 启动开发模式(后端 + 前端) |
openmcp dev --service-only | 仅启动后端服务 |
openmcp dev --renderer-only | 仅启动前端渲染器 |
openmcp start | 启动生产模式 |
openmcp update | 更新到最新版本 |
开发
- renderer:前端 UI 定义
- service:用于 renderer 的测试组件,包括一个简单的转发层
- src:VSCode 插件定义
Renderer 和 Service 开发
flowchart LR
D[renderer] <--> A[Dev Server]
<--ws--> B[service]
B <--mcp--> m(MCP Server)
项目设置:
npm run setup
启动开发服务器:
npm run serve
扩展开发
flowchart LR
D[renderer] <--> A[extention.ts] <--> B[service]
B <--mcp--> m(MCP Server)
构建以供部署:
npm run build
构建 VSCode 扩展:
npm run build:plugin
然后只需按 F5,我们开始吧
CI 流水线
✅ npm run build ✅ npm run build:task-loop ✅ openmcpent UT ✅ openmcp-sdk UT ✅ vscode extension UT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。
