
Sounio Compiler
io.github.agourakis82Published by GitHub account agourakis82v0.1.0Updated Oct 24, 2026
Check, compile, run, and test Sounio programs locally.
Overview
Local MCP server that gives an assistant the Sounio compiler to type-check, compile, run and test .sio programs.
- What you can do
- Type-check .sio files and return normalized diagnostics with line/column spans and notes
- Compile a checked file to a local artefact for elf, macho, ptx, metal or wasm targets
- Run a program and capture stdout, stderr and exit code with a timeout
- Run Sounio test files or directories using run-pass, compile-fail and related annotations
- Read stdlib module context and compiler error explanations as resources
- When to use it
- Useful when an assistant writes or edits Sounio source and needs a real compiler in the loop to check, fix and re-check code, or to run Sounio tests and examples locally.
- Requirements
- Runs as a local stdio process installed from PyPI (pip install sounio-mcp-server) and started with python -m sounio_mcp.server. Needs a local Sounio checkout with the souc compiler resolvable through its launcher script, and source paths must stay inside /workspace/sounio. No authentication, tokens or environment variables are declared.
Installation
In SourceWeft
- Open Sounio Compiler in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Sounio MCP Server
sounio-mcp-server exposes the checked Sounio compiler to agentic tools over
local Model Context Protocol stdio transport. It is intentionally local-only:
no HTTP transport, no OAuth, no token handling, and no remote execution path.
Install
Claude Code:
The server resolves souc through scripts/lib/resolve_souc.sh, which in this
checkout resolves to the checked self-hosted launcher (bin/souc on supported
hosts). The server rejects source paths outside /workspace/sounio.
Tool calls return both MCP text content and structuredContent. The text content
keeps the prompt's shell examples simple; structuredContent lets typed MCP
clients consume the result without reparsing JSON text.
Tools
sounio_check
Type-checks a .sio file and returns diagnostics normalised from
souc check --json.
Example:
The response includes two diagnostic views:
diagnostics: agent-friendly records with string severity, one-basedline/column, spans, related notes, and warnings.diagnostic_envelope: the CC-1/CC-2 sharedsounio.diagnostic.v1envelope validated againsttools/shared/diagnostic_schema.json.
sounio_compile
Runs sounio_check, then compiles a valid file to a local artefact.
Example:
Targets are accepted as elf, macho, ptx, metal, or wasm. The current
checked launcher is strongest for host-native ELF; other targets are passed
through to the compiler target flag and reported honestly if unsupported.
sounio_run
Runs souc run, captures stdout/stderr/exit code, and reports compile_error,
runtime_error, timeout, or ok.
Example:
Environment overrides are allowed only for non-sensitive keys. Keys containing tokens, secrets, credentials, proxies, or auth material are rejected.
sounio_test
Runs a Sounio test directory or file programmatically using the checked compiler.
Example:
The test runner understands the existing //@ run-pass, //@ compile-fail,
//@ check-only, //@ expect-stdout, //@ expect-stdout-contains,
//@ error-pattern, and //@ ignore annotations.
Resources
sounio://stdlib/{module}returns stdlib README/source context.sounio://errors/{error_code}returns compiler error explanations traced to current compiler source or committed compile-failure evidence.
Examples:
Error -> Fix Loop
The loop is deliberately thin:
- Agent writes or edits a
.siofile. - Agent calls
sounio_check. - Diagnostics are injected into the next prompt.
- Agent revises the file.
- Agent repeats until diagnostics are empty or the iteration budget is reached.
The reproducible local demonstration is:
Current fixture benchmark:
- fixtures: 20
- agent model:
deterministic-fixture-agent-v0.1 - seed:
1729 - convergence rate:
1.0 - average iterations:
1.0
This is a local recipe for the LLMloop pattern, not a claim about a hosted model. It exists so Claude Code, Cursor, ChatGPT via MCP, and CLI agents can close the same check/fix/re-check loop using the real Sounio compiler.
Cross-Agent Use
- CC-1 owns
tools/shared/diagnostic_schema.json; MCP consumes the samesouc check --jsonshape and keeps the LSP-compatiblerangefields. - Cx-1 should use
sounio_checkas the canonical validation method for generated dataset examples. - Cx-2 can use
sounio_runas the HumanEval/MultiPL-E execution harness once translated.siofiles are produced.
Quality Notes
- No compiler binary is modified.
- No remote MCP transport is implemented.
- Error catalogue entries are trace-backed; unknown codes return an explicit "not promoted yet" resource instead of invented explanations.
- The checked launcher's
compilecompatibility mode may exit zero even when an artefact is not emitted, sosounio_compileverifies output existence. - The focused Python gate covers direct tools, schema validation, one-shot
JSON-RPC, and an actual
mcpPython SDK client session over stdio.
Source: tools/mcp/README.md at commit 9dc32e1
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts