damens_mcps
CLAUDE.md2 starsChanged 13 months agoMITView on GitHub
This is a collection of Model Context Protocol (MCP) servers for managing infrastructure components. Each MCP server provides AI assistants with direct API access to different platforms (pfSense, TrueNAS, iDRAC, Proxmox). Status Overview: - pfSense MCP: ✅ Production-ready - Comprehensive firewall management with 20+ tools - TrueNAS MCP: ✅ Production-ready - Storage and NAS management with HTTP/CLI interface - iDRAC MCP: ✅ Stable - Dell server power management with 8 tools for multi-server fleets - Proxmox MCP: ✅ Stable -…
- Reads credentials
- Installs packages
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
21 rules. About 0 are common, 13 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
All servers use JSON-RPC or MCP library implementations
- Very specific: line 190
Use config.example.json and env.example as templates
- Very specific: line 191
All sensitive files are in .gitignore
- Very specific: line 197
Use .env files for configuration
- Distinctive: line 200
Consider environment variables or external secret managers for production
- Distinctive: line 208
Production: Use external secret management (Vault, AWS Secrets Manager)
- Distinctive: line 215
Consider external secret management for production
- Very specific: line 219
Production: Always use SSL_VERIFY=true or ssl_verify: true
- Distinctive: line 226
All tool inputs are validated before execution
- Very specific: line 321
Check network connectivity: ping <host>
- Very specific: line 322
Verify port access: telnet <host> <port>
- Very specific: line 323
Test API directly: curl -k https://<host>/api/endpoint
- Distinctive: line 324
Check credentials in config
- Distinctive: line 325
Verify API is enabled on target platform
- Distinctive: line 326
Check SSL verification settings
- Distinctive: line 338
Must enable API access in System → API
- Distinctive: line 388
Use health checks before heavy operations
- Distinctive: line 393
Delete VMs/containers (Proxmox)
- Distinctive: line 394
Remove firewall rules (pfSense)
- Distinctive: line 397
Always validate parameters and consider confirmation prompts.
- Very specific: line 408
Use Python logging module for structured logging
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Repository Overview
This is a collection of Model Context Protocol (MCP) servers for managing infrastructure components. Each MCP server provides AI assistants with direct API access to different platforms (pfSense, TrueNAS, iDRAC, Proxmox).
Status Overview:
- pfSense MCP: ✅ Production-ready - Comprehensive firewall management with 20+ tools
- TrueNAS MCP: ✅ Production-ready - Storage and NAS management with HTTP/CLI interface
- iDRAC MCP: ✅ Stable - Dell server power management with 8 tools for multi-server fleets
- Proxmox MCP: ✅ Stable - Virtualization management with 21 tools for VMs and containers
Important Notes:
- All servers use JSON-RPC or MCP library implementations
- Security varies by project - see individual
SECURITY.mdfiles - Credential storage methods differ - review before production use
Project Structure
damens_mcps/
├── pfsense-mcp/ # Firewall and network management
├── truenas-mcp/ # Storage and NAS management
├── idrac-mcp/ # Dell server management via iDRAC
└── proxmox-mcp/ # Virtualization platform managementEach project follows a similar structure:
src/- Core implementation (client, server, resources, authentication)examples/ortests/- Usage examples and testsconfig.example.jsonorenv.example- Configuration templatesrequirements.txt- Python dependenciesCONTRIBUTING.md- Contribution guidelinesSECURITY.md- Security best practices and credential management
Development Commands
Setting Up a Project
# Navigate to any project directory
cd <project-name>
# Create and activate virtual environment (ALWAYS use virtual environments)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp env.example .env # For truenas-mcp and pfsense-mcp
# OR
cp config.example.json config.json # For idrac-mcp and proxmox-mcp
# Edit configuration with actual credentials
nano .env # or config.jsonStarting Servers
# TrueNAS MCP (canonical implementation - HTTP server)
python -m src.http_cli serve
# pfSense MCP (canonical implementation)
python -m src.http_pfsense_server
# iDRAC MCP (canonical implementation - ONLY use this one)
python working_mcp_server.py
# Proxmox MCP (canonical implementation - ONLY use this one)
python working_proxmox_server.pyNote: Each project has a "canonical" implementation - the definitive version to use. Other server files may exist for historical reasons but should not be used.
Testing
# TrueNAS
python -m src.http_cli health
python examples/basic_usage.py
# pfSense
python examples/basic_usage.py
# iDRAC
python test_server.py
# Proxmox
python examples/basic_usage.py
python test_server.pyNote: proxmox-mcp's basic_usage.py has been updated to work correctly with the actual client implementation.
Testing Single Tools
# Example for testing a specific MCP tool
python -m src.http_cli call-tool <tool_name>Architecture Overview
Two MCP Implementation Patterns
The repository contains two distinct MCP server implementation patterns:
- MCP Library-Based (TrueNAS, pfSense):
- Uses the official
mcpPython library - Implements
Serverclass with stdio or HTTP transport - Uses structured types from
mcp.types(Tool, CallToolResult, etc.) - More structured but requires MCP library compatibility
- Uses the official
- Pure JSON-RPC (iDRAC, Proxmox):
- Direct JSON-RPC implementation without MCP library
- Reads from stdin, writes to stdout
- Manual protocol implementation for maximum compatibility
- Better for avoiding library version conflicts
Common Components Across Projects
Client Classes (e.g., TrueNASClient, PfSenseClient, ProxmoxClient):
- Handle API authentication (API keys, username/password, tokens)
- Make HTTP requests to target platform APIs
- Implement platform-specific API methods
- Handle connection pooling and SSL verification
Resource Handlers (src/resources/):
- Modular organization by functionality (system, storage, network, users, services)
- Inherit from base resource class
- Implement specific operations for each resource type
- Examples:
SystemResource,StorageResource,NetworkResource
Authentication (src/auth.py):
- JWT token management for MCP client authentication
- Platform-specific auth (API keys, basic auth, ticket-based)
- Token refresh and expiration handling
Utilities (src/utils/):
- Input validation (
validation.py) - Logging configuration (
logging.py) - Common helper functions
Configuration Patterns
Environment Variables (TrueNAS, pfSense):
HOST=192.168.1.100
API_KEY=your-api-key
USERNAME=admin
PASSWORD=your-password
SECRET_KEY=your-jwt-secret
SSL_VERIFY=true/falseJSON Config Files (iDRAC, Proxmox):
{
"host": "192.168.1.100",
"username": "root",
"password": "your-password",
"port": 443,
"ssl_verify": false
}Multi-Server Support (iDRAC):
{
"idrac_servers": {
"server1": {...},
"server2": {...}
},
"default_server": "server1"
}Security Practices
IMPORTANT: Each project has different security characteristics. Always review the project-specific SECURITY.md file before deployment.
Credential Management
General Rules
- NEVER commit
.envfiles,config.json, or any files containing credentials - Use
config.example.jsonandenv.exampleas templates - All sensitive files are in
.gitignore - Set restrictive file permissions:
chmod 600 .env config.json
Project-Specific Credential Storage
TrueNAS & pfSense:
- Use
.envfiles for configuration - Support both API keys (recommended) and username/password
- Credentials stored in plain text (rely on file permissions)
- Consider environment variables or external secret managers for production
iDRAC:
- Basic mode: Plain text passwords in
config.json(development only) - Secure mode: Encrypted passwords via
secure_fleet_cli.py- Uses Fernet (AES-128) symmetric encryption
- Encryption key stored in
.fleet_key(still on disk) - Better than plain text, but not enterprise-grade
- Production: Use external secret management (Vault, AWS Secrets Manager)
- See
idrac-mcp/SECURITY.mdfor detailed security guidance
Proxmox:
- Credentials in
config.json(plain text) - Ticket-based authentication after initial login
- File permissions critical for security
- Consider external secret management for production
SSL/TLS
- Production: Always use
SSL_VERIFY=trueorssl_verify: true - Development/Testing:
SSL_VERIFY=falseacceptable for self-signed certificates - Best Practice: Install valid certificates (Let's Encrypt, commercial CA)
- Custom CA certificates supported via configuration
Input Validation
- All tool inputs are validated before execution
- Type checking and sanitization in resource handlers
- Parameter validation in client methods
- Dangerous operations (power off, delete) have appropriate warnings
Security Documentation
Each project has comprehensive security documentation:
pfsense-mcp/SECURITY.md- API key management, SSL config, firewall rulestruenas-mcp/SECURITY.md- API key management, storage access controlsidrac-mcp/SECURITY.md- Credential options, encryption limitations, best practicesproxmox-mcp/SECURITY.md- VM management security, access controls
Always review the appropriate SECURITY.md before deploying to production.
MCP Protocol Implementation
Tool Definition Structure
{
"name": "platform_resource_action",
"description": "Description of what the tool does",
"inputSchema": {
"type": "object",
"properties": {
"param1": {"type": "string", "description": "..."},
"param2": {"type": "integer", "description": "..."}
},
"required": ["param1"]
}
}Response Format (JSON-RPC)
# Success
{
"content": [{"type": "text", "text": "Result data"}],
"isError": False
}
# Error
{
"content": [{"type": "text", "text": "Error message"}],
"isError": True
}Common MCP Methods
tools/list- List all available toolstools/call- Execute a specific toolinitialize- Initialize MCP connectionping- Health check
Common Development Tasks
Adding a New Tool
- Define the tool in server's tool list:
Tool( name="platform_new_action", description="What it does", inputSchema={...} ) - Implement the handler in appropriate resource class:
async def new_action(self, param1: str, param2: int) -> Dict[str, Any]: # Implementation return result - Add routing in server's
_call_tool()method - Update documentation in README.md
Debugging MCP Servers
JSON-RPC servers (iDRAC, Proxmox):
def debug_print(message: str):
"""Print to stderr to avoid interfering with stdin/stdout protocol"""
print(f"DEBUG: {message}", file=sys.stderr)Library-based servers:
import logging
logging.basicConfig(level=logging.DEBUG)Testing Connection Issues
- Check network connectivity:
ping <host> - Verify port access:
telnet <host> <port> - Test API directly:
curl -k https://<host>/api/endpoint - Check credentials in config
- Verify API is enabled on target platform
- Check SSL verification settings
Platform-Specific Notes
TrueNAS
- Requires TrueNAS SCALE 22.02+ or CORE 13+
- API key OR username/password authentication
- HTTP-based MCP server with FastAPI
- CLI tool:
python -m src.http_cli
pfSense
- Requires pfSense 2.5+ with REST API enabled
- Must enable API access in System → API
- Canonical server:
http_pfsense_server.py - Comprehensive firewall rule management
iDRAC
- Supports Dell PowerEdge servers with iDRAC 8+
- Uses Redfish API standard
- Multi-server fleet management support (8 tools)
- Pure JSON-RPC implementation for reliability
- Security: Credentials stored in plain text in config.json (see SECURITY.md)
- Secure fleet CLI available with encrypted passwords
- Choose appropriate method based on security requirements
Proxmox
- Requires Proxmox VE 7.0+
- Ticket-based authentication (PVE realm)
- 21 tools covering VMs, containers, storage, snapshots
- Auto VMID assignment for new VMs
- Security: Credentials in config.json (see SECURITY.md for best practices)
Dependencies
Core Dependencies (Common)
requests- HTTP client for API callsurllib3- HTTP library with SSL supportpython-dotenv- Environment variable loading
MCP Library Stack (TrueNAS, pfSense)
mcp>=1.0.0- Official MCP protocol implementationfastapi- HTTP server frameworkuvicorn- ASGI serverpydantic- Data validationpython-jose- JWT token handling
Testing & Development
pytest- Testing frameworkblack- Code formattingisort- Import sortingflake8- Lintingmypy- Type checking
Important Notes
Virtual Environments
ALWAYS use virtual environments for Python projects (per user's global instructions). Never install packages globally.
API Rate Limiting
Be mindful of API call frequency. Most platforms have rate limits:
- Cache results when appropriate
- Batch operations when possible
- Use health checks before heavy operations
Dangerous Operations
Some tools perform destructive actions:
- Power off/restart servers (iDRAC)
- Delete VMs/containers (Proxmox)
- Remove firewall rules (pfSense)
- Delete datasets (TrueNAS)
Always validate parameters and consider confirmation prompts.
Configuration Priority
Most projects follow this priority:
- Command-line arguments (if applicable)
- Environment variables
- Configuration files
- Default values
Logging
- Log to stderr for JSON-RPC servers (stdout is for protocol)
- Use Python
loggingmodule for structured logging - Debug mode available via environment variables or config
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

