cuda4cpu — Claude Code MCP server for CUDA checks
cuda4cpu lets an agent build, run, and test CUDA and HIP code on a CPU-only machine. Use it to check kernels from your coding environment without a GPU.
Apache-2.0 ★ 8 updated 2026-10-27
claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.4.1What cuda4cpu does
The MCP server sends CUDA and HIP code through cuda4cpu for compilation and execution on the CPU. It can surface incorrect results, memory errors, and barrier problems, so an agent can test a kernel without access to a graphics card.
For Claude Code, the install command starts the server in Docker with the image ghcr.io/javier-cabezas/cuda4cpu:0.4.1. Docker must be available; without it, this launch method will fail. Checks also catch missing __syncthreads() calls and cases where threads in one block reach different barriers.
What it helps with
- test a CUDA kernel without a GPU
- run HIP code on a CPU
- find incorrect computation results
- catch memory access errors
- detect missing or divergent barriers
Example prompts for the agent
- Build and run this CUDA kernel, then check its results.
- Test this HIP program for memory errors and incorrect output.
- Check whether every thread in the block reaches the same
__syncthreads()call.
How to install cuda4cpu
Platform CLI
claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.4.1Platform CLI
codex mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.4.1Config file
{
"mcpServers": {
"cuda4cpu": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/javier-cabezas/cuda4cpu:0.4.1"
]
}
}
}Config file
{
"servers": {
"cuda4cpu": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/javier-cabezas/cuda4cpu:0.4.1"
]
}
}
}Platform CLI
gemini mcp add cuda4cpu docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.4.1Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about cuda4cpu
How do I install cuda4cpu in Claude Code?
Add the MCP server with claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.4.1. Docker is required to run it this way.
What does cuda4cpu do?
It lets an agent compile, run, and check CUDA and HIP programs on a CPU without a GPU. Its checks can find wrong results, memory faults, and barrier issues.
Does cuda4cpu need a GPU?
No. It runs CUDA and HIP programs as CPU code. The Claude Code setup command uses Docker.