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 KrakenD features with CE/EE compatibility (offline-first, auto-refreshes every 7 days)
- π 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/(or~/.local/bin/if no write permissions) - β
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.8.0/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.8.0/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.8.0/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 7 MCP tools (validate, audit, features, 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:
# Run in stdio mode (default - for MCP clients)
krakend-mcp-server
# Run in HTTP mode (port 8090 by default)
krakend-mcp-server --http
# Run in HTTP mode on a custom port
PORT=9000 krakend-mcp-server --http
# Check version
krakend-mcp-server --versionHTTP mode exposes the MCP server as a streamable HTTP endpoint on /, making it usable from HTTP-based MCP clients or for integration testing.
| 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/auditing |
| 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 Data (Offline-First)
- Official KrakenD documentation and feature matrix are embedded directly in the binary during build
- Pre-built search index included (~5.7MB)
- Works completely offline - no internet required on first run
- Both docs and feature data auto-refresh every 7 days in the background at startup
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
- After initial download, search works completely offline
- No external requests during search operations
The server exposes 7 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 KrakenD features with name, namespace, edition, and category. Filter by ee (bool) for Enterprise-only features or query (string) to search by name/description |
| Tool | Description |
|---|---|
detect_runtime_environment |
Detect the current KrakenD runtime environment and available tooling |
| 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 features
list_features
# List Enterprise Edition features only
list_features --ee true
# Search features by keyword (matches name and description)
list_features --query "rate limit"
# Combine filters: EE features matching a keyword
list_features --ee true --query "redis"KrakenD 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 the KrakenD feature matrix YAML
- Downloads official KrakenD documentation
- Indexes documentation with Bleve
- Embeds feature matrix, docs, and index into the binary
- Compiles cross-platform binaries
See CONTRIBUTING.md for development guidelines.
| KrakenD Version | MCP Server Version | Status |
|---|---|---|
| 2.x | 0.6.3+ | β 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 or HTTP)
β
βββββββββββββββββββββββ
β KrakenD MCP Server β
β β
β ββ Validation β
β ββ Security Audit β
β ββ Features β
β ββ Runtime β
β ββ 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 7 tools functional and tested
- β Cross-platform builds (macOS, Linux, Windows)
- β Embedded documentation with offline search
- β Automated testing suite with CI/CD (28% 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: 28% (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.
The MCP server collects anonymous usage data to help understand which tools are being used and how they perform. This allows us to prioritize improvements, detect widespread errors, and make better product decisions.
Data collected per event includes: MCP method called, tool name, session ID, execution duration, errors, MCP client name and version (e.g. claude-code 1.2.3, cursor 0.42) as reported by the client during the MCP handshake, and tool-specific metadata (e.g. result counts, whether the query touched Enterprise Edition features).
No sensitive information is ever sent. Your KrakenD configuration contents, search queries, file paths, and any other inputs or outputs are never included in the reported data.
To opt out, set the USAGE_DISABLE=1 environment variable before starting the server:
USAGE_DISABLE=1 krakend-mcp-server- 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