Skip to main content
Every sandbox is exposed via an MCP server that allows agents to operate a sandbox using tool calls.

Connect to the MCP server

The MCP server operates through streamable HTTP at the sandbox’s base URL:
https://<SANDBOX_BASE_URL>/mcp
Blaxel has replaced its WebSockets implementation for MCP transport with streamable HTTP (as of November 2025). Blaxel will continue to temporarily support WebSockets for a transition period, but users should update their deployments to the streamable HTTP transport as soon as possible to avoid errors.
Connect to this MCP server like any other MCP server though the endpoint shown above. Instructions for some popular applications are provided below.
You must provide your Blaxel API key in the Authorization header. If your user has access to multiple workspaces, include the workspace header as well.
  • Required: Authorization: Bearer <APIKEY>
  • Optional (multi-workspace): X-Blaxel-Workspace: <WORKSPACE_NAME_OR_ID>

Add to Cursor

Add the server to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "blaxel": {
      "url": "https://<SANDBOX_BASE_URL>/mcp",
      "headers": {
        "Authorization": "Bearer <APIKEY>",
        "X-Blaxel-Workspace": "<OPTIONAL_WORKSPACE>"
      }
    }
  }
}

Add to Claude Code

Add the remote HTTP server to your Claude Code by running the following command:

claude mcp add --transport http blaxel https://<SANDBOX_BASE_URL>/mcp \\
  --header "Authorization: Bearer <APIKEY>" \\
  --header "X-Blaxel-Workspace: <OPTIONAL_WORKSPACE>"

Add to Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "blaxel": {
      "url": "https://<SANDBOX_BASE_URL>/mcp",
      "headers": {
        "Authorization": "Bearer <APIKEY>",
        "X-Blaxel-Workspace": "<OPTIONAL_WORKSPACE>"
      }
    }
  }
}

Tools available in the MCP server

  1. Process management:
    1. processExecute - Execute a command.
    2. processGet - Get process information by identifier (PID or name).
    3. processGetLogs - Get logs for a specific process.
    4. processKill - Kill a specific process.
    5. processStop - Stop a specific process.
    6. processesList - List all running processes.
  2. Filesystem operations
    1. fsDeleteFileOrDirectory - Delete a file or directory.
    2. fsGetWorkingDirectory - Get the current working directory.
    3. fsListDirectory - List contents of a directory.
    4. fsReadFile - Read contents of a file.
    5. fsWriteFile - Create or update a file.
  3. Tools specialized for code generation AI:
    1. codegenEditFile - Propose and apply a targeted edit to a specified file, with instructions and partial contents. This tool uses Morph or Relace for fast edits, and requires the corresponding API key set as an environment variable when creating the sandbox.
    2. codegenCodebaseSearch - Find semantic code snippets from the codebase based on a natural language query.
    3. codegenFileSearch - Fast fuzzy filename search in the project.
    4. codegenGrepSearch - Run fast, exact regex/text searches on files for locating patterns or strings.
    5. codegenListDir - List contents of a directory in the project.
    6. codegenParallelApply - Plan and apply similar changes to multiple locations/files simultaneously.
    7. codegenReadFileRange - Read a specific range of lines in a file (max 250 lines at once).
    8. codegenReapply - Retry the application of the last edit, in case it previously failed.
Using Blaxel SDK, you can retrieve the tools for a sandbox in any supported framework format by passing the sandbox’s name. For example, in LangGraph:
import { blTools } from "@blaxel/vercel";

const tools = await blTools([`sandbox/${sandboxName}`])
Read more documentation on connecting to the MCP server directly from your code.