YepCode Secure Execution MCP server

Enables secure execution of LLM-generated scripts and processes in isolated environments with environment variable management for teams needing to run code directly from AI assistants.
Back to servers
Setup instructions
Provider
YepCode
Release date
May 01, 2025
Language
JavaScript
Stats
24 stars

YepCode MCP Server is a powerful tool that connects AI platforms with YepCode's infrastructure, allowing AI assistants to execute scripts and interact with your workflows. It implements the Model Context Protocol (MCP) to enable seamless communication between AI systems and your YepCode processes.

Installation Options

You can set up the YepCode MCP Server either remotely (using YepCode's hosted version) or locally. Both approaches require YepCode API credentials.

Getting Your API Credentials

  1. Sign up at YepCode Cloud
  2. Navigate to Settings > API credentials
  3. Create a new API token

Remote Installation (Hosted Version)

For MCP Clients Without Authentication Header Support

Use the SSE server URL that includes your API token:

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse"
    }
  }
}

For MCP Clients With Authentication Header Support

Use the HTTP server URL with an authorization header:

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "url": "https://cloud.yepcode.io/mcp/sse",
      "headers": {
        "Authorization": "Bearer <sk-c2E....RD>"
      }
    }
  }
}

Local Installation

Using NPX (Requires Node.js v18+)

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "command": "npx",
      "args": ["-y", "@yepcode/mcp-server"],
      "env": {
        "YEPCODE_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Using Docker

First, build the container image:

docker build -t yepcode/mcp-server .

Then configure your MCP client:

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-d",
        "-e",
        "YEPCODE_API_TOKEN=your_api_token_here",
        "yepcode/mcp-server"
      ]
    }
  }
}

Usage Guide

Debugging

For troubleshooting MCP server communication, use the MCP Inspector:

npm run inspector

This starts a server with browser-based debugging tools.

Configuration Options

You can customize the MCP server behavior using the following options (passed via YEPCODE_MCP_OPTIONS environment variable or as URL query parameters):

  • disableRunCodeTool - Disables the run_code tool
  • runCodeCleanup - Prevents removal of source code after execution (for audit purposes)

Example with options:

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "url": "https://cloud.yepcode.io/mcp/sk-c2E....RD/sse?mcpOptions=disableRunCodeTool,runCodeCleanup"
    }
  }
}

Or with NPX:

{
  "mcpServers": {
    "yepcode-mcp-server": {
      "command": "npx",
      "args": ["-y", "@yepcode/mcp-server"],
      "env": {
        "YEPCODE_API_TOKEN": "your_api_token_here",
        "YEPCODE_MCP_OPTIONS": "disableRunCodeTool,runCodeCleanup"
      }
    }
  }
}

Available Tools

Code Execution

run_code

Executes code in YepCode's secure environment:

// 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
}

Environment Management

set_env_var

Sets an environment variable in your YepCode workspace:

// Input
{
  key: string;                           // Variable name
  value: string;                         // Variable value
  isSensitive?: boolean;                 // Whether to mask the value in logs (default: true)
}

remove_env_var

Removes an environment variable:

// Input
{
  key: string;                           // Name of the variable to remove
}

Process Execution

You can expose YepCode Processes as MCP tools by adding the mcp-tool tag to them. The server will create a tool for each process with the name run_ycp_<process_slug>.

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
}

get_execution

Retrieves the result of a process execution:

// 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
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "yepcode-mcp-server" '{"command":"npx","args":["-y","@yepcode/mcp-server"],"env":{"YEPCODE_API_TOKEN":"your_api_token_here"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "yepcode-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@yepcode/mcp-server"
            ],
            "env": {
                "YEPCODE_API_TOKEN": "your_api_token_here"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "yepcode-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@yepcode/mcp-server"
            ],
            "env": {
                "YEPCODE_API_TOKEN": "your_api_token_here"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later