About soma
soma is an MCP server for developers and coding agents that generates code and checks candidate code by running tests in an isolated sandbox. Its signed Ed25519 certificates can be verified offline, and code for tasks that cannot be verified is labeled uncertified.
Key features
- 01Execute candidate code against tests in a sandbox
- 02Generate code and test it before returning
- 03Return signed, offline-checkable certificates
- 04Support verification in 15+ languages
- 05Clearly label code that could not be verified
Use cases
- 01Check a proposed function against input-output cases
- 02Verify a program's expected standard input and output
- 03Review generated code with a signed test verdict
MCP support
Exposes soma_verify_code for sandboxed test execution and soma_generate_verified_code for code generation followed by testing. Results include a PASS/FAIL verdict and, when verified, a signed certificate that can be checked offline.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y soma-verify-mcpSOMA_API_KEYSecretOptional Soma API key. A throttled public demo key is built in, so this is not required to try it. Free preview keys: [email protected].SOMA_BASE_URLSoma API base URL. Defaults to the hosted Soma endpoint.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
2Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | The complete source code to verify. |
| mode | enum | No | 'function' (default) or 'stdio'.function | stdio |
| tests | array | Yes | function mode: [{input:[args], expected: value}]. stdio mode: [{stdin:'...', expected_stdout:'...'}]. |
| language | string | Yes | Programming language, e.g. 'python', 'javascript', 'go', 'rust'. |
| entrypoint | string | No | Function name to call (required for function mode; omit for stdio mode). |
Details
From the project READMESoma MCP Server
Give your AI agent the one thing it can't do for itself: actually run code against tests and prove it passed.
Soma is an execution-verified code service. This MCP server exposes two tools:
soma_verify_code— run candidate code against tests inside an isolated sandbox; get a PASS/FAIL verdict plus a signed, offline-checkable certificate (Ed25519). Use it to independently confirm code works before trusting it.soma_generate_verified_code— ask Soma to write code for a task; when the task is verifiable, the returned code has already been executed against derived tests, with a certificate attached.
15+ languages are supported for verification (Python, JavaScript/TypeScript, Go, C/C++, Java, Rust, Ruby, PHP, Bash, and more).
Install
Requires Node.js 18+. Runs over stdio.
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"soma": {
"command": "npx",
"args": ["-y", "soma-verify-mcp"],
"env": {
"SOMA_API_KEY": "YOUR_SOMA_KEY"
}
}
}
}
- Claude Desktop:
Settings → Developer → Edit Config, add the block above, restart. - Cursor:
Settings → MCP → Add, or drop the same block in~/.cursor/mcp.json.
Configuration
| Env var | Required | Default | Purpose |
|---|---|---|---|
SOMA_API_KEY | yes | — | Your Soma API key. |
SOMA_BASE_URL | no | https://170-9-236-56.sslip.io | Soma API base URL. |
SOMA_TIMEOUT_MS | no | 300000 | Per-request timeout. |
Get a free preview key: contact [email protected] (free tier during the preview).
Tools
soma_verify_code
Run code against tests and return a signed verdict.
language(string) — e.g.python,javascript,go,rust.code(string) — the complete source to verify.tests(array) — one of:- function mode (default):
[{ "input": [arg1, arg2], "expected": value }]plusentrypoint(the function name). - stdio mode: set
mode: "stdio"and[{ "stdin": "...", "expected_stdout": "..." }]; no entrypoint.
- function mode (default):
entrypoint(string, optional) — function name for function mode.mode("function"|"stdio", optional).
Returns: verdict, tests_passed, tests_total, and a signature / public_key / sig_alg you can check offline.
soma_generate_verified_code
Get code for a task, executed against derived tests before it's returned.
prompt(string) — the coding task. Include concrete input/output examples (e.g.>>> f(2) == 4) so the result is verifiable rather than best-effort.max_tokens(int, optional, default 1500).
Returns: the code, certified (bool), and a certificate (verdict, tests_passed, tests_total) when verification passed. If a task isn't verifiable, output is returned uncertified and clearly labeled — never a false "verified".
What the certificate means
A certificate attests that the listed tests passed inside an isolated sandbox at generation time. It is signed (Ed25519) and checkable offline against the returned public key. It is not a warranty of fitness for any purpose — review output before production use.
Privacy
No training on your prompts. See the Soma Privacy & Data Policy at ${SOMA_BASE_URL}/privacy.
License
MIT.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.