Skip to main content
Glama

mcp-omnienv-nix

MCP server that spins up Nix-backed, polyglot ephemeral environments. It uses nix shell to build disposable toolchains for interpreted stacks (Python, Node.js, Ruby, R, Lua; extendable) and runs your command inside that shell. Package availability depends on nixpkgs (e.g., python313Packages.requests, rPackages.misty, nodePackages.sloc).

Why

  • Coding agents often need ad-hoc Python/Node/Ruby/R/Lua deps. Preloading everything is noisy; venvs clutter a system.

  • With Nix on the host, this server asks for packages on demand, pulls them into the store, and leaves the rest of the environment clean—no venvs or global installs.

  • Runs over MCP (stdio transport) so agent clients can call the tools directly.

Related MCP server: Node.js Sandbox MCP Server

Tools

  • list_languages — enumerate supported languages and their base Nix packages.

  • run_in_env(language, command, extra_packages?, timeout_seconds?) — launch a nix shell with base + extras and execute command. Returns JSON: stdout, stderr, exit_code.

Quick start

# Try it ad-hoc
nix shell github:StealthBadger747/mcp-omnienv-nix -c mcp-omnienv-nix

Hook into your MCP client (stdio transport). Example config shape:

{
  "mcpServers": {
    "mcp-omnienv-nix": {
      "command": "mcp-omnienv-nix"
    }
  }
}

Extending languages

  • Edit SUPPORTED_LANGUAGES in mcp_omnienv_nix/server.py to add a language and its base packages.

  • run_in_env validates extra packages against a simple regex and appends them to the nix shell invocation.

Development

# Nix dev shell with deps + pytest
nix develop . -c pytest
# Run integration tests (hit nix shell for real package resolution)
MCP_OMNIENV_INTEGRATION=1 nix develop . -c pytest -m integration

License

MIT.

Available Tools

2 tools
list_languagesB

List supported languages and their base Nix packages.

Inputs: no named parameters. Returns: result

run_in_env_implC

Run a shell command in a disposable Nix shell for the chosen language.

Inputs: language (required), command (required), extra_packages, timeout_seconds. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: list_languages enumerates available options, while run_in_env_impl executes commands in a specific environment. There is no overlap or ambiguity between them.

    Naming Consistency3/5

    The naming is mixed: list_languages follows a verb_noun pattern, but run_in_env_impl uses a less conventional verb_in_noun_impl style. While readable, the inconsistency in naming conventions is noticeable.

    Tool Count2/5

    With only 2 tools, the server feels thin for its apparent scope of managing language environments in Nix. A typical server in this domain would include more operations like creating, updating, or inspecting environments, making this count borderline inadequate.

    Completeness2/5

    The toolset is severely incomplete for managing Nix language environments. It lacks essential operations such as creating, updating, or deleting environments, and provides no way to inspect or modify specific environment configurations, leaving significant gaps in coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.
      16
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables running arbitrary JavaScript code in isolated Docker containers with on-the-fly npm dependency installation, supporting both ephemeral one-shot executions and persistent sandbox environments.
      156
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables local, Docker-isolated code execution across six programming languages including Python, Rust, and TypeScript. It features pre-warmed container pooling, persistent sessions, and built-in support for machine learning libraries.
      MIT