No description
Find a file
lukasl-dev 6fdc8193d4
Some checks failed
Build / build (push) Failing after 4s
Add cachix as binary cache into flake.nix
2025-08-22 13:27:10 +02:00
.github/workflows Update workflows 2025-08-22 13:23:05 +02:00
src Update README.md 2025-08-21 16:08:55 +02:00
.envrc Setup Nix flake 2025-08-19 11:50:37 +02:00
.gitignore Setup Nix flake 2025-08-19 11:50:37 +02:00
Cargo.lock Add cli with http support 2025-08-19 13:47:25 +02:00
Cargo.toml Add cli with http support 2025-08-19 13:47:25 +02:00
flake.lock Setup Nix flake 2025-08-19 11:50:37 +02:00
flake.nix Add cachix as binary cache into flake.nix 2025-08-22 13:27:10 +02:00
LICENSE Initial commit 2025-08-18 15:21:33 +02:00
README.md Update README.md 2025-08-21 16:08:55 +02:00
TODO.md Update TODO.md 2025-08-21 16:10:23 +02:00
VERSION Setup Nix flake 2025-08-19 11:50:37 +02:00

rime


Minimal MCP server for Nix tooling, written in Rust. It uses the rust-mcp-sdk and exposes a set of helpful Nix/NixOS tools through the Model Context Protocol (MCP).

The binary can run as either:

  • MCP over stdio
  • MCP over HTTP (with SSE or JSON-only responses)

Tools

  • nix_evaluate: Evaluate a Nix expression.
  • nix_log: Get build log for an installable.
  • nix_packages_search: Search packages in an installable.
  • nix_packages_why_depends: Show why a package depends on another.
  • nix_flakes_show: Show a flake's outputs.
  • nix_flakes_metadata: Show flake metadata.
  • nix_config_check: Run nix config check.
  • nix_config_show: Run nix config show.
  • nix_manual_list: List Markdown files in the Nix manual source.
  • nix_manual_read: Read a Markdown file from the Nix manual.
  • nixos_wiki_search: Search the NixOS wiki.
  • nixos_wiki_read_page: Read a page from the NixOS wiki.
  • nixos_channels: List available NixOS channels with their status.
  • manix_search: Search docs with manix.
  • nixhub_package_versions: Get the version history (releases, commit hashes) for a specific package using nixhub.

Note: Most tools shell out to nix; ensure nix is installed and available on PATH.

Build

With Cargo:

  • Debug: cargo build
  • Release: cargo build --release

With Nix (flake):

  • Build: nix build .#rime (binary at ./result/bin/rime)

Run

Help:

  • Cargo: cargo run -- --help
  • Nix: nix run .#rime -- --help

Stdio transport:

  • Cargo: cargo run -- stdio
  • Nix: nix run .#rime -- stdio

HTTP transport:

  • Cargo: cargo run -- http --host 127.0.0.1 --port 8080
  • Nix: nix run .#rime -- http --host 127.0.0.1 --port 8080

Usage

OpenAI Codex

Add the following snippet into your ~/.codex/config.toml:

[mcp_servers.rime]
command = "/path/to/rime"
args = ["stdio"]

See codex docs.

opencode

Add a new MCP server into your opencode config, e.g. globally at ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "rime": {
      "type": "local",
      "command": ["/path/to/rime", "stdio"],
      "enabled": true
    }
  }
}

See opencode docs.

Claude Code

Run the following command:

claude mcp add rime -- /path/to/rime stdio

See Claude Code docs.

Gemini Code

Add the following rime to mcpServers in your Gemini config, e.g. globally at ~/.gemini/settings.json.

{
  "mcpServers": {
    "rime": {
      "command": "/path/to/rime",
      "args": ["stdio"]
    }
  }
}

See Gemini Code docs.

VSCode

Add rime to .vscode/mcp.json:

{
  "servers": {
    "rime": {
      "type": "stdio",
      "command": "/path/to/rime",
      "args": ["stdio"]
    }
  }
}

See VSCode Copilot docs.

Credits