Universal MCP server for KrakenD API Gateway configuration validation, security auditing, and intelligent configuration assistance.
KrakenD MCP Server is a Model Context Protocol server that provides intelligent assistance for KrakenD API Gateway configuration files. It works with any MCP-compatible AI assistant including Claude Code, VS Code, Cursor, Cline, and Zed.
- β Configuration Validation - Version-aware validation with specific error messages
- π Security Auditing - Comprehensive security analysis with actionable recommendations
- π― Feature Discovery - Browse 100+ KrakenD features with CE/EE compatibility
- ποΈ Config Generation - Generate endpoints, backends, and complete configurations
- π Documentation Search - Full-text search through official KrakenD documentation
- π Edition Detection - Automatic CE vs EE feature detection
- β‘ Flexible Configuration - Automatic detection and support for both CE and EE FC variants
Automatic installation with platform detection:
curl -sSL https://raw.githubusercontent.com/krakend/mcp-server/main/scripts/install.sh | bashThis script will:
- β Auto-detect your platform (macOS, Linux, Windows)
- β Download the correct binary
- β Verify checksums for security
- β
Install to
/usr/local/bin/ - β
Create data directory at
~/.krakend-mcp/
Manual installation - Download pre-compiled binaries from GitHub Releases:
# macOS Apple Silicon
curl -L -o krakend-mcp-server https://github.com/krakend/mcp-server/releases/download/v0.6.1/krakend-mcp-darwin-arm64
chmod +x krakend-mcp-server
sudo mv krakend-mcp-server /usr/local/bin/
# macOS Intel
curl -L -o krakend-mcp-server https://github.com/krakend/mcp-server/releases/download/v0.6.1/krakend-mcp-darwin-amd64
chmod +x krakend-mcp-server
sudo mv krakend-mcp-server /usr/local/bin/
# Linux x64
curl -L -o krakend-mcp-server https://github.com/krakend/mcp-server/releases/download/v0.6.1/krakend-mcp-linux-amd64
chmod +x krakend-mcp-server
sudo mv krakend-mcp-server /usr/local/bin/
# Manually create data directory
mkdir -p ~/.krakend-mcp/{docs,search}π Best Experience: Use the KrakenD AI Assistant plugin for:
- β Automatic binary management
- β 4 proactive Skills (auto-activate)
- β 1 Architecture Agent
- β Zero configuration
Install plugin:
# In Claude Code
/plugin marketplace add krakend/claude-code-plugin
/plugin install krakend-ai-assistantThe plugin automatically downloads and configures the MCP server.
If you only want the MCP tools without Skills/Agent:
-
Download the binary (see Quick Start above)
-
Create or edit
~/.claude/mcp_settings.json:
{
"mcpServers": {
"krakend": {
"type": "stdio",
"command": "/usr/local/bin/krakend-mcp-server",
"args": [],
"description": "KrakenD configuration validation and assistance"
}
}
}- Restart Claude Code
Tools available: All 10 MCP tools (validate, audit, generate, search docs, etc.)
-
Download the binary (see Quick Start above)
-
Open Settings β Features β MCP Servers
-
Add server configuration:
{
"mcpServers": {
"krakend": {
"command": "/usr/local/bin/krakend-mcp-server",
"args": []
}
}
}- Restart Cursor
Usage: Use @krakend in chat to access KrakenD tools
β Recommended for VS Code users - Uses built-in MCP support (GitHub Copilot Chat)
-
Download the binary (see Quick Start above)
-
Open Command Palette (
Cmd+Pon macOS,Ctrl+Pon Windows/Linux) -
Type "Add MCP" and select the command
-
Enter the path to the binary:
/usr/local/bin/krakend-mcp-serverOr if using local build:
/Users/yourusername/path/to/mcp-server/build/krakend-mcp-darwin-arm64 -
Server is immediately available in Copilot Chat
Usage:
- Open GitHub Copilot Chat
- The MCP tools are available in the chat context automatically
- Ask questions like "validate this KrakenD config" or "search KrakenD docs for rate limiting"
- The assistant will use the appropriate MCP tools automatically
-
Download the binary (see Quick Start above)
-
Install Cline extension from VS Code Marketplace
-
Open Cline Settings β MCP Servers
-
Add server:
{
"krakend": {
"command": "/usr/local/bin/krakend-mcp-server"
}
}- Restart VS Code
Usage: Cline automatically detects and uses MCP tools
-
Download the binary (see Quick Start above)
-
Edit Zed settings (
Cmd+,β MCP):
{
"mcp_servers": {
"krakend": {
"command": "/usr/local/bin/krakend-mcp-server"
}
}
}- Restart Zed
Usage: Access via Zed's AI assistant
Use the server directly for CI/CD, scripts, or standalone tools:
# Validate config
echo '{"endpoint": "/api/users", ...}' | krakend-mcp-server validate
# Security audit
krakend-mcp-server audit --config krakend.json
# Search docs
krakend-mcp-server search "rate limiting"
# Check version
krakend-mcp-server --version| Client | Setup Difficulty | Features | Best For |
|---|---|---|---|
| Claude Code + Plugin | β Easy (automatic) | Full (MCP + Skills + Agent) | Complete KrakenD assistance |
| VS Code (Native) | ββ Easy (Cmd+P β Add MCP) | MCP tools only | VS Code + Copilot users |
| Claude Code (MCP only) | ββ Medium (manual config) | MCP tools only | Simple validation/generation |
| Cursor | ββ Medium | MCP tools only | Cursor users |
| Cline | ββ Medium | MCP tools only | Cline users |
| Zed | ββ Medium | MCP tools only | Zed users |
| Standalone CLI | βββ Advanced | Direct tool access | CI/CD, scripts |
KrakenD MCP Server includes an intelligent documentation search system powered by Bleve, a full-text search engine written in Go.
Embedded Documentation (Offline-First)
- Official KrakenD documentation is embedded directly in the binary during build
- Pre-built search index included (~5.7MB)
- Works completely offline - no internet required
- Instant availability on first run
Local Documentation Updates
- Use
refresh_documentation_indextool to download latest documentation - Updated docs stored locally at
~/.krakend-mcp/docs/and~/.krakend-mcp/search/ - Priority: Local (if exists) > Embedded (always available)
- Manual refresh recommended every 7 days for latest features
Search Capabilities
- Full-text search with relevance ranking
- Context-aware results (shows surrounding text)
- Supports complex queries (phrases, boolean operators)
- Fast response times (milliseconds)
- Works completely offline with embedded docs
~/.krakend-mcp/
βββ docs/ # Downloaded documentation files
β βββ index.json # Documentation metadata
β βββ content/ # Markdown content files
βββ search/ # Bleve search index
βββ *.bleve # Index files
Binary Size:
- MCP Server Binary: ~21 MB (includes embedded documentation and index)
- No additional downloads required for basic functionality
Optional Local Storage (if using refresh_documentation_index):
- Updated Documentation: ~2 MB
- Updated Search Index: ~6 MB
- Total Local: ~8 MB additional (stored in
~/.krakend-mcp/)
# Check if documentation is cached
ls ~/.krakend-mcp/docs/
# Clear cache (will re-download on next use)
rm -rf ~/.krakend-mcp/docs/ ~/.krakend-mcp/search/
# Manually refresh (via MCP tool)
# Use refresh_documentation_index tool from your MCP client- Documentation is downloaded from official KrakenD sources only
- No telemetry or tracking
- After initial download, search works completely offline
- No external requests during search operations
The server exposes 10 specialized tools:
| Tool | Description |
|---|---|
validate_config |
Version-aware configuration validation with detailed error messages |
audit_security |
Security audit with fallback (native β Docker β basic checks) |
check_edition_compatibility |
Detect which KrakenD edition (CE or EE) a config requires |
| Tool | Description |
|---|---|
list_features |
Browse all KrakenD features with name, namespace, edition, and category |
get_feature_config_template |
Get configuration templates with required/optional fields |
| Tool | Description |
|---|---|
generate_basic_config |
Generate complete KrakenD configuration from scratch |
generate_endpoint_config |
Generate endpoint configuration with best practices |
generate_backend_config |
Generate backend service configuration |
| Tool | Description |
|---|---|
search_documentation |
Full-text search through KrakenD documentation (powered by Bleve) |
refresh_documentation_index |
Update documentation cache (auto-runs if cache > 7 days old) |
# Via MCP client
validate_config --config krakend.json
# Returns:
# β
Configuration is valid for KrakenD v2.7
# Edition required: Community Edition (CE)audit_security --config krakend.json
# Returns:
# π Security Audit Report
# β οΈ High: Missing authentication on /api/admin endpoints
# β οΈ Medium: CORS not configured
# β
Rate limiting configured correctly# List all authentication features
list_features --category authentication
# Returns:
# - JWT Validation (CE) - Validate JWT tokens
# - API Key Auth (EE) - API key authentication
# - OAuth Client (CE) - OAuth 2.0 client flow# Generate a new endpoint
generate_endpoint_config \
--method GET \
--path /api/users \
--backend_url https://backend.example.com/users
# Returns complete endpoint config with best practicesKrakenD MCP Server automatically detects and handles both CE and EE variants of Flexible Configuration:
- CE:
.tmplfiles with env vars (FC_ENABLE=1) - EE:
flexible_config.jsonbehavioral file
No manual configuration needed - detection is automatic!
Pre-compiled binaries available for:
- macOS (Intel & Apple Silicon)
- Linux (x64 & ARM64)
- Windows (x64)
- Go 1.21+
- KrakenD binary (optional, for native validation)
- Docker (optional, for fallback validation)
Quick Build (with embedded docs):
git clone https://github.com/krakend/mcp-server.git
cd mcp-server
./scripts/build.sh
./build/krakend-mcp-server --versionBuild Options:
./scripts/build.sh # Build for current platform
./scripts/build.sh --all # Build for all platforms (darwin, linux, windows)
./scripts/build.sh --platform=linux-amd64 # Build specific platformDevelopment Build (without embedded docs):
go build -o krakend-mcp-server
./krakend-mcp-server --versionThe build script:
- Downloads official KrakenD documentation
- Indexes documentation with Bleve
- Embeds docs + index into binary
- Compiles cross-platform binaries
See CONTRIBUTING.md for development guidelines.
| KrakenD Version | MCP Server Version | Status |
|---|---|---|
| 2.0 - 2.7 | 0.6.1+ | β Full support |
| 1.x | - |
- KrakenD AI Assistant - Claude Code plugin with proactive Skills and Architecture Agent (uses this MCP server)
- KrakenD - Ultra-performant open-source API Gateway
βββββββββββββββββββββββ
β AI Assistant β
β (Claude, Cursor, β
β Cline, etc.) β
ββββββββββββ¬βββββββββββ
β MCP Protocol (stdio)
β
βββββββββββββββββββββββ
β KrakenD MCP Server β
β β
β ββ Validation β
β ββ Security Audit β
β ββ Features β
β ββ Generation β
β ββ Docs Search β
ββββββββββββ¬βββββββββββ
β
β
βββββββββββββββββββββββ
β KrakenD Knowledge β
β β
β ββ Feature Catalog β
β ββ Edition Matrix β
β ββ Documentation β
β ββ Best Practices β
βββββββββββββββββββββββ
New versions are automatically built and published to GitHub Releases when a new tag is pushed.
Binary naming convention: krakend-mcp-{OS}-{ARCH}
Examples:
krakend-mcp-darwin-arm64(macOS Apple Silicon)krakend-mcp-linux-amd64(Linux x64)krakend-mcp-windows-amd64.exe(Windows x64)
This project is in active development. Current status:
- β Core MCP server implementation
- β All 10 tools functional and tested
- β Cross-platform builds (macOS, Linux, Windows)
- β Embedded documentation with offline search
- β Automated testing suite with CI/CD (22% coverage, threshold: 20%)
Run the test suite:
# Run all tests
go test ./... -v
# Run tests with race detector (recommended)
go test ./... -race
# Run tests with coverage report
go test ./... -cover -coverprofile=coverage.out
# View coverage in browser
go tool cover -html=coverage.outCurrent test coverage: 22% (minimum threshold: 20%)
What's tested:
- Configuration validation logic
- Feature namespace extraction and deduplication
- Edition detection (CE vs EE)
- Flexible Configuration detection
- Documentation parsing and indexing
- Data provider abstraction (interface pattern with mocks)
Future improvements:
- Integration tests for each MCP tool with real-world configs
- E2E tests for the complete MCP protocol flow
- Golden file tests for complex validation outputs
- Increase coverage to 50%+
Contributions welcome! See CONTRIBUTING.md for guidelines.
See the "Building from Source" section above for detailed build instructions.
- Issues: GitHub Issues
- Documentation: krakend.io/docs
- Community: KrakenD Community
Apache 2.0 License - see LICENSE file for details.
For security concerns, see SECURITY.md.
Made with β€οΈ by KrakenD
Part of the KrakenD ecosystem - The fastest API Gateway with auto-generated documentation