Kubernetes-native MCP Server Orchestrator and AI-Powered Infrastructure Management
Bridge the gap between AI agents and cloud-native infrastructure with secure, scalable MCP server orchestration.
Matey is a production-ready Kubernetes-native orchestrator that enables AI agents to securely interact with cloud infrastructure. It provides a comprehensive platform for deploying, managing, and scaling Model Context Protocol (MCP) servers while offering powerful AI-driven automation capabilities.
- Kubernetes-Native: Built from the ground up with Custom Resources and Controllers
- AI-Powered Automation: Task scheduling with AI reasoning and autonomous workflows
- Enterprise Security: OAuth 2.1, JWT tokens, RBAC, and comprehensive audit logging
- Service Discovery: Automatic Kubernetes-native MCP server discovery and health monitoring
- Multi-Protocol Support: HTTP, SSE, and WebSocket transport protocols
- Memory & Context: PostgreSQL-backed knowledge graph for persistent AI memory
- Rich Tooling: 20+ CLI commands for complete lifecycle management
-
Kubernetes Cluster - One of the following:
- Cloud Provider: EKS, GKE, AKS, or DigitalOcean Kubernetes
- Local Development: k3s, minikube, or Docker Desktop
- Self-Managed: kubeadm or similar
-
kubectl configured and connected to your cluster
# AWS EKS
aws eks create-cluster --name matey-cluster --version 1.28
# Google GKE
gcloud container clusters create matey-cluster --num-nodes=3
# Azure AKS
az aks create --resource-group myResourceGroup --name matey-cluster# Install k3s (lightweight Kubernetes)
curl -sfL https://get.k3s.io | sh -
sudo chmod 644 /etc/rancher/k3s/k3s.yaml
export KUBECONFIG=/etc/rancher/k3s/k3s.yamlEnable Kubernetes in Docker Desktop settings, then verify:
kubectl cluster-infobrew install phildougherty/tap/mateygo install github.com/phildougherty/m8e/cmd/matey@latestgit clone https://github.com/phildougherty/m8e.git
cd m8e
make build
make installCreate a matey.yaml file:
version: "1"
# Container registry
registry:
url: mcp.robotrad.io
# Proxy configuration
proxy:
url: mcp.robotrad.io
# Authentication
proxy_auth:
enabled: true
api_key: your-secure-api-key
# OAuth configuration
oauth:
enabled: true
issuer: https://mcp.robotrad.io
endpoints:
authorization: /oauth/authorize
token: /oauth/token
tokens:
access_token_ttl: 1h
refresh_token_ttl: 168h
grant_types:
- authorization_code
- refresh_token
scopes_supported:
- mcp:tools
- mcp:resources
# OAuth clients
oauth_clients:
claude-code:
client_id: claude-code
name: Claude Code
redirect_uris:
- http://localhost:8080/oauth/callback
scopes:
- mcp:tools
- mcp:resources
grant_types:
- authorization_code
- refresh_token
public_client: true
# Task scheduler for AI workflows
task_scheduler:
enabled: true
port: 8018
database_url: postgresql://scheduler:password@postgres:5432/scheduler
postgres_enabled: true
mcp_proxy_url: https://mcp.robotrad.io
mcp_proxy_api_key: your-secure-api-key
workspace: /workspace
# Memory service for AI context
memory:
enabled: true
port: 3001
database_url: postgresql://memory:password@postgres:5432/memory
postgres_enabled: true
# MCP servers
servers:
filesystem:
image: mcp.robotrad.io/filesystem:latest
env:
HTTP_PORT: "8001"
http_port: 8001
protocol: http
capabilities:
- tools
- resources
volumes:
- "/workspace:/workspace:rw"
authentication:
enabled: true
required_scope: mcp:tools
web-search:
image: mcp.robotrad.io/searxng:latest
env:
HTTP_PORT: "8002"
http_port: 8002
protocol: http
capabilities:
- tools
authentication:
enabled: true
required_scope: mcp:toolsFor accessing private container registries, configure credentials in one of these ways:
registry:
url: ghcr.io
username: your-username
password: your-token-or-password# Matey-specific environment variables
export MATEY_REGISTRY_URL=ghcr.io
export MATEY_REGISTRY_USERNAME=your-username
export MATEY_REGISTRY_PASSWORD=your-token-or-password
# GitHub-specific environment variables (fallback)
export GITHUB_USERNAME=your-github-username # or GITHUB_ACTOR
export GITHUB_TOKEN=your-github-token
# Registry URL defaults to ghcr.io for GitHubPriority Order:
- First tries to load from
matey.yamlconfig file - If config missing/invalid, falls back to environment variables
- If no credentials found, skips creating registry secret (public images only)
Deploy the Kubernetes controllers and CRDs:
matey installThis installs:
- Custom Resource Definitions (CRDs)
- RBAC permissions
- Controller manager
- Service discovery components
Launch all configured MCP servers:
matey upCheck service status:
# View running services
matey ps
# Monitor resource usage
matey top
# View detailed service information
matey inspect <service-name>Generate configuration for your AI client:
# For Claude Code
matey create-config -t claude-code
# For Gemini
matey create-config -t geminiCopy the generated configuration to your AI client:
# Copy to your project directory
cp client-configs/.mcp.json /home/dev/myrepo/.mcp.json# Use the generated MCP configuration
cat mcp-config.jsonThe configuration includes:
- Server endpoints and authentication
- Available tools and capabilities
- OAuth client credentials
- Connection parameters
Matey provides a comprehensive platform for AI-infrastructure interaction:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Clients │ │ Matey Platform │ │ Infrastructure │
│ │ │ │ │ │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • Claude Code │◄──►│ • MCP Proxy │◄──►│ • Kubernetes │
│ • Gemini │ │ • OAuth Server │ │ • Databases │
│ • Custom IDEs │ │ • Memory Graph │ │ • File Systems │
│ • Web UIs │ │ • Task Scheduler│ │ • External APIs │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- MCP Proxy: Central gateway for all AI-infrastructure communication
- Memory Service: PostgreSQL-backed knowledge graph for persistent context
- Task Scheduler: AI-powered workflow automation with cron scheduling
- OAuth Server: Enterprise-grade authentication and authorization
- Service Discovery: Automatic detection and health monitoring of MCP servers
task_scheduler:
workflows:
- name: infrastructure-monitoring
schedule: "*/15 * * * *" # Every 15 minutes
description: "AI-driven infrastructure health monitoring"
steps:
- name: collect-metrics
tool: kubernetes_metrics
parameters:
namespaces: ["default", "kube-system"]
- name: analyze-health
tool: ai_analyze
parameters:
data: "{{steps.collect-metrics.output}}"
prompt: "Analyze infrastructure health and identify issues"
- name: auto-remediate
tool: kubectl_apply
condition: "{{steps.analyze-health.issues_found}}"
parameters:
actions: "{{steps.analyze-health.remediation_steps}}"- Persistent Memory: AI agents maintain context across sessions
- Knowledge Graph: Relationships between infrastructure components
- Semantic Search: Intelligent retrieval of relevant information
- Multi-Agent Coordination: Shared context between different AI instances
- Zero-Trust Architecture: All communication authenticated and authorized
- Audit Trails: Comprehensive logging of all AI actions
- Role-Based Access: Fine-grained permissions for different AI capabilities
- Secret Management: Secure handling of API keys and credentials
matey install # Install Kubernetes components
matey up # Start all services
matey down # Stop all services
matey ps # List service status
matey top # Monitor resource usage
matey logs <service> # View service logs
matey restart # Restart servicesmatey create-config # Generate configurations
matey validate # Validate configuration files
matey reload # Hot reload configuration
matey inspect # Debug servicesmatey proxy # Start development proxy
matey memory # Manage AI memory/context
matey scheduler # Manage AI workflowsWe welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/phildougherty/m8e.git
cd m8e
make dev-setup
make testThis project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- MCP Protocol: modelcontextprotocol.io
Ready to empower your AI with cloud-native infrastructure? Follow the getting started guide above and join the growing community of AI-infrastructure automation users!
