Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@yepcode/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yepcode/mcp-server - npm Package Compare versions

Comparing version
0.10.0
to
0.11.0
+5
-3
dist/index.js

@@ -8,10 +8,12 @@ #!/usr/bin/env node

const main = async () => {
let disableRunCodeTool = false;
let tools;
let runCodeCleanup = false;
if (process.env.YEPCODE_MCP_OPTIONS) {
const mcpOptions = process.env.YEPCODE_MCP_OPTIONS.split(",");
disableRunCodeTool = mcpOptions.includes("disableRunCodeTool");
runCodeCleanup = mcpOptions.includes("runCodeCleanup");
}
const server = new YepCodeMcpServer({}, { logsToStderr: true, disableRunCodeTool, runCodeCleanup });
if (process.env.YEPCODE_MCP_TOOLS) {
tools = process.env.YEPCODE_MCP_TOOLS.split(",").map((tool) => tool.trim());
}
const server = new YepCodeMcpServer({}, { logsToStderr: true, tools, runCodeCleanup });
try {

@@ -18,0 +20,0 @@ const transport = new StdioServerTransport();

@@ -8,7 +8,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";

private logger;
private disableRunCodeTool;
private tools;
private runCodeCleanup;
constructor(config: YepCodeApiConfig, { logsToStderr, disableRunCodeTool, runCodeCleanup, }?: {
constructor(config: YepCodeApiConfig, { logsToStderr, tools, runCodeCleanup, }?: {
logsToStderr?: boolean;
disableRunCodeTool?: boolean;
tools?: string[];
runCodeCleanup?: boolean;

@@ -15,0 +15,0 @@ });

@@ -14,5 +14,16 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";

const RUN_PROCESS_TOOL_TAG = "mcp-tool";
const RUN_CODE_TOOL_TAG = "run_code";
const EXECUTIONS_TOOL_TAG = "executions";
const ENV_VARS_TOOL_TAG = "env_vars";
const STORAGE_TOOL_TAG = "storage";
const DEFAULT_TOOL_TAGS = [
RUN_CODE_TOOL_TAG,
EXECUTIONS_TOOL_TAG,
ENV_VARS_TOOL_TAG,
STORAGE_TOOL_TAG,
RUN_PROCESS_TOOL_TAG,
];
dotenv.config();
class YepCodeMcpServer extends Server {
constructor(config, { logsToStderr = false, disableRunCodeTool = false, runCodeCleanup = false, } = {}) {
constructor(config, { logsToStderr = false, tools = DEFAULT_TOOL_TAGS, runCodeCleanup = false, } = {}) {
super({

@@ -28,3 +39,3 @@ name: "yepcode-mcp-server",

});
this.disableRunCodeTool = disableRunCodeTool;
this.tools = tools;
this.runCodeCleanup = runCodeCleanup;

@@ -128,8 +139,13 @@ this.setupHandlers();

this.logger.info(`Handling ListTools request`);
const tools = [
...envVarsToolDefinitions,
...storageToolDefinitions,
...getExecutionToolDefinitions,
];
if (!this.disableRunCodeTool) {
const tools = [];
if (this.tools.includes(EXECUTIONS_TOOL_TAG)) {
tools.push(...getExecutionToolDefinitions);
}
if (this.tools.includes(STORAGE_TOOL_TAG)) {
tools.push(...storageToolDefinitions);
}
if (this.tools.includes(ENV_VARS_TOOL_TAG)) {
tools.push(...envVarsToolDefinitions);
}
if (this.tools.includes(RUN_CODE_TOOL_TAG)) {
const envVars = await this.yepCodeEnv.getEnvVars();

@@ -141,3 +157,7 @@ tools.push(...(await runCodeToolDefinitions(envVars)));

while (true) {
const processes = await this.yepCodeApi.getProcesses({ page, limit });
const processes = await this.yepCodeApi.getProcesses({
page,
limit,
tags: this.tools,
});
this.logger.info(`Found ${processes?.data?.length} processes`);

@@ -147,5 +167,3 @@ if (!processes.data) {

}
tools.push(...processes.data
.filter((process) => process.tags?.includes(RUN_PROCESS_TOOL_TAG))
.map((process) => {
tools.push(...processes.data.map((process) => {
const inputSchema = zodToJsonSchema(RunProcessSchema);

@@ -201,3 +219,3 @@ if (!isEmpty(process.parametersSchema)) {

case runCodeToolNames.runCode:
if (this.disableRunCodeTool) {
if (!this.tools.includes(RUN_CODE_TOOL_TAG)) {
this.logger.error("Run code tool is disabled");

@@ -204,0 +222,0 @@ throw new McpError(ErrorCode.MethodNotFound, "Run code tool is disabled");

{
"name": "@yepcode/mcp-server",
"version": "0.10.0",
"version": "0.11.0",
"description": "MCP server for YepCode",

@@ -53,3 +53,3 @@ "main": "dist/index.js",

"@modelcontextprotocol/sdk": "^1.17.0",
"@yepcode/run": "^1.8.0",
"@yepcode/run": "^1.9.0",
"dotenv": "^16.4.7",

@@ -56,0 +56,0 @@ "zod": "^3.24.2"

+42
-11

@@ -1,2 +0,2 @@

![YepCode MCP Server Preview](/readme-assets/cover.png)
![YepCode MCP Server Preview](https://yepcode.io/images/cover/yepcode-ultimate-dev-tool-ai-solutions.png)

@@ -8,2 +8,4 @@ <div align="center">

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/yepcode/mcp-server-js/ci.yml)](https://github.com/yepcode/mcp-server-js/actions)
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/yepcode/mcp-server-js)](https://archestra.ai/mcp-catalog/yepcode__mcp-server-js)
[![smithery badge](https://smithery.ai/badge/@yepcode/mcp-server)](https://smithery.ai/server/@yepcode/mcp-server)

@@ -15,3 +17,3 @@

An MCP ([Model Context Protocol](https://modelcontextprotocol.io/introduction)) server that enables AI platforms to interact with [YepCode](https://yepcode.io)'s infrastructure. Run LLM generated scripts and turn your YepCode processes into powerful tools that AI assistants can use directly.
An MCP ([Model Context Protocol](https://modelcontextprotocol.io/introduction)) server that enables AI platforms to interact with [YepCode](https://yepcode.io/l/LQUKe)'s infrastructure. Run LLM generated scripts and turn your YepCode processes into powerful tools that AI assistants can use directly.

@@ -31,3 +33,3 @@ ### Why YepCode MCP Server?

1. Sign up to [YepCode Cloud](https://cloud.yepcode.io)
1. Sign up to [YepCode Cloud](https://yepcode.io/l/LQUKe)
2. Visit `Settings` > `API credentials` to create a new API token.

@@ -154,13 +156,29 @@

- Disable the run_code tool: In some cases, you may want to disable the `run_code` tool. For example, if you want to use the MCP server as a provider only for the existing tools in your YepCode account.
- Skip the run_code cleanup: By default, run_code processes source code is removed after execution. If you want to keep it for audit purposes, you can use this option.
- `runCodeCleanup`: Skip the run_code cleanup. By default, run_code processes source code is removed after execution. If you want to keep it for audit purposes, you can use this option.
Options can be passed as a comma-separated list in the `YEPCODE_MCP_OPTIONS` environment variable or as a query parameter in the MCP server URL.
Options can be passed as a comma-separated list in the `YEPCODE_MCP_OPTIONS` environment variable.
##### Tool Selection
You can control which tools are enabled by setting the `YEPCODE_MCP_TOOLS` environment variable with a comma-separated list of tool categories and process tags:
**Built-in tool categories:**
- `run_code`: Enables the code execution tool
- `executions`: Enables execution management tools
- `env_vars`: Enables environment variable management tools
- `storage`: Enables storage management tools
**Process tags:**
- Any tag used in your YepCode processes (e.g., `mcp-tool`, `core`, `api`, `automation`, etc.)
- When you specify a process tag, all processes with that tag will be exposed as individual MCP tools
- Process tools will be named `run_ycp_<process_slug>` (or `run_ycp_<process_id>` if the name is longer than 60 characters)
If not specified, all built-in tools are enabled by default, but no process tools will be exposed.
```typescript
// SSE server configuration
// SSE server configuration with options
{
"mcpServers": {
"yepcode-mcp-server": {
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=disableRunCodeTool,runCodeCleanup"
"url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=runCodeCleanup&tools=run_code,storage,env_vars,core,api"
}

@@ -170,3 +188,3 @@ }

// NPX configuration
// NPX configuration with options
{

@@ -179,3 +197,4 @@ "mcpServers": {

"YEPCODE_API_TOKEN": "your_api_token_here",
"YEPCODE_MCP_OPTIONS": "disableRunCodeTool,runCodeCleanup"
"YEPCODE_MCP_OPTIONS": "runCodeCleanup",
"YEPCODE_MCP_TOOLS": "run_code,storage,env_vars,core,api"
}

@@ -187,2 +206,7 @@ }

**Example scenarios:**
- `YEPCODE_MCP_TOOLS=run_code,storage` - Only enables built-in code execution and storage tools
- `YEPCODE_MCP_TOOLS=core,automation` - Only exposes processes tagged with "core" or "automation" as tools
- `YEPCODE_MCP_TOOLS=run_code,storage,core` - Enables built-in tools plus all processes tagged with "core"
### Environment Management

@@ -296,6 +320,13 @@

The MCP server can expose your YepCode Processes as individual MCP tools, making them directly accessible to AI assistants. This feature is enabled by just adding the `mcp-tool` tag to your process (see our docs to learn more about [process tags](https://yepcode.io/docs/processes/tags)).
The MCP server can expose your YepCode Processes as individual MCP tools, making them directly accessible to AI assistants. This feature is enabled by specifying process tags in the `YEPCODE_MCP_TOOLS` environment variable.
**How it works:**
1. Tag your YepCode processes with any tag (e.g., `core`, `api`, `automation`, `mcp-tool`, etc.)
2. Add those tags to the `YEPCODE_MCP_TOOLS` environment variable
3. All processes with the specified tags will be exposed as individual MCP tools
There will be a tool for each exposed process: `run_ycp_<process_slug>` (or `run_ycp_<process_id>` if tool name is longer than 60 characters).
For more information about process tags, see our [process tags documentation](https://yepcode.io/docs/processes/tags).
#### run_ycp_<process_slug>

@@ -302,0 +333,0 @@