I’m trying to get started with MCP, but finding nothing for NixOS.
I want something like this microvm approach
Any pointers appreciated.
I’m trying to get started with MCP, but finding nothing for NixOS.
I want something like this microvm approach
Any pointers appreciated.
Hi, I’m running MCP servers via Nix. Nothing to it really, just calling nix shell
to provide dependencies e.g.
"playwright": {
"timeout": 60,
"command": "nix",
"args": [
"shell",
"nixpkgs#nodejs_22",
"--command",
"npx", "-y", "@playwright/mcp@0.0.10"
],
"transportType": "stdio"
}
For GitHub - tuananh/hyper-mcp: A fast, secure MCP server that extends its capabilities through WebAssembly plugins. I see it’s a Rust project. It would be pretty easy to write a Nix package for it, then just invoke it in your MCP config.
Not sure if that’s what you meant?
Invoke it in my MCP configuration? Isn’t the MCP inside the package?
…and yes, I just want to run mcp servers in a secure manner, like inside a vm.
What is it that you do? You say you run them in a nix-shell, but that is not well isolated?
I’m a bit confused, so bear with me;)
Invoke it in my MCP configuration? Isn’t the MCP inside the package?
You have an MCP client e.g. Cline or Aider. That has a JSON config file declaring MCP servers to run. You can run an MCP server with Nix the way I described. Makes sense?
…and yes, I just want to run mcp servers in a secure manner, like inside a vm.
What is it that you do? You say you run them in a nix-shell, but that is not well isolated?
Sure, some people run MCP servers via Docker, you can do that if you want?
“well isolated” depends on what the MCP server does.
For example if you have a Postgres MCP there’s no point isolating it, it just talks to Postgres. It doesn’t matter much if you run it on Docker or with Nix.
If you have a filesystem MCP server maybe you want to restrict what it can access via docker volume host mounting. Or maybe you do want to give it full access to your filesystem and constrain its actions to be read-only. Or maybe you want full access over everything. It depends on what you want to do.