gnodet opened a new pull request, #23346:
URL: https://github.com/apache/camel/pull/23346

   ## Summary
   
   A lightweight Node.js MCP server that bridges AI agents to running Camel 
applications via the existing HTTP dev console (`/q/dev/{id}`). This gives AI 
agents **live runtime introspection** — structured errors, message tracing, 
debugger control, performance hotspots, test message injection — instead of 
relying on static log/file analysis.
   
   ### Architecture
   
   ```
   ┌──────────────┐       MCP (STDIO)       ┌─────────────────────┐       HTTP  
      ┌──────────────────┐
   │  AI Agent    │◄───────────────────────►│  camel-runtime.mjs  
│◄──────────────────►│  Camel App       │
   │  (Claude,    │   JSON-RPC over stdin/  │  (MCP server)       │  GET 
/q/dev/{id}   │  (dev console)   │
   │   Copilot)   │   stdout                │                     │  Accept: 
app/json  │                  │
   └──────────────┘                         └─────────────────────┘             
       └──────────────────┘
   ```
   
   ### What's included
   
   - **23 MCP tools** mapping to dev console endpoints:
     - Context & Routes: `camel_context`, `camel_routes`, 
`camel_route_control`, `camel_route_source`, `camel_route_structure`, 
`camel_route_dump`
     - Observability: `camel_health`, `camel_errors`, `camel_inflight`, 
`camel_top`, `camel_endpoints`
     - Tracing & Debugging: `camel_trace`, `camel_debug`, 
`camel_message_history`
     - Interaction: `camel_send`, `camel_browse`, `camel_eval`
     - Additional: `camel_variables`, `camel_beans`, `camel_properties`, 
`camel_consumers`, `camel_services`, `camel_blocked`, `camel_type_converters`
   - **2 guided prompts**: `camel_debug_route` (step-by-step debugging 
workflow) and `camel_performance_analysis` (bottleneck identification)
   - **1 resource**: `camel-consoles` (lists available dev consoles)
   
   ### Why this approach
   
   - **Zero changes to Apache Camel** — works with any Camel app that has the 
HTTP dev console enabled (JBang, Spring Boot, Quarkus)
   - **~300 lines of code** — a single `.mjs` file that translates MCP tool 
calls to HTTP GET requests
   - **Reference MCP SDK** — uses the official TypeScript MCP SDK 
(`@modelcontextprotocol/sdk`)
   - **Complements the catalog MCP server** — the existing `camel-jbang-mcp` 
provides static/development-time tools; this adds runtime introspection
   
   ### Usage
   
   ```json
   {
     "mcpServers": {
       "camel-runtime": {
         "command": "node",
         "args": ["camel-runtime-mcp.mjs"],
         "env": {
           "CAMEL_DEV_CONSOLE_URL": "http://localhost:8080";
         }
       }
     }
   }
   ```
   
   ### Prerequisites
   
   - Node.js 18+ (for native `fetch`)
   - A running Camel app with the HTTP dev console enabled
   
   ## Test plan
   
   - [x] `npm install` completes without errors
   - [x] MCP `initialize` handshake succeeds
   - [x] `tools/list` returns all 23 tools with correct schemas
   - [x] `prompts/list` returns both guided prompts
   - [x] `resources/list` returns the consoles resource
   - [ ] Test all tools against a running Camel JBang app
   - [ ] Test with Claude Code as MCP client
   - [ ] Test with MCP Inspector
   
   _Claude Code on behalf of Guillaume Nodet_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to