Camel MCP Server (original) (raw)
The Camel MCP Server exposes the Apache Camel Catalog and runtime introspection tools through the Model Context Protocol (MCP). AI coding assistants (Claude Code, OpenAI Codex, GitHub Copilot, JetBrains AI) can query catalog data, validate endpoints, analyze routes, and inspect running applications.
| | This module is in Preview status as of Camel 4.18. | | ---------------------------------------------------------- |
Transport
- STDIO (default) — communicates over stdin/stdout. Logging goes to stderr.
- HTTP/SSE — for web-based clients and remote/shared access. Enable with
quarkus.http.host-enabled=true. Supports two variants: SSE (/mcp/sse, protocol2024-11-05) and Streamable HTTP (/mcp, protocol2025-03-26, recommended for new integrations).
| | The MCP server does not expose REST endpoints — all communication uses JSON-RPC over the MCP protocol. | | ------------------------------------------------------------------------------------------------------------- |
The server exposes catalog tools for exploring components, validating routes, and assisting with migration, runtime introspection tools for inspecting and interacting with live Camel processes, plus prompts that provide structured multi-step workflows.
Catalog Exploration
| Tool | Description |
|---|---|
| camel_catalog_components | List available Camel components with filtering by name, label (e.g., messaging, cloud, database), and runtime type (main, spring-boot, quarkus). Supports querying specific Camel versions. |
| camel_catalog_component_doc | Get documentation for a specific component: URI syntax, component-level and endpoint options. Supports optionsFilter (case-insensitive substring on option name) and includeOptions (required, common, or all; default common, which excludes deprecated and advanced options) to control payload size. |
| camel_catalog_component_maven | Get the Maven coordinates (groupId, artifactId, version) of a specific component, for adding it as a project dependency. |
| camel_catalog_dataformats | List available data formats (JSON, XML, CSV, Avro, Protobuf, and others). |
| camel_catalog_dataformat_doc | Get detailed documentation for a specific data format including all configuration options, Maven coordinates, and model information. |
| camel_catalog_languages | List expression languages (Simple, JsonPath, XPath, JQ, Groovy, and others). |
| camel_catalog_language_doc | Get detailed documentation for a specific expression language including all configuration options and Maven coordinates. |
| camel_catalog_eips | List Enterprise Integration Patterns with filtering by category. |
| camel_catalog_eip_doc | Get detailed documentation for a specific EIP including all its options. |
| camel_component_properties | List valid configuration property keys for a Camel component in camel.component.. form, including option name, type, default value, and description. |
Kamelet Catalog
| Tool | Description |
|---|---|
| camel_catalog_kamelets | List available Kamelets from the Kamelet Catalog with filtering by name, description, and type (source, sink, action). Supports querying specific Kamelets catalog versions. |
| camel_catalog_kamelet_doc | Get detailed documentation for a specific Kamelet including all properties/options, their types, defaults, examples, and the Kamelet’s Maven dependencies. |
Example Catalog
| Tool | Description |
|---|---|
| camel_catalog_examples | List available Camel CLI examples with filtering by name, description, or tag (case-insensitive substring match). Supports filtering by difficulty level (beginner, intermediate, advanced) and limiting the number of results. Returns name, title, description, level, tags, and file list for each example. |
| camel_catalog_example_file | Get the content of a specific file from a Camel CLI example. For bundled examples, returns the file content directly. For non-bundled examples, returns a GitHub URL where the file can be found. Use camel_catalog_examples first to discover example names and their files. |
Route Understanding
| Tool | Description |
|---|---|
| camel_route_context | Given a Camel route (YAML, XML, or Java DSL), extracts all components and EIPs used, looks up their documentation from the catalog, and returns structured context. |
Test Scaffolding
| Tool | Description |
|---|---|
| camel_route_test_scaffold | Generates a JUnit 5 test skeleton from a Camel route definition (YAML or XML). Accepts an optional format (yaml or xml, default yaml) and runtime (main or spring-boot, default main). For main runtime, the generated test extends CamelTestSupport; for spring-boot, it uses @CamelSpringBootTest with @SpringBootTest. The tool replaces non-trivial producer endpoints with mock endpoints, generates @RegisterExtension stubs for infrastructure components (Kafka, JMS/Artemis, MongoDB, PostgreSQL, Cassandra, Elasticsearch, Redis, RabbitMQ, FTP, Consul, NATS, Pulsar, CouchDB, Infinispan, MinIO, Solr), and produces a NotifyBuilder pattern for timer-based routes or template.sendBody() for direct/seda consumers. Returns the generated test code, detected components, mock endpoint mappings, test-infra services, and required Maven test dependencies. |
Security Analysis
| Tool | Description |
|---|---|
| camel_route_harden_context | Analyzes a route for security concerns. Identifies security-sensitive components, assigns risk levels, detects issues like hardcoded credentials or plain-text protocols, and returns structured security findings alongside best practices. |
Error Diagnosis
| Tool | Description |
|---|---|
| camel_error_diagnose | Diagnoses Camel errors from stack traces or error messages. Identifies the exception type against 17 known Camel exceptions (such as NoSuchEndpointException, ResolveEndpointFailedException, FailedToCreateRouteException, PropertyBindingException, and others), extracts the components and EIPs involved, and returns common causes, suggested fixes, and links to relevant Camel documentation. |
Dependency Check
| Tool | Description |
|---|---|
| camel_dependency_check | Checks Camel project dependency hygiene given a pom.xml and optional route definitions. Detects outdated Camel versions compared to the latest catalog release, identifies missing Maven dependencies for components used in routes, and flags version conflicts between the Camel BOM and explicit dependency overrides. Returns actionable recommendations with corrected dependency snippets. |
Validation and Transformation
| Tool | Description |
|---|---|
| camel_validate_route | Validates Camel endpoint URIs against the catalog schema. Catches unknown options, missing required parameters, invalid enum values, and type mismatches. Also provides suggestions for misspelled option names. |
| camel_validate_yaml_dsl | Validates a YAML DSL route definition against the Camel YAML DSL JSON schema. Checks for valid DSL elements, correct route structure, and returns detailed schema validation errors including instance path, error type, and schema path. |
| camel_transform_route | Assists with route DSL format transformation between YAML and XML. |
| camel_configuration_validate | Validate Camel configuration property lines (e.g., from application.properties). Detects misspelled option names, invalid values, and returns suggestions. |
| camel_properties_translate | Translate Camel configuration properties between runtimes (main, spring-boot, quarkus). Handles runtime-specific keys like HTTP server and management endpoint configuration. |
Route Diagram
| Tool | Description |
|---|---|
| camel_render_route_diagram | Generate a diagram of Camel routes from a source file (YAML, XML, Java). Supports image themes (dark, light, transparent) written as PNG, and text themes (ascii, unicode) returned directly. Useful for visualizing route structure for review, documentation, or troubleshooting. |
OpenAPI Contract-First
Since Camel 4.6, the recommended approach for building REST APIs from OpenAPI specifications is contract-first: referencing the OpenAPI spec directly at runtime via rest:openApi rather than generating REST DSL code. These tools help validate, scaffold, and provide mock guidance for that workflow.
| Tool | Description |
|---|---|
| camel_openapi_validate | Validates an OpenAPI specification for compatibility with Camel’s contract-first REST support. Checks for missing operationId fields, unsupported security schemes, OpenAPI 3.1 limitations, webhooks usage, and empty paths. Returns errors, warnings, and info-level diagnostics. |
| camel_openapi_scaffold | Generates a Camel YAML scaffold for contract-first OpenAPI integration. Produces a rest:openApi configuration block referencing the spec file and a direct: route stub for each operation, with Content-Type and CamelHttpResponseCode headers pre-configured from the spec. Supports configuring the missingOperation mode (fail, ignore, or mock). |
| camel_openapi_mock_guidance | Provides guidance on configuring Camel’s missingOperation modes (fail, ignore, mock). For mock mode, returns the camel-mock/ directory structure, mock file paths derived from the API paths, and example content from the spec. Explains the behavior of each mode. |
Migration
| Tool | Description |
|---|---|
| camel_migration_analyze | Analyzes a Camel project’s pom.xml to detect the runtime type (main, spring-boot, quarkus, wildfly, karaf), Camel version, Java version, and Camel component dependencies. This is the first step in a migration workflow. |
| camel_migration_compatibility | Checks migration compatibility for Camel components by providing relevant migration guide URLs and Java version requirements. The LLM consults the migration guides for detailed component rename mappings and API changes. |
| camel_migration_recipes | Returns Maven commands to run Camel OpenRewrite migration recipes for upgrading between versions. The project must compile successfully before running the recipes, as OpenRewrite requires a compilable project to parse and transform the code. |
| camel_migration_guide_search | Searches Camel migration and upgrade guides for a specific term or component name. Returns matching snippets from the official guides with version info and URLs. Supports fuzzy matching for typo tolerance. Use this instead of web search when looking up migration-related changes, removed components, API renames, or breaking changes. |
| camel_migration_wildfly_karaf | Provides migration guidance for Camel projects running on WildFly, Karaf, or WAR-based application servers. Returns the Maven archetype command to create a new target project, migration steps, and relevant migration guide URLs. |
Version Management
| Tool | Description |
|---|---|
| camel_version_list | Lists available Camel versions for a given runtime, including release dates, JDK requirements, and LTS status. |
Runtime Introspection
| | Runtime tools require a running Camel application started via camel run. They communicate with the application through the file-based IPC protocol in ~/.camel/. All tools accept an optional nameOrPid parameter; when omitted, the server auto-discovers the running Camel process (this works when exactly one process is running). | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Process Discovery
| Tool | Description |
|---|---|
| camel_runtime_processes | List all running Camel processes that can be inspected. Returns PID, name, and context name for each discovered process. |
Context and Routes
| Tool | Description |
|---|---|
| camel_runtime_context | Get Camel context information: name, version, state, uptime, route count, exchange statistics. |
| camel_runtime_routes | List Camel routes with their state, uptime, messages processed, last error, and throughput statistics. |
| camel_runtime_route_source | Get the source code of routes in the running Camel application. Supports wildcard filtering. |
| camel_runtime_route_dump | Dump route definitions in XML or YAML format. |
| camel_runtime_route_structure | Show the route structure as a tree of processors. |
| camel_runtime_route_control | Control a route: start, stop, suspend, or resume it by route ID. |
| camel_runtime_route_topology | Get the inter-route topology showing how routes connect to each other and to external endpoints. Returns nodes and edges describing the route graph. |
Observability
| Tool | Description |
|---|---|
| camel_runtime_health | Get health check status for the Camel application. |
| camel_runtime_endpoints | List all endpoints registered in the Camel context with their URIs and usage statistics. |
| camel_runtime_inflight | Show currently in-flight exchanges (messages being processed). |
| camel_runtime_blocked | Show blocked exchanges that are stuck or waiting. |
| camel_runtime_top | Show top processor statistics: which processors are slowest and most active. |
| camel_runtime_memory | Show JVM memory usage (heap/non-heap), garbage collection stats, and thread counts. |
| camel_runtime_errors | Get captured routing errors from the running application. Returns error details including exception, exchange context, and route information. |
| camel_runtime_history | Get the message history trace of the last completed exchange. Shows the route path, processors visited, headers, body, and timing. |
| camel_runtime_thread_dump | Get a JVM thread dump showing thread names, states, and stack traces. |
Configuration and Registry
| Tool | Description |
|---|---|
| camel_runtime_variables | Show exchange variables in the Camel context. |
| camel_runtime_consumers | Show consumer statistics (polling consumers, event-driven consumers). |
| camel_runtime_properties | Show configuration properties of the running Camel application. |
| camel_runtime_services | Show services registered in the Camel service registry. |
Interaction and Debugging
| Tool | Description |
|---|---|
| camel_runtime_send | Send a test message to a Camel endpoint in the running application. |
| camel_runtime_trace | Enable, disable, or dump message tracing for the running Camel application. |
| camel_runtime_eval | Evaluate an expression in the given language (e.g., simple, jsonpath, xpath) against the Camel context. |
| camel_runtime_browse | Browse messages in a Camel endpoint (e.g., messages queued in a SEDA endpoint). |
| camel_runtime_receive | Receive (poll) a message from a Camel endpoint in the running application. Consumes one message from the endpoint. |
| camel_runtime_stop | Initiate graceful shutdown of a running Camel application. Finishes processing in-flight exchanges before stopping. |
Available Prompts
Prompts are structured multi-step workflows that guide the LLM through orchestrating multiple tools in the correct sequence. Instead of the LLM having to discover which tools to call and in what order, a prompt provides the complete workflow as a step-by-step plan.
MCP clients that support prompts (such as Claude Desktop) expose them as selectable workflows. The LLM receives the instructions and executes each step by calling the referenced tools.
| Prompt | Arguments | Description |
|---|---|---|
| camel_build_integration | requirements (required), runtime (optional) | Guided workflow to build a Camel integration from natural-language requirements. Walks through seven steps: identify components, identify EIPs, get component documentation, build the YAML route, validate it with the YAML DSL schema, run a security review, and present the final result with explanations and run instructions. |
| camel_migrate_project | pomContent (required), targetVersion (optional) | Guided workflow to migrate a Camel project to a newer version. Walks through six steps: analyze the project’s pom.xml, determine the target version, check compatibility (including WildFly/Karaf detection), get OpenRewrite migration recipes, search migration guides for breaking changes per component, and produce a structured migration summary with blockers, breaking changes, commands, and manual steps. |
| camel_security_review | route (required), format (optional) | Guided workflow to perform a security audit of a Camel route. Walks through three steps: analyze the route for security-sensitive components and vulnerabilities, understand the route structure and data flow, and produce an actionable audit checklist organized into critical issues, warnings, positive findings, recommendations, and compliance notes. |
Setup
The MCP server requires JBang installed and on your PATH.
Claude Code (plugin install, recommended)
claude plugin marketplace add apache/camel
claude plugin install camel-mcp@camel-marketplaceManual configuration (all AI tools)
Add the server to your MCP configuration file. The JSON is the same for all tools — only the file location differs:
| Tool | Configuration file |
|---|---|
| Claude Code | .mcp.json (project) or ~/.claude/mcp.json (global) |
| OpenAI Codex | MCP configuration file |
| VS Code / Copilot | .vscode/mcp.json (use "servers" instead of "mcpServers" as the top-level key) |
| JetBrains IDEs (2025.1+) | Settings > Tools > AI Assistant > MCP Servers, or .junie/mcp.json |
{
"mcpServers": {
"camel": {
"command": "jbang",
"args": [
"-Dquarkus.log.level=WARN",
"org.apache.camel:camel-jbang-mcp:LATEST:runner"
]
}
}
}| | For VS Code, the top-level key is "servers" instead of "mcpServers". | | ----------------------------------------------------------------------- |
Generic STDIO or HTTP/SSE
# STDIO (any MCP client)
jbang org.apache.camel:camel-jbang-mcp:LATEST:runner
# HTTP/SSE transport
jbang -Dquarkus.http.host-enabled=true -Dquarkus.http.port=8080 org.apache.camel:camel-jbang-mcp:LATEST:runnerHTTP endpoints: /mcp/sse (SSE, legacy) and /mcp (Streamable HTTP, recommended).
Inspecting with MCP Inspector
Start the server with HTTP enabled, then:
npx @modelcontextprotocol/inspectorExamples
Here are example prompts you can give your AI assistant. The assistant automatically selects the right MCP tools.
Catalog exploration
- "List all Camel components in the messaging category" — uses
camel_catalog_components - "Show me the Kafka component documentation with all options" — uses
camel_catalog_component_doc - "Show me all AWS source kamelets" — uses
camel_catalog_kamelets - "What options does aws-s3-source accept?" — uses
camel_catalog_kamelet_doc - "Show me beginner REST examples" — uses
camel_catalog_examples
Building routes
Ask the assistant to build a route from requirements:
Build me a Camel route that generates a message every 5 seconds with a random number, logs it, and sends it to a SEDA queue called "numbers".
The assistant discovers components, looks up documentation, builds a YAML route, and validates it with camel_validate_yaml_dsl. Use the camel_build_integration prompt for a structured multi-step workflow.
Validation
- _"Validate this endpoint:
kafka:myTopic?brkers=localhost:9092`"_ — detects the typo and suggests `brokers - "Validate this YAML route" — checks against the YAML DSL JSON schema, reports invalid elements
Understanding, security, and testing
- "Explain what this route does" — uses
camel_route_contextfor catalog-enriched analysis - "Analyze this route for security concerns" — uses
camel_route_harden_contextto detect hardcoded credentials, plain-text protocols, etc. - "Generate a JUnit 5 test for this route" — uses
camel_route_test_scaffoldto produce test class with mock endpoints and test-infra stubs
Error diagnosis
Paste a stack trace:
org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[kafka:myTopic] <<< Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: kafka:myTopic
The assistant uses camel_error_diagnose to identify the exception chain, extract components, and suggest fixes (e.g., missing camel-kafka dependency).
Dependencies and versions
- "Check my pom.xml for missing or outdated dependencies" — uses
camel_dependency_check - "What are the latest LTS versions for Spring Boot?" — uses
camel_version_list
Migration
- "Migrate my project to the latest version (here’s my pom.xml)" — uses
camel_migration_analyze→camel_migration_compatibility→camel_migration_recipes - "What changed with direct-vm in Camel 4?" — uses
camel_migration_guide_search - "Migrate from WildFly to Quarkus" — uses
camel_migration_wildfly_karaffor archetype commands and steps - Use the
camel_migrate_projectprompt for an orchestrated multi-step workflow
OpenAPI contract-first
- "Validate this OpenAPI spec for Camel compatibility" — uses
camel_openapi_validate - "Generate a Camel YAML scaffold with mock mode" — uses
camel_openapi_scaffold - "Show me the mock directory structure" — uses
camel_openapi_mock_guidance
Combine all three for a complete prototyping workflow: validate, scaffold, then implement routes one at a time while Camel mocks the rest.
Runtime introspection
Start a route with camel run my-route.yaml, then ask:
- "Show me running Camel processes and route statistics" — uses
camel_runtime_processesandcamel_runtime_routes - "Enable tracing and show me the traced messages" — uses
camel_runtime_trace - "Send a test message to direct:start" — uses
camel_runtime_send - "Which processors are the slowest?" — uses
camel_runtime_top - "Browse messages in seda:numbers" — uses
camel_runtime_browse
Prompts (structured workflows)
MCP clients that support prompts expose these as selectable workflows:
camel_build_integration— 7-step guided workflow: discover components → select EIPs → build → validate → security reviewcamel_migrate_project— 6-step migration: analyze → compatibility → recipes → guide search → summarycamel_security_review— 3-step audit: analyze vulnerabilities → understand data flow → produce checklist