Soma

io.github.medianemi-beep由 GitHub 账号 medianemi-beep 发布v0.1.0更新于 Nov 3, 2026

Execution-verified code generation and verification with signed, offline-checkable certificates.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

Soma 在沙箱中运行候选代码并执行测试,返回 PASS/FAIL 结论和可离线校验的签名证书,也能生成经过验证的代码。

可以做什么
  • 在隔离沙箱中运行代码与测试,返回结论及通过数量
  • 获取带公钥和签名算法的 Ed25519 签名证书,可离线校验
  • 针对任务生成代码,并在返回前用推导出的测试实际执行
  • 支持 Python、JavaScript/TypeScript、Go、C/C++、Java、Rust、Ruby、PHP、Bash 等 15 种以上语言
  • 可选择函数模式(输入/期望值加入口函数)或 stdio 模式(标准输入与期望输出)
适用场景
当助手编写代码、而你需要独立证据证明它确实通过测试时使用;也适合需要生成代码并已用推导测试执行过的场景。最适合带有具体输入输出示例、可自动验证的任务。
运行要求
通过 npm 包 soma-verify-mcp 以 stdio 在本地运行,需要 Node.js 18+。需要在 SOMA_API_KEY 中提供 Soma API 密钥(内置限速的公共演示密钥,也可联系提供方获取免费预览密钥)。可选 SOMA_BASE_URL 与 SOMA_TIMEOUT_MS,并需能访问托管的 Soma 端点。
安装前请注意
代码、测试和提示词会发送到所配置的远程 Soma 服务,请勿提交专有或敏感源码。README 将 SOMA_API_KEY 标为必需,而清单称其可选并内置演示密钥;证书仅证明所列测试在生成时的沙箱中通过,并不保证适用性,投入生产前请自行审查输出。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Soma,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Soma 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.):

json
{  "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 varRequiredDefaultPurpose
SOMA_API_KEYyes—Your Soma API key.
SOMA_BASE_URLnohttps://170-9-236-56.sslip.ioSoma API base URL.
SOMA_TIMEOUT_MSno300000Per-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 }] plus entrypoint (the function name).
    • stdio mode: set mode: "stdio" and [{ "stdin": "...", "expected_stdout": "..." }]; no entrypoint.
  • 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.

来源:README.md,提交 bc14927

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。