Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MCP in action - Devoxx

Avatar for Zineb Bendhiba Zineb Bendhiba
October 09, 2025
12

MCP in action - Devoxx

Avatar for Zineb Bendhiba

Zineb Bendhiba

October 09, 2025
Tweet

Transcript

  1. Who am I ? Zineb Bendhiba • Apache Camel committer

    and PMC member • Camel Quarkus maintainer • Camel AI & Wanaku MCP router • Based in Paris - France • Twitter : @ZinebBendhiba • Bluesky : @zinebbendhiba.com • https://zinebbendhiba.com/
  2. The foundation : prompting LLM Input (prompt) Output (response) AI

    infused application User Process Serving APIs • Core interaction is Instruction Data response
  3. The foundation : prompting LLM Input (prompt) Output (response) AI

    infused application User Process Serving APIs • Core interaction is Instruction Data response • Integration is stateless REST call • SDKs and librairies add value : context and history
  4. The foundation : prompting LLM Input (prompt) Output (response) AI

    infused application User Process Serving APIs • Core interaction is Instruction Data response • Integration is stateless REST call • SDKs and librairies add value : context and history • Suitable for content generation or Q&A
  5. The foundation : prompting LLM Input (prompt) Output (response) AI

    infused application User Process Serving APIs • Core interaction is Instruction Data response • Integration is stateless REST call • SDKs and librairies add value : context and history • Suitable for content generation or Q&A Limitation : • Cannot be an Autonomous Agent for Enterprise systems X Enterprise systems
  6. Bridging the Gap: AI Agents with Functions LLM Input Output

    User Process Serving APIs • AI Agent includes predefined Functions (Tools) • Functions link Agent to Enterprise Systems Enterprise systems AI Agent List of functions
  7. Bridging the Gap: AI Agents with Functions LLM Input Output

    User Process Serving APIs • AI Agent includes predefined Functions (Tools) • Functions link Agent to Enterprise Systems • Input: Agent sends Instruction, Context + Function Descriptions to LLM • Output : Message or Function call Enterprise systems AI Agent List of functions
  8. Bridging the Gap: AI Agents with Functions LLM Input Output

    User Process Serving APIs • AI Agent includes predefined Functions (Tools) • Functions link Agent to Enterprise Systems • Input: Agent sends Instruction, Context + Function Descriptions to LLM • Output : Message or Function call • LLM Role: Reasoning & Decision • Creates Autonomous System Enterprise systems AI Agent List of functions
  9. Bridging the Gap: AI Agents with Functions LLM Input Output

    User Process Serving APIs Limitations : • Functions managed inside the Agent app • Functions cannot be shared by multiple Agents • Blocks 3rd parties from exposing business logic as functions Enterprise systems AI Agent List of functions
  10. How do we move from this siloed approach to a

    unified, enterprise wide protocol for AI interaction?
  11. MCP Standard for AI • Model Context Protocol • A

    standard for connecting AI agents to systems • Pushed by Anthropic (Claude) for AI integrations • Acts like a USB for AI integrations • Facilitates powerful connections to various systems
  12. MCP : Model Context Protocol LLM User Process • Decoupling

    AI agent logic from the Enterprise System's logic • MCP server as universal adapter to an Enterprise system • Standardized flow • AI agent can access any capability exposed by an MCP server Enterprise systems AI Agent MCP clients MCP Server MCP Server MCP Server MCP Server
  13. MCP Capabilities Tools • Allows the AI agents to invoke

    external functions • Example of tools : a database query, a REST API call, legacy service …. Resources • Expose data : content and URL Prompts • Pre-written prompt template • Allows executing specific, reusable prompt
  14. JSON RPC 2.0 • Everything is JSON • Request /

    Response and Notifications • Language agnostic • Human readable { "jsonrpc": "2.0", "id": 2, "result": { "isError": false, "content": [ { "text": "The weather in Paris is cloudy ☁ with a temperature of 0°C. ", "type": "text" } ] } } Example of MCP server Tool Response
  15. Transports: stdio • The client instantiates the server, and communications

    occurs over standard input/output channels • Ideal for local deployments
  16. Transports : HTTP Remote communications • Server-Sent Event (SSE) (

    deprecated ) -> The client sends a POST request to the server, the response is an SSE • Streamable HTTP - SSE + multiplexing
  17. Quarkus MCP server extensions 2 extensions - SSE (SSE /

    Streamable HTTP) -> quarkus-mcp-server-sse - stdio -> quarkus-mcp-server-stdio
  18. Quarkus MCP server extensions @Inject CodeService codeService; @Tool(description = "Converts

    the string value to lower case" ) String toLowerCase(String value) { return value.toLowerCase(); } @Prompt(name = "code_assist") PromptMessage codeAssist(@PromptArg(name = "lang") String language) { return PromptMessage.withUserRole(new TextContent(codeService.assist(language))); } @Resource(uri = "file:///project/alpha" ) BlobResourceContents alpha(RequestUri uri) throws IOException{ return BlobResourceContents.create(uri.value(), Files.readAllBytes(Path.of("alpha.txt"))); } MCP Tool MCP Prompt MCP Resource
  19. Quarkus MCP server demo Tool Get current time MCP Server

    Get Weather Generate a random fact Generate a greeting prompt Capabilities
  20. Apache Camel and MCP : common ground Goal • Aim

    to connect to Any Enterprise system Integration philosophy : Lightweight • Camel defines routes via Code/XML/YAML • MCP defines integration via JSON RPC 2.0 Prompts • Camel is the swiss knife of enterprise integration (many connectors, patterns…) • MCP is the USB standard for AI integration
  21. The opportunity: leveraging Camel for MCP • MCP requires robust,

    standardized server adapters to connect Agents to Enterprise systems • Apache Camel is already the Enterprise Integration Engine: • Camel provides 300+ pre-built Connectors (DBs, SaaS, APIs, etc.) • Transform every Camel Connector into an MCP Tool or Resource capability.
  22. Wanaku : current architecture : WIP Agent MCP Server Other

    SSE MCP servers Camel capabilities GRPC bridge MCP Wanaku CLI Persistence cache Based on Quarkus MCP servers or any SSE server AMQP Kafka Fhir … Python C/C++ Go … Security
  23. LangChain / LangChain4j / Quarkus LangChain4j LangChain LangChain4j Quarkus LangChain4j

    Inspired By Uses and extends Framework Clean separation, Managed interactions Integration Application
  24. Quarkus LangChain4j https://docs.quarkiverse.io/quarkus-langchain4j LangChain4j Quarkus LangChain4j Application LLMs Vector stores

    Embedding Models - Declarative clients - CDI integration - Observability (Otel, Prometheus) - Auditing - Resilience - Guardrails - RAG building blocks - Agentic architecture - Testability (unit, IT, evaluation) - Developer Joy
  25. Quarkus Langchain4j MCP client extension quarkus.langchain4j.mcp.filesystem. transport-type =stdio quarkus.langchain4j.mcp.filesystem. command=npx,-y,@modelcontextprotocol/s

    erver-filesystem,/my-system-path/location quarkus.langchain4j.mcp.wanaku. transport-type =http quarkus.langchain4j.mcp.wanaku. url=http://my-url/mcp/sse/ stdio SSE
  26. Adding an MCP ToolBox to an AIService @RegisterAiService public interface

    MyAiService { @McpToolBox String chat(@UserMessage String userMessage); } @RegisterAiService public interface MyAIGithubService { @McpToolBox("github") String useGithub(@UserMessage String userMessage); } Allow all Available MCP Tools Only allow some MCP Tools
  27. Demo: AI infused app with Wanaku MCP server LLM User

    Process AI Agent MCP clients MCP Server Forward HTTP capability File provider Tool Get current time MCP Server Get Weather Generate a random fact Tools via OpenAPI spec
  28. More - Tools are automatically selected by the LLMs -

    Prompts and Resources needs some coding logic - Additional features - Security - Authentication - Isolated MCP server or not - Description of tools - Hallucinations - Wanaku experience : limitation in the number of tools - Adding security per user - Adding agent to pre filter the Tools - Expose Camel Routes as MCP tools - Explore new ways of delivering Enterprise Integration - MCP and Agentic -> emerging A2A / ACP