GC

gavdilabs/cap-mcp-plugin

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

61 stars 22 forks 质量 57 趋势 17NOASSERTION

gavdilabs/cap-mcp-plugin 是从 https://github.com/gavdilabs/cap-mcp-plugin. 导入的 MCP 服务器候选

概览

gavdilabs/cap-mcp-plugin 是从 https://github.com/gavdilabs/cap-mcp-plugin. 导入的 MCP 服务器候选

概述(AI 翻译)

该实现基于Anthropic提出的模型上下文协议(MCP)。 有关MCP的更多信息,请查看其官方文档。

CAP-MCP 插件

一个CAP(云应用编程)插件,通过简单的注释自动从您的CAP服务生成模型上下文协议(MCP)服务器。 将你的CAP OData服务转化为AI可访问的资源、工具和提示,只需最少配置即可。

🚀 MCP在CAP应用中的强大

模型上下文协议弥合了企业数据与AI代理之间的差距。 通过将MCP与您的CAP应用集成,您可以解锁:

  • AI原生数据访问:您的CAP服务可直接被支持MCP的AI代理如Claude访问,支持对业务数据的自然语言查询
  • 企业集成:将AI工具无缝连接到您的SAP系统、数据库和业务逻辑
  • 智能自动化:通过合并多个CAP服务调用,使AI代理能够执行复杂的业务操作
  • 开发者生产力:允许AI助手帮助开发者理解、查询并操作你的CAP数据模型

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

CAP MCP Plugin - AI With Ease

This implementation is based on the Model Context Protocol (MCP) put forward by Anthropic. For more information on MCP, please have a look at their official documentation.

CAP-MCP Plugin

A CAP (Cloud Application Programming) plugin that automatically generates Model Context Protocol (MCP) servers from your CAP services using simple annotations. Transform your CAP OData services into AI-accessible resources, tools, and prompts with minimal configuration.

🚀 The Power of MCP for CAP Applications

The Model Context Protocol bridges the gap between your enterprise data and AI agents. By integrating MCP with your CAP applications, you unlock:

  • AI-Native Data Access: Your CAP services become directly accessible to MCP enabled AI agents like Claude, enabling natural language queries against your business data
  • Enterprise Integration: Seamlessly connect AI tools to your SAP systems, databases, and business logic
  • Intelligent Automation: Enable AI agents to perform complex business operations by combining multiple CAP service calls
  • Developer Productivity: Allow AI assistants to help developers understand, query, and work with your CAP data models
  • Business Intelligence: Transform your structured business data into AI-queryable resources for insights and analysis

🚀 Quick Setup

Want to read the full documentation? Find it here

Prerequisites

  • Node.js: Version 18 or higher
  • SAP CAP: Version 10 or higher
  • Express: Version 5 or higher
  • TypeScript: Optional but recommended

Step 1: Install the Plugin

npm install @gavdi/cap-mcp

The plugin follows CAP’s standard plugin architecture and will automatically integrate with your CAP application upon installation.

Step 2: Configure Your CAP Application

Add MCP configuration to your package.json:

{
  "cds": {
    "mcp": {
      "name": "my-bookshop-mcp",
      "auth": "inherit",
      "wrap_entities_to_actions": false,
      "wrap_entity_modes": ["query", "get"],
      "instructions": "MCP server instructions for agents"
    }
  }
}

Step 3: Add MCP Annotations

Annotate your CAP services with @mcp annotations:

// srv/catalog-service.cds
service CatalogService {

  @mcp: {
    name: 'books',
    description: 'Book catalog with search and filtering',
    resource: ['filter', 'orderby', 'select', 'top', 'skip', 'expand']
  }
  entity Books as projection on my.Books;

  // Optionally expose Books as tools for LLMs (query/get enabled by default config)
在 GitHub 查看完整 README

安装

npx @modelcontextprotocol/inspector
新手?先看 mcpskill.org 教程 →