working on flake

This commit is contained in:
2025-07-17 11:07:04 -06:00
parent 0e417254e7
commit 6928166354
4 changed files with 49 additions and 2 deletions

12
mcp/config.json Normal file
View File

@@ -0,0 +1,12 @@
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}

31
mcp/flake.nix Normal file
View File

@@ -0,0 +1,31 @@
{
description = "MCP server dev shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bash
pkgs.python313Packages.pyppeteer
pkgs.python312
pkgs.glib
pkgs.glib.out
pkgs.chromium
pkgs.uvx
pkgs.nodejs_22
];
shellHook = ''
export PUPPETEER_EXECUTABLE_PATH=${pkgs.chromium}/bin/chromium
'';
};
packages.run = pkgs.writeShellScriptBin "run_flake" ''
uvx mcpo --port 8008 --config ./config.json
'';
});
}

View File

@@ -1,3 +1,3 @@
uvx mcpo --port 8001 --api-key "thekey" -- npx -y @modelcontextprotocol/server-puppeteer
# uvx mcpo --port 8001 --api-key "thekey" -- npx -y puppeteer-mcp-server uvx mcpo --port 8008 --config ./config.json

4
mcp/run_flake.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Run MCP server using flake devShell
nix develop .#default --command run_flake