# β
Setup Complete!
Your pfSense MCP Server is now ready with HTTP transport support!
## π What's Ready
- β
Python 3.12.12 installed
- β
Virtual environment created (`venv/`)
- β
All dependencies installed (FastMCP 2.1.2, httpx, etc.)
- β
HTTP transport configured (v4.1.0)
- β
Server tested and verified
- β
Demo .env file created
## π Quick Start
### 1. Configure pfSense Connection
Edit `.env` file and add your pfSense details:
```bash
nano .env
```
Update these required fields:
```bash
PFSENSE_URL=https://your-pfsense.local
PFSENSE_API_KEY=your-api-key-here
```
### 2. Choose Transport Mode
In `.env`, set the transport:
```bash
# For HTTP transport (remote access, works with Claude web/CLI)
MCP_MODE=http
# For stdio transport (local CLI only)
MCP_MODE=stdio
```
### 3. Start the Server
**Activate the virtual environment first:**
```bash
source venv/bin/activate
```
**Then start the server:**
**HTTP Mode:**
```bash
./run-http.sh
# Server will be at: http://localhost:8000/mcp
```
**stdio Mode:**
```bash
python -m src.main
```
### 4. Configure Claude
**For HTTP Transport:**
Add to `~/.claude/settings.json`:
```json
{
"mcpServers": {
"pfsense": {
"url": "http://localhost:8000/mcp"
}
}
}
```
**For stdio Transport:**
Add to `~/.claude/settings.json`:
```json
{
"mcpServers": {
"pfsense": {
"command": "/opt/homebrew/bin/python3.12",
"args": ["-m", "src.main"],
"cwd": "/Users/mmaxwell/pfsense-mcp-server",
"env": {
"PFSENSE_URL": "https://your-pfsense.local",
"PFSENSE_API_KEY": "your-api-key",
"MCP_MODE": "stdio"
}
}
}
}
```
## π Available Tools
Your server includes 20+ tools:
### System Management
- `system_status` - System info, CPU, memory, disk
- `test_connection` - Test pfSense API connection
- `enhanced_test_connection` - Advanced connection test
### Firewall Management
- `search_firewall_rules` - Search and filter rules
- `create_firewall_rule` - Create new rules
- `update_firewall_rule` - Update existing rules
- `delete_firewall_rule` - Delete rules
- `apply_firewall_changes` - Apply pending changes
### Network Interfaces
- `search_interfaces` - List and search interfaces
- `get_interface_details` - Interface details
- `update_interface` - Modify interface config
### NAT Configuration
- `search_nat_port_forward` - Port forwarding rules
- `create_nat_port_forward` - Create port forward
- `update_nat_port_forward` - Update port forward
- `delete_nat_port_forward` - Delete port forward
### DHCP Management
- `search_dhcp_leases` - View DHCP leases
- `get_dhcp_server_config` - DHCP server settings
### VPN Management
- `search_ipsec_tunnels` - IPsec VPN tunnels
- `search_openvpn_connections` - OpenVPN connections
### Services
- `search_services` - List system services
- `get_service_status` - Service status
- `control_service` - Start/stop/restart services
## π§ Testing
```bash
# Activate venv
source venv/bin/activate
# Test configuration
python test-http-transport.py
# Test with actual pfSense (after configuring .env)
python -m src.main
```
## π Project Structure
```
pfsense-mcp-server/
βββ venv/ # β
Virtual environment
βββ src/
β βββ main.py # β
Updated with HTTP transport (v4.1.0)
β βββ pfsense_api_enhanced.py
β βββ ...
βββ .env # β
Created (needs your credentials)
βββ .env.example # β
Updated with HTTP options
βββ mcp.json # stdio configuration
βββ mcp-http.json # β
HTTP configuration
βββ run-http.sh # β
HTTP startup script
βββ test-http-transport.py # β
Testing script
βββ requirements.txt # All dependencies
βββ README.md
βββ HTTP_TRANSPORT.md # β
HTTP guide
βββ HTTP_TRANSPORT_UPGRADE.md # β
Upgrade summary
βββ PYTHON_VERSION_REQUIREMENT.md # β
Python guide
βββ SETUP_COMPLETE.md # β
This file
β
= New or updated in v4.1.0
```
## π Transport Comparison
| Feature | stdio | HTTP |
|---------|-------|------|
| **Claude CLI** | β
| β
|
| **Claude Web** | β | β
|
| **Remote** | β | β
|
| **Setup** | Simple | Needs hosting |
## π Security Best Practices
When configuring production:
1. **API Keys**: Store in .env, never commit
2. **HTTPS**: Use reverse proxy (nginx/caddy) for production
3. **Firewall**: Restrict access to trusted IPs
4. **Rate Limiting**: Enable in .env
5. **VPN**: Consider for remote access
## π Troubleshooting
### "No module named 'fastmcp'"
```bash
source venv/bin/activate # Activate virtual environment first!
```
### Port in use
```bash
# Change port in .env
MCP_PORT=8001
```
### Connection refused
```bash
# Check server is running
curl http://localhost:8000/mcp
# Check firewall
sudo lsof -i :8000
```
## π Next Steps
1. β
~~Install Python 3.12~~ **DONE**
2. β
~~Install dependencies~~ **DONE**
3. β
~~Create .env file~~ **DONE**
4. βοΈ Add your pfSense credentials to `.env`
5. βοΈ Start the server (HTTP or stdio mode)
6. βοΈ Configure Claude settings
7. βοΈ Test with Claude!
## π Documentation
- **HTTP_TRANSPORT_UPGRADE.md** - What was added
- **HTTP_TRANSPORT.md** - Complete HTTP guide
- **PYTHON_VERSION_REQUIREMENT.md** - Python setup
- **README.md** - Full project documentation
## π Need Help?
- Run `python test-http-transport.py` to diagnose issues
- Check logs when server is running
- Review documentation files above
- GitHub Issues for community support
---
**Version**: 4.1.0
**Transport**: stdio + HTTP (Streamable)
**Status**: β
Ready to configure and run!
**Your server is ready! Just add your pfSense credentials to `.env` and start it up!** π