dc23a30013
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 26s
Python MCP server (fastmcp + httpx) that exposes the Pinchflat REST API as MCP tools. Covers sources, media items, media profiles, tasks, and settings endpoints. Tested against live Pinchflat instance — 28 sources, search, app info all working via stdio transport.
42 lines
834 B
Nix
42 lines
834 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
makeWrapper,
|
|
python3,
|
|
}:
|
|
|
|
let
|
|
python = python3.withPackages (
|
|
ps: with ps; [
|
|
fastmcp
|
|
httpx
|
|
]
|
|
);
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "pinchflat-mcp";
|
|
version = "0.1.0";
|
|
|
|
src = ./server.py;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/pinchflat-mcp $out/bin
|
|
cp $src $out/lib/pinchflat-mcp/server.py
|
|
|
|
makeWrapper ${python}/bin/python $out/bin/pinchflat-mcp \
|
|
--add-flags "$out/lib/pinchflat-mcp/server.py" \
|
|
--set-default PINCHFLAT_MCP_TRANSPORT stdio
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "MCP server for Pinchflat media downloader";
|
|
homepage = "https://gitea.bueso.eu/hermes-agent/pinchflat";
|
|
license = licenses.mit;
|
|
mainProgram = "pinchflat-mcp";
|
|
platforms = platforms.all;
|
|
};
|
|
} |