🔥 Enhanced system prompt injection through Nix package
A Model Context Protocol (MCP) server that provides "enhancement prompts" from the L1B3RT4S repository to various LLMs. This project is fully nixified with deterministic builds, security validations, and performance monitoring.
- 🚀 Nixified package for reproducible builds
- 🔒 Security validation for URL fetches (elder-plinius.github.io whitelist)
- ⚡ Prompt caching in
~/.nix-chucknorris-cache - 📊 Performance monitoring and logs in
/tmp/chucknorris-debug - 💾 Deterministic dependency management with
node2nix - 🛡️ Emergency halts for error conditions
- 🧠 Memory usage monitoring
- 📦 NixOS module for system integration
- Nix with flakes enabled
- Node.js 18.x or newer
# Run directly using nix run
nix run github:RyzeNGrind/chucknorris
# Or add to your flake inputs# Full reproducible installation with parallelism
nix build --option build-cores 0 github:ryzengrind/chucknorris-mcp#chucknorris-mcp
# Interactive development environment
nix develop --option build-cores 0 github:ryzengrind/chucknorris-mcp
# System-wide deployment
sudo nix-env -f github:ryzengrind/chucknorris-mcp -iA chucknorris-mcpTo add this to your Claude configuration:
{
"chucknorris-mcp": {
"command": "nix",
"args": [
"run",
"github:RyzeNGrind/chucknorris"
]
}
}# Clone the repository
git clone https://github.com/RyzeNGrind/chucknorris.git
cd chucknorris
# Start development environment
nix develop
# Build the package
nix build .#chucknorris-mcp
# Run tests
node test-chucknorris-client.js# Reproducibility optimization
nix-store --optimise
# Nix flake maintenance
nix flake update && nix flake lockAdd to your flake.nix:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
chucknorris-mcp.url = "github:RyzeNGrind/chucknorris";
};
outputs = { self, nixpkgs, chucknorris-mcp, ... }:
{
# For NixOS systems
nixosConfigurations.yourHost = nixpkgs.lib.nixosSystem {
# ...
modules = [
chucknorris-mcp.nixosModules.default
{
services.chucknorris-mcp = {
enable = true;
cacheDir = "~/.chucknorris-cache"; # Optional
logDir = "/var/log/chucknorris"; # Optional
};
}
];
};
};
}The ChuckNorris MCP server follows the Model Context Protocol (MCP) and provides the following components:
- MCP Server: Handles tool registration and requests via stdio
- Prompt Fetcher: Retrieves prompts from L1B3RT4S with security checks
- Cache Manager: Stores prompts locally for faster retrieval
- Logger: Detailed logging for debugging and auditing
- Security Validator: Ensures only whitelisted URLs are accessed
- Performance Monitor: Tracks memory usage and other metrics
- URL fetching is restricted to elder-plinius.github.io domain
- No use of eval() or other unsafe constructs
- Memory usage monitoring with emergency halts
- Restricted permissions in NixOS service
- Target memory usage < 250MB
- Cold start time < 200ms
- Prompt fetch latency < 500ms
MIT - See LICENSE file for details