From baf09e8b1fd882397a3db601a4416d4da048ab8c Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Thu, 26 Mar 2026 22:48:40 -0700 Subject: [PATCH] Add MCP to Nix packages and wire agent to Nix-managed binary - Add mcp flake input (git+ssh://git@git.wntrmute.dev/mc/mcp.git) - Add mcp CLI to mcpkg.nix system packages (installed on all machines) - Update mcp.nix to use Nix-managed mcp-agent binary path instead of hardcoded /usr/local/bin/mcp-agent Co-Authored-By: Claude Opus 4.6 (1M context) --- configs/mcp.nix | 4 ++-- configs/mcpkg.nix | 1 + flake.nix | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configs/mcp.nix b/configs/mcp.nix index 2b27c76..ceb0cad 100644 --- a/configs/mcp.nix +++ b/configs/mcp.nix @@ -2,7 +2,7 @@ # # Creates a dedicated 'mcp' system user with rootless podman support # and a systemd service for the agent daemon. -{ pkgs, ... }: +{ pkgs, inputs, ... }: let mcpUid = 995; @@ -29,7 +29,7 @@ in serviceConfig = { Type = "simple"; - ExecStart = "/usr/local/bin/mcp-agent server --config /srv/mcp/mcp-agent.toml"; + ExecStart = "${inputs.mcp.packages.x86_64-linux.mcp-agent}/bin/mcp-agent server --config /srv/mcp/mcp-agent.toml"; Restart = "on-failure"; RestartSec = 5; diff --git a/configs/mcpkg.nix b/configs/mcpkg.nix index 36f78b2..031d188 100644 --- a/configs/mcpkg.nix +++ b/configs/mcpkg.nix @@ -6,5 +6,6 @@ inputs.mcr.packages.x86_64-linux.default inputs.mc-proxy.packages.x86_64-linux.default inputs.mcdeploy.packages.x86_64-linux.default + inputs.mcp.packages.x86_64-linux.default ]; } diff --git a/flake.nix b/flake.nix index 4be16bd..436d0f2 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,9 @@ mcdeploy.url = "git+https://git@git.wntrmute.dev/kyle/mcdeploy"; mcdeploy.inputs.nixpkgs.follows = "nixpkgs"; + mcp.url = "git+ssh://git@git.wntrmute.dev/mc/mcp.git"; + mcp.inputs.nixpkgs.follows = "nixpkgs"; + # exo.url = "git+https://git.wntrmute.dev/kyle/exo"; # exo.inputs.nixpkgs.follows = "nixpkgs";