{"status":"success","message":"","http_code":200,"data":{"type":"message","id":"14202849","href":"/messages/14202849","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/boost-your-cap-development-with-ai-introducing-the-mcp-server-for-cap/ba-p/14202849","author":{"type":"user","id":"41902","href":"/users/41902","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/41902","login":"BirgitS"},"subject":"Boost your CAP Development with AI: Introducing the MCP Server for CAP","body":"<P>Imagine the following: You are an experienced developer, working on SAP Cloud Application Programming Model (CAP) projects. You use AI agents, such as Claude Code, opencode, or GitHub Copilot, to support you in your daily work. Wouldn't it be cool if the used LLM can help you develop CAP applications? With our new MCP server for CAP, we can provide more context about your project as well as relevant CAP examples to steer the LLM in doing the right thing.</P><P><STRONG>&nbsp;</STRONG></P><P><STRONG>What is an MCP Server?</STRONG></P><P>An MCP (<A href=\"https://modelcontextprotocol.io/docs/getting-started/intro\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Model Context Protocol</A>) server is designed to manage and deliver capabilities to Large Language Models (LLMs) via AI agents. It bridges the gap between LLMs and external resources such as services, tools, and data, enabling LLMs to interact with these resources. The newly introduced MCP server for CAP transforms AI agents into CAP development experts. It provides context-focused tools that aim to help the AI agent to answer questions such as:</P><UL><LI>Which CDS (Core Data Services) services does my project expose and where are they served?</LI><LI>What are the entities about and how do they relate to each other?</LI><LI>How do I add columns to a select statement in CAP Node.js?</LI><LI>How can I register custom READ handlers in CAP Java?</LI></UL><P><STRONG>&nbsp;</STRONG></P><P><STRONG>The MCP Server for CAP</STRONG></P><P>In the context of the assisted development introduced in the beginning, this means: You might ask the LLM to add, for example, a bound action `setToCompleted` to the entity `Orders`. Without our new MCP server for CAP, the LLM would hallucinate and could invent a new syntax and do a lot of file searches to find the relevant file. With the help of our new MCP server for CAP the LLM behaves as intended. To do so, the LLM generates a tool call to check the Orders entity and relevant information is returned, such as its elements and file location. It also generates a tool call to check the CAP documentation for bound actions. Based on the results, it generates the correct CDS code to add the bound action. This, of course, is just one example. We designed our MCP server for CAP to help you with arbitrary tasks instead of focusing on single commands.</P><P>For this purpose, our newly introduced MCP server for CAP provides the following two tools for AI-assisted development of CAP applications:</P><P><STRONG>search_model</STRONG></P><P>This tool allows the AI model to perform a fuzzy search for CDS definitions (entities, services, actions) within a unified compiled CDS model of all your&nbsp;.cds&nbsp;files. This CDS model includes the model structure and relationships, annotations and metadata, and the generated HTTP endpoints.</P><P>The fuzzy search algorithm matches definition names and supports partial matches, making it easy to find entities such as \"Books\" even when searching for \"book\".</P><P><STRONG>search_docs</STRONG></P><P>This tool enables the AI model to perform a semantic search through the preprocessed&nbsp; <A href=\"https://cap.cloud.sap/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">CAP documentation</A>, which is stored locally as embeddings. The search query is converted to an embedding vector. Finally, a similarity search is performed to find the relevant parts of the documentation, which have the highest semantic similarity to your query even if the exact keywords are not used.</P><P>Please note: These tools are meant to be used by AI models and do not constitute a stable API. But for experimental purposes, you can also use the tools directly from the command line as documented here: <A href=\"https://github.com/cap-js/mcp-server?tab=readme-ov-file#cli-usage\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">MCP server for AI-assisted development of CAP applications</A>.</P><P>&nbsp;</P><P><STRONG>Try it out</STRONG></P><P>Are you excited to try it out? Detailed instructions can be found here: <A href=\"https://github.com/cap-js/mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">MCP server for AI-assisted development of CAP applications</A>.</P><P>Important: Our MCP Server for CAP is designed to support professional developers in their daily work. As with all AI-generated information, you should check the generated results carefully to avoid unintended side effects.</P><P>We are excited to announce that the MCP Server for CAP is an open-source project, licensed under the Apache-2.0 license. Learn more about <A href=\"https://opensource.sap.com/\" target=\"_blank\" rel=\"noopener noreferrer\">open source at SAP</A>.</P><P>We are very curious to see what you will do with our <A href=\"https://npmjs.com/package/@cap-js/mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">MCP s<U>e</U><U>rver for CAP</U></A>! Please don't hesitate to provide your feedback here or report any issues in our <A href=\"https://github.com/cap-js/mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">GitHub repository</A>.</P><P><STRONG>&nbsp;</STRONG></P><P><STRONG>Beyond CAP</STRONG></P><P>We also offer a <A href=\"https://github.com/UI5/mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">UI5 MCP server</A> and an <A href=\"https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">MCP server for SAP Fiori</A>, ensuring that you have a comprehensive suite of tools to enhance your development workflow across various SAP technologies. You can find the packages here: <A href=\"https://www.npmjs.com/package/@ui5/mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">UI5 MCP server</A> and <A href=\"https://www.npmjs.com/package/@sap-ux/fiori-mcp-server\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">MCP server for SAP Fiori</A>.</P><P>The introduction of the MCP servers for CAP, SAPUI5 and SAP Fiori marks a significant step forward in leveraging AI to enhance developer productivity.</P><P>Stay tuned for more updates. Happy coding!</P>","teaser":"<P>The newly introduced MCP server for CAP transforms AI agents into CAP development experts.</P>","board":{"type":"board","id":"technology-blog-sap","href":"/boards/technology-blog-sap","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/bg-p/technology-blog-sap"},"conversation":{"type":"conversation","id":"14202849","href":"/conversations/14202849","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/boost-your-cap-development-with-ai-introducing-the-mcp-server-for-cap/ba-p/14202849","style":"blog","thread_style":"blog","messages_count":9,"solved":false,"last_post_time":"2025-11-10T04:18:03.685+01:00","last_post_time_friendly":"2025 Nov 10"},"topic":{"type":"message","id":"14202849","href":"/messages/14202849","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/boost-your-cap-development-with-ai-introducing-the-mcp-server-for-cap/ba-p/14202849"},"post_time":"2025-09-03T09:45:05.665+02:00","post_time_friendly":"2025 Sep 03","depth":0,"read_only":false,"edit_frozen":false,"language":"EN","can_accept_solution":false,"placeholder":false,"is_solution":false,"solution_data":{},"metrics":{"type":"message_metrics","views":34792},"current_revision":{"type":"revision","id":"14202849_6","last_edit_author":{"type":"user","id":"41902","href":"/users/41902","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/41902","login":"BirgitS"},"last_edit_time":"2025-09-03T09:42:00.822+02:00"},"kudos":{"query":"SELECT * FROM kudos WHERE message.id = '14202849'"},"tags":{"query":"SELECT * FROM tags WHERE messages.id = '14202849'"},"labels":{"query":"SELECT * FROM labels WHERE messages.id = '14202849'"},"images":{"query":"SELECT * FROM images WHERE messages.id = '14202849'"},"videos":{"query":"SELECT * FROM videos WHERE messages.id = '14202849'"},"attachments":{"query":"SELECT * FROM attachments WHERE message.id = '14202849'"},"replies":{"query":"SELECT * FROM messages WHERE parent.id = '14202849'"},"ratings":{"query":"SELECT * FROM ratings WHERE message.id = '14202849'"},"custom_tags":{"query":"SELECT * FROM custom_tags WHERE messages.id = '14202849'"},"moderation_status":"approved","visibility_scope":"public","user_context":{"type":"user_context","kudo":false,"read":false,"can_reply":false,"can_kudo":false,"can_delete":false},"message_type":"blog_topic_message","popularity":5.85472691878277E-5,"excluded_from_kudos_leaderboards":false,"latest_version":{"type":"friendly_version","major":"1","minor":"0"},"include_hidden_messages":true,"content_workflow":{"type":"content_workflow","state":"publish","message_draft_history":{"query":"SELECT * FROM message_draft_history WHERE message.id = '14202849'"},"user_context":{"type":"message_workflow_context","can_edit":false,"can_schedule":false},"view_href":"https://community.sap.com/t5/blogs/blogworkflowpage/blog-id/technology-blog-sap/article-id/184169"},"is_promoted":false},"metadata":{}}