@qubittron/mcp-server-sap
v2.0.1
Published
MCP server for Qubi SAP — leverage Qubi's SAP expertise and your own enterprise knowledge maintained on the Qubi platform. Works with Claude Code, Claude.ai, Cursor, and any MCP-compatible AI tool.
Downloads
36
Readme
@qubittron/mcp-server-sap
MCP server for Qubi SAP — leverage Qubi's comprehensive SAP knowledge base as a knowledge retrieval layer for your AI coding assistant. Works with Claude Code, Claude.ai, Cursor, and any MCP-compatible tool.
How It Works
Qubi MCP provides SAP domain knowledge directly to your AI coding assistant:
- You ask a SAP question or request
- Your AI assistant (Claude Code, Cursor, etc.) calls Qubi MCP tools
- Qubi searches its SAP knowledge base via vector similarity
- Raw documentation is returned to your AI assistant
- Your AI reasons over the SAP docs and produces the answer/code
Zero LLM cost on Qubi's side — all AI reasoning happens in your existing AI assistant. Qubi only provides the SAP knowledge retrieval.
Quick Start
Claude Code
claude mcp add qubi-sap -- npx @qubittron/mcp-server-sap
# Set environment variables
export QUBI_SERVER_URL=https://your-instance.qubittron.com
export QUBI_API_KEY=your-api-keyClaude.ai Desktop
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"qubi-sap": {
"command": "npx",
"args": ["@qubittron/mcp-server-sap"],
"env": {
"QUBI_SERVER_URL": "https://your-instance.qubittron.com",
"QUBI_API_KEY": "your-api-key"
}
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"qubi-sap": {
"command": "npx",
"args": ["@qubittron/mcp-server-sap"],
"env": {
"QUBI_SERVER_URL": "https://your-instance.qubittron.com",
"QUBI_API_KEY": "your-api-key"
}
}
}
}Available Tools (8)
All tools return raw SAP documentation chunks. Your AI assistant synthesizes them.
| Tool | What It Searches | Best For |
|---|---|---|
| search_sap_knowledge | Full SAP KB (90+ modules) | General SAP questions |
| ask_sap_agent | Module-filtered KB | Focused domain questions |
| analyze_sap_project | Best practices for tech stack | Project review |
| generate_cap_files | CAP patterns and examples | Code generation reference |
| get_sap_best_practice | Recommended patterns | Pre-coding guidance |
| validate_sap_code | Standards and error patterns | Post-coding validation |
| get_sap_config_guide | Configuration documentation | System setup |
| list_sap_agents | Static agent list | Discovery |
Tools Detail
search_sap_knowledge
Semantic vector search across the entire SAP knowledge base. Returns structured JSON with relevance scores and quality tier.
query: "How to configure batch jobs in S/4HANA"
module: "MM" (optional filter)
limit: 5 (1-20)ask_sap_agent
Search SAP documentation with agent-specific module filtering. Automatically generates multiple search queries for comprehensive coverage.
question: "Best practices for CAP service handlers"
agent: "sap-cap" (optional, searches all modules if omitted)
context: "Using Node.js runtime with HANA" (optional)analyze_sap_project
Get SAP best practice documentation relevant to a project's technology stack. Provide your project structure and key files for comparison.
projectStructure: "db/schema.cds\nsrv/service.cds\n..."
files: [{ path: "db/schema.cds", content: "..." }]
focusAreas: ["security", "deployment"]generate_cap_files
Get SAP CAP documentation, patterns, and examples relevant to your requirements. Returns reference material for your AI assistant to use when generating project files.
requirements: "Timesheet management with employees and approval workflow"
entities: ["Employee", "Timesheet", "Approval"]
includeFiori: true
includeDeployment: trueget_sap_best_practice
Get SAP best practices and recommended patterns for a specific topic.
topic: "CAP service handler error handling"
module: "CAP" (optional)
area: "development" (optional)validate_sap_code
Get SAP standards and common error patterns for validating code. Your AI assistant compares the provided code against the returned standards.
code: "using { managed } from '@sap/cds/common'; ..."
language: "cds"
fileType: "schema" (optional)
filePath: "db/schema.cds" (optional)get_sap_config_guide
Get SAP configuration documentation for a specific setup task.
scenario: "Set up automatic payment program F110"
system: "S/4HANA" (optional)
module: "FI" (optional)Claude Code Workflow Examples
1. Build a CAP app from scratch
> Use generate_cap_files to get patterns for a leave management system with Employee, LeaveRequest, and Approval entities, then write the files based on those patterns2. Review an existing project
> Use analyze_sap_project with my project structure and key CDS files, focus on security and deployment readiness3. Research before implementing
> Use search_sap_knowledge to find how draft-enabled services work in CAP, then get_sap_best_practice for CAP draft handling patterns4. Get configuration help
> Use get_sap_config_guide for setting up OAuth2 SAML Bearer assertion in Integration Suite for S/4HANA connectivity5. Validate code before committing
> Use validate_sap_code on my db/schema.cds and srv/service.js files before I commitEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| QUBI_SERVER_URL | Yes | Your Qubi instance URL |
| QUBI_API_KEY | Yes | API key from Qubi dashboard |
Alternative variable names supported: QUBI_URL, QUBI_TOKEN
API Endpoints Used
The MCP server only calls two Qubi endpoints:
| Endpoint | Method | Purpose |
|----------|--------|---------|
| /api/sap/knowledge/search | POST | Vector similarity search |
| /api/sap/health | GET | Health check |
No LLM endpoints are called. The /api/sap/chat endpoint is not used by the MCP server.
SAP Module Coverage
90+ SAP modules including: FI, CO, MM, SD, PP, QM, PM, PS, HCM, WM, TM, BTP, CAP, Fiori, HANA, Cloud ALM, Ariba, SAC, Datasphere, Integration Suite, SuccessFactors, RAP, ABAP, UI5, EWM, and more.
Development
cd packages/mcp-server
npm install
npm run build # Compile TypeScript
npm run dev # Start with tsx for developmentChangelog
[2.0.0] - 2026-05-07
Changed (BREAKING)
- All tools now return raw SAP documentation chunks instead of LLM-generated responses
- Zero LLM cost on Qubi side — AI reasoning handled by your coding assistant
- Removed dependency on
/api/sap/chatendpoint - Only uses
/api/sap/knowledge/search(vector search)
Added
- Multi-query search for comprehensive coverage
- Intelligent query generation based on question type (30+ SAP module keyword patterns)
- Agent-to-module mapping for focused searches
- Shared
formatChunks()helper for consistent output
Removed
askAgent()client method (replaced bysearchMultiple())- SSE response parsing (no longer needed)
- LLM JSON extraction utilities (no longer needed)
- LLM-generated file parsing (no longer needed)
[1.0.1] - 2026-05-04
- Initial release with 8 MCP tools
- LLM-powered responses via
/api/sap/chat
Get Access
Contact [email protected] to get your Qubi platform URL and API key.
