

什么是 YepCode MCP 服务器?
MCP(模型上下文协议)服务器,使 AI 平台能够与YepCode的基础架构进行交互。运行 LLM 生成的脚本,将您的 YepCode 流程转化为 AI 助手可直接使用的强大工具。
为什么选择 YepCode MCP 服务器?
无缝 AI 集成:无需配置即可将 YepCode 流程转换为 AI 就绪工具
实时过程控制:实现人工智能系统与工作流程之间的直接交互
企业级安全性:在 YepCode 隔离的生产就绪环境中执行代码
通用兼容性:与任何支持模型上下文协议的 AI 平台集成
Related MCP server: Vibe Coder MCP
集成指南
YepCode MCP 服务器可以使用远程方法(我们提供 MCP 服务器的托管版本)或本地方法(需要安装 NPX 或 Docker)与Cursor或Claude Desktop等 AI 平台集成。
使用 SSE 服务器的远程方法
注册YepCode Cloud
从您的工作区中获取您的 MCP 服务器 URL: Settings > API credentials 。
将以下配置添加到您的 AI 平台设置:
{
"mcpServers": {
"yepcode-mcp-server": {
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse"
}
}
}
本地方法
必需的环境变量
使用 NPX
将以下配置添加到您的 AI 平台设置:
{
"mcpServers": {
"yepcode-mcp-server": {
"command": "npx",
"args": ["-y", "@yepcode/mcp-server"],
"env": {
"YEPCODE_API_TOKEN": "your_api_token_here",
}
}
}
}
使用 Docker
构建容器镜像:
docker build -t yepcode/mcp-server .
将以下配置添加到您的 AI 平台设置:
{
"mcpServers": {
"yepcode-mcp-server": {
"command": "docker",
"args": [
"run",
"-d",
"-e",
"YEPCODE_API_TOKEN=your_api_token_here",
"yepcode/mcp-server"
]
}
}
}
调试
由于 MCP 服务器通过 stdio 进行通信,因此调试起来可能比较棘手。为了简化调试,我们建议使用MCP Inspector ,您可以使用以下命令运行它:
这将启动一个服务器,您可以在浏览器中直接访问调试工具。
YepCode MCP 工具参考
MCP 服务器提供了多种与 YepCode 基础设施交互的工具:
代码执行
运行代码
在 YepCode 的安全环境中执行代码。
// Input
{
code: string; // The code to execute
options?: {
language?: string; // Programming language (default: 'javascript')
comment?: string; // Execution context
settings?: Record<string, unknown>; // Runtime settings
}
}
// Response
{
returnValue?: unknown; // Execution result
logs?: string[]; // Console output
error?: string; // Error message if execution failed
}
MCP 选项
YepCode MCP 服务器支持以下选项:
选项可以作为YEPCODE_MCP_OPTIONS环境变量中的逗号分隔列表传递,也可以作为 MCP 服务器 URL 中的查询参数传递。
// SSE server configuration
{
"mcpServers": {
"yepcode-mcp-server": {
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=disableRunCodeTool,skipRunCodeCleanup"
}
}
}
// NPX configuration
{
"mcpServers": {
"yepcode-mcp-server": {
"command": "npx",
"args": ["-y", "@yepcode/mcp-server"],
"env": {
"YEPCODE_API_TOKEN": "your_api_token_here",
"YEPCODE_MCP_OPTIONS": "disableRunCodeTool,skipRunCodeCleanup"
}
}
}
}
环境管理
设置环境变量
在 YepCode 工作区中设置环境变量。
// Input
{
key: string; // Variable name
value: string; // Variable value
isSensitive?: boolean; // Whether to mask the value in logs (default: true)
}
删除环境变量
从 YepCode 工作区中删除环境变量。
// Input
{
key: string; // Name of the variable to remove
}
流程执行
MCP 服务器可以将您的 YepCode 流程公开为单独的 MCP 工具,以便 AI 助手直接访问。只需在您的流程中添加mcp-tool标签即可启用此功能(请参阅我们的文档,了解更多关于流程标签的信息)。
每个暴露的进程都会有一个工具: run_ycp_<process_slug> (如果工具名称超过 60 个字符,则为run_ycp_<process_id> )。
run_ycp_<process_slug>
// Input
{
parameters?: any; // This should match the input parameters specified in the process
options?: {
tag?: string; // Process version to execute
comment?: string; // Execution context
};
synchronousExecution?: boolean; // Whether to wait for completion (default: true)
}
// Response (synchronous execution)
{
executionId: string; // Unique execution identifier
logs: string[]; // Process execution logs
returnValue?: unknown; // Process output
error?: string; // Error message if execution failed
}
// Response (asynchronous execution)
{
executionId: string; // Unique execution identifier
}
获取执行
检索流程执行的结果。
// Input
{
executionId: string; // ID of the execution to retrieve
}
// Response
{
executionId: string; // Unique execution identifier
logs: string[]; // Process execution logs
returnValue?: unknown; // Process output
error?: string; // Error message if execution failed
}
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。