aRustyDev/pcf-mcp
If you are the rightful owner of pcf-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The PCF-MCP Server is a Golang-based server that integrates the Model Context Protocol with the Pentest Collaboration Framework, facilitating AI assistant interactions with pentesting projects.
list_projects
List all pentest projects.
create_project
Create a new project.
update_project
Update project details.
list_hosts
List hosts in a project.
add_host
Add a new host.
update_host
Update host information.
list_issues
List security issues.
create_issue
Create a new security finding.
update_issue
Update issue details.
list_credentials
List stored credentials.
add_credential
Store new credentials.
get_credential
Retrieve specific credentials.
generate_report
Generate reports in various formats.
PCF-MCP Server
A Golang-based Model Context Protocol (MCP) server that integrates with the Pentest Collaboration Framework (PCF), enabling AI assistants to interact with pentesting projects, manage security findings, and collaborate on security assessments.
Features
- MCP Protocol Support: Full implementation of the Model Context Protocol for AI assistant integration
- PCF Integration: Complete API client for Pentest Collaboration Framework operations
- Multi-Transport: Supports both stdio (full-featured) and HTTP (stateless) transports
- Cloud-Native: Built with Kubernetes, observability, and containerization in mind
- Comprehensive Configuration: Supports CLI args, environment variables, config files, and Kubernetes ConfigMaps
- Production-Ready Observability:
- OpenTelemetry (OTEL) compatible distributed tracing
- Prometheus-compatible metrics
- Structured logging with configurable levels
Quick Start
Prerequisites
- Go 1.21 or higher
- Docker (optional, for containerized deployment)
- Access to a PCF instance
Installation
# Clone the repository
git clone https://github.com/aRustyDev/pcf-mcp
cd pcf-mcp
# Install dependencies
just deps
# Run tests
just test
# Build the binary
just build
Running
# Run with default configuration
./bin/pcf-mcp
# Run with custom PCF endpoint
./bin/pcf-mcp --pcf-url http://localhost:5000 --pcf-api-key your-api-key
# Run with environment variables
export PCF_MCP_PCF_URL=http://localhost:5000
export PCF_MCP_PCF_API_KEY=your-api-key
./bin/pcf-mcp
Docker
# Build Docker image
just docker
# Run container
docker run -p 8080:8080 pcf-mcp:latest
Configuration
The server supports hierarchical configuration (in order of precedence):
- Command-line arguments
- Environment variables (prefixed with
PCF_MCP_
) - Configuration file (YAML/JSON/TOML)
- Kubernetes ConfigMaps
- Default values
Example Configuration File
server:
host: "0.0.0.0"
port: 8080
transport: "stdio" # or "http"
pcf:
url: "http://localhost:5000"
api_key: "your-api-key"
timeout: 30s
logging:
level: "info" # debug, info, warn, error
format: "json" # or "text"
metrics:
enabled: true
port: 9090
tracing:
enabled: true
exporter: "jaeger" # or "zipkin", "otlp"
endpoint: "http://localhost:14268/api/traces"
MCP Tools Available
-
Project Management
list_projects
: List all pentest projectscreate_project
: Create a new projectupdate_project
: Update project details
-
Host Management
list_hosts
: List hosts in a projectadd_host
: Add a new hostupdate_host
: Update host information
-
Issue Tracking
list_issues
: List security issuescreate_issue
: Create a new security findingupdate_issue
: Update issue details
-
Credential Storage
list_credentials
: List stored credentialsadd_credential
: Store new credentialsget_credential
: Retrieve specific credentials
-
Report Generation
generate_report
: Generate reports in various formats
Development
Project Structure
pcf-mcp/
āāā cmd/pcf-mcp/ # Main application entry point
āāā internal/
ā āāā config/ # Configuration management
ā āāā pcf/ # PCF client implementation
ā āāā mcp/ # MCP server implementation
ā āāā observability/ # Tracing, metrics, logging
ā āāā transport/ # Stdio and HTTP transports
āāā pkg/ # Public packages
āāā tests/ # Test files
āāā docs/ # Documentation
āāā Dockerfile # Multi-stage build
āāā justfile # Task automation
āāā go.mod & go.sum # Dependencies
āāā README.md # This file
Testing
# Run all tests
just test
# Run quick tests (no coverage)
just test-quick
# Run integration tests
just test-integration
# View coverage report
just cover
Building
# Build for current platform
just build
# Build Docker image
just docker
# Clean build artifacts
just clean
Documentation
- - Complete API documentation and tool reference
- - System design and component architecture
- - All configuration options explained
- - Docker, Kubernetes, and production deployment
- - Common issues and solutions
CI/CD
This project uses GitHub Actions for continuous integration and deployment.
Container Images
Pre-built container images are available on:
- Docker Hub:
arustydev/pcf-mcp
- GitHub Container Registry:
ghcr.io/arustydev/pcf-mcp
# Pull from Docker Hub
docker pull arustydev/pcf-mcp:latest
# Pull from GitHub Container Registry
docker pull ghcr.io/arustydev/pcf-mcp:latest
Automated Workflows
- CI Pipeline: Runs on every push and PR (tests, linting, security scans)
- Docker Publishing: Builds and publishes multi-arch images on main branch updates
- Release Pipeline: Creates GitHub releases and versioned images on tags
All images are:
- Multi-architecture (amd64, arm64)
- Signed with Cosign for verification
- Scanned for vulnerabilities
- Include SBOM (Software Bill of Materials)
See for detailed CI/CD documentation.
Deployment
See the for detailed instructions on:
- Local development setup
- Docker deployment
- Docker Compose configuration
- Kubernetes deployment with examples
- Production best practices
Observability
Metrics
Prometheus metrics are exposed on /metrics
endpoint (default port 9090):
pcf_mcp_requests_total
: Total number of MCP requestspcf_mcp_request_duration_seconds
: Request duration histogrampcf_mcp_active_connections
: Current active connections
Tracing
OpenTelemetry tracing supports multiple exporters:
- Jaeger
- Zipkin
- OTLP
Logging
Structured logging with slog, supporting:
- JSON and text formats
- Configurable log levels
- Kubernetes-friendly output
Contributing
- Fork the repository
- Create a feature branch
- Write tests first (TDD)
- Implement your feature
- Ensure all tests pass
- Submit a pull request
License
Support
- GitHub Issues: github.com/analyst/pcf-mcp/issues
- PCF Documentation: PCF Wiki
- MCP Documentation: MCP Specification
Version History
See for version history and release notes.