# Sounio Compiler

A local stdio MCP server for the Sounio language compiler to check types and build .sio binaries directly through AI agents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 12
- Author: Sounio-lang
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Sounio-lang/sounio/tree/HEAD/tools/mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/sounio-compiler

## What it does

The server interfaces with the local `souc` compiler using standard input and output. It strictly runs offline: no remote endpoints, HTTP listeners, or token handshakes exist. Agents receive four main tools. The `sounio_check` tool validates syntax and types, while `sounio_compile` produces binaries targeting formats like ELF or WebAssembly. For execution and verification, `sounio_run` executes compiled output under a timeout, and `sounio_test` checks test files with directives such as `//@ run-pass`.

Beyond active tools, the server exposes documentation resources. Agents can read standard library details through `sounio://stdlib/` or fetch explanations for specific compiler codes via `sounio://errors/`. Diagnostic outputs supply line and column markers, allowing the model to quickly fix reported syntax or type issues.

Source files outside the `/workspace/sounio` folder are rejected immediately. The server expects the compiler launcher at `scripts/lib/resolve_souc.sh`, requiring a ready local checkout. When running programs via `sounio_run`, environment variables containing credentials or tokens are blocked automatically.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add sounio-mcp-server -- uvx sounio-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from sounio-mcp-server <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp -- uvx sounio-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from sounio-mcp-server <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "uvx",
            "args": [
                "sounio-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from sounio-mcp-server <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "sounio-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from sounio-mcp-server <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp uvx sounio-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from sounio-mcp-server <command>

## When to use it
- validate types in `.sio` source files before compilation
- compile Sounio code to host ELF or WebAssembly artifacts
- execute compiled binaries with custom arguments and timeouts
- run automated language test suites using comment directives
- lookup official error code descriptions and compiler notes

## Example prompts
- Run type checks on `examples/hello.sio` and return errors.
- Compile `tests/fixtures/broken_dose.sio` targeting ELF format.
- Inspect error code `E070` using the compiler error resource.

## Similar
- [Serena MCP: the IDE for your agent](https://affpapa.org/en/nevibecode/mcp/serena-mcp-the-ide-for-your-agent.md) — MCP server · ★ 30739
- [Compiler Explorer](https://affpapa.org/en/nevibecode/mcp/compiler-explorer.md) — MCP server · ★ 19155
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/claude-code-explorer-mcp.md) — MCP server · ★ 6236
- [Tolgee](https://affpapa.org/en/nevibecode/mcp/tolgee.md) — MCP server · ★ 4140
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2066
- [pyscn](https://affpapa.org/en/nevibecode/mcp/pyscn.md) — MCP server · ★ 1097

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
