Skip to content
MCP server

cuda4cpu

Compile, run and check CUDA and HIP kernels on a CPU so agents can test GPU code

Runs locally
Install

cuda4cpu is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
Linux, CLI, Self-hosted
Runs
Locally
Version
0.6.1
Listing updated

Similar MCP servers

Install

Run in a terminal

claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.6.1

Add to claude_desktop_config.json

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.6.1"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.6.1"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "cuda4cpu": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.6.1"
      ]
    }
  }
}

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

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.6.1"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.6.1"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

About cuda4cpu

A coding agent on a machine without a GPU can write CUDA but cannot run it. cuda4cpu-mcp closes that gap: it compiles .cu files with GCC or Clang and runs the kernels as native code on every core, then reports problems at their source lines.

Beyond wrong results, the checks flag bugs that a GPU can hide: a missing __syncthreads(), threads of a block reaching different barriers, reads of unwritten memory, races and leaks. It reruns threads in reverse or random order, and uses AddressSanitizer and UBSan, to expose order-dependent bugs. The README says 140 of 166 programs from NVIDIA's cuda-samples, Rodinia and AMD's rocm-examples build unmodified and pass.

The server speaks MCP over stdio and runs locally, either from a release install or the Docker image, where it sees only directories you mount. It needs Linux or WSL 2 on x86-64.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

compile
Returns nvcc or hipcc diagnostics at source lines and unsupported features used.
run
Returns the exit code, output and warnings.
check
Returns a verdict and findings such as memory errors, races and divergent barriers.
test_kernel
Tests one kernel from a launch configuration and expected values.
capabilities
Lists what is and is not implemented.

What it does

Compile without nvcc
Builds CUDA and HIP with a regular C++ compiler and no GPU.
Order-dependence checks
Reruns thread order to expose missing barriers and races.
Sanitizer findings
Reports memory errors and undefined behaviour at source lines.
Single-kernel testing
Tests one kernel from a launch configuration against expected values or a C++ reference.
Capability report
Tells the agent what is implemented so it can separate bugs from missing features.

Good for

  • Let an agent verify a kernel it just wrote
  • Run CUDA tests in CI on hosted runners without GPUs
  • Find a missing __syncthreads() before it reaches hardware
  • Teach CUDA in a classroom with no GPUs

Pricing

Open source

cuda4cpu FAQ

Does cuda4cpu need a GPU or the CUDA toolkit?

No. GCC or Clang compile the .cu files and kernels run on the CPU.

What platform does cuda4cpu need?

Linux or WSL 2 on x86-64 with GCC 14 or later and Python 3, or the Docker image.

Is HIP supported?

Yes, HIP code compiles too.

How is cuda4cpu registered with Claude Code?

Run claude mcp add cuda4cpu -- cuda4cpu-mcp, or use the Docker command from the README.

Is cuda4cpu free?

Yes. cuda4cpu is open source, so you can use and self-host it for free.

How do I add cuda4cpu to Claude Code?

Run this command in your terminal: claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.6.1

What are the best alternatives to cuda4cpu?

The closest alternatives to cuda4cpu are NEPHIS MCP Server, Chrome DevTools MCP, stackcheck, MCP Test Utils and fleet.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers