MyNixOS website logo

MCP server configurations written to $XDG_CONFIG_HOME/mcp/mcp.json.

Each server is either a local (stdio) server via command or a remote (HTTP/SSE) server via url.

Besides declared options, arbitrary MCP fields are allowed.

Declarations
Type
attribute set of (open submodule of (JSON value))
Default
{ }
Example
{
  everything = {
    command = "npx";
    args = [ "-y" "@modelcontextprotocol/server-everything" ];
  };
  context7 = {
    url = "https://mcp.context7.com/mcp";
    headers.CONTEXT7_API_KEY = "{env:CONTEXT7_API_KEY}";
  };
  codeberg = {
    command = "/path/to/forgejo-mcp";
    args = [ "transport" "stdio" "--url" "https://codeberg.org" ];
    env.FORGEJO_ACCESS_TOKEN.file = "/run/secrets/codeberg_token";
  };
}