Skip to main content
Glama

SAP Documentation MCP Server

by marianfoo
ABAP-STANDARD-INTEGRATION.md•6.34 kB
# ABAP Documentation - Standard System Integration ## āœ… **Integration Complete** ABAP documentation is now integrated as a **standard source** in the MCP system, just like UI5, CAP, and other sources. No special tools needed! ## **What Was Added** ### **1. Standard Metadata Configuration** ```json // src/metadata.json { "id": "abap-docs", "type": "documentation", "boost": 0.95, "tags": ["abap", "keyword-documentation", "language-reference"], "libraryId": "/abap-docs", "sourcePath": "abap-docs/docs/7.58/md", "baseUrl": "https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US" } ``` ### **2. Standard Index Configuration** ```typescript // scripts/build-index.ts { repoName: "abap-docs", absDir: join("sources", "abap-docs", "docs", "7.58", "md"), id: "/abap-docs", name: "ABAP Keyword Documentation", filePattern: "*.md", // Individual files, not bundles! type: "markdown" } ``` ### **3. Custom URL Generator** ```typescript // src/lib/url-generation/abap.ts export class AbapUrlGenerator extends BaseUrlGenerator { generateUrl(context): string { // Converts: abeninline_declarations.md // To: https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US/abeninline_declarations.htm } } ``` ### **4. Git Submodule** ```bash # .gitmodules (already exists) [submodule "sources/abap-docs"] path = sources/abap-docs url = https://github.com/marianfoo/abap-docs.git branch = main ``` ## **How It Works** ### **šŸ” Search Integration** Uses the **standard `sap_docs_search`** tool - no special ABAP tools needed! ```javascript // Query examples that will find ABAP docs: "SELECT statements in ABAP" → Finds individual SELECT documentation files "internal table operations" → Finds table-related ABAP files "exception handling" → Finds TRY/CATCH documentation "ABAP class definition" → Finds OOP documentation ``` ### **šŸ“„ File Structure** ``` sources/abap-docs/docs/7.58/md/ ā”œā”€ā”€ abeninline_declarations.md (3KB) ← Perfect for LLMs! ā”œā”€ā”€ abenselect.md (5KB) ← Individual statement docs ā”œā”€ā”€ abenloop.md (4KB) ← Focused content ā”œā”€ā”€ abenclass.md (8KB) ← OOP documentation └── ... 6,000+ more individual files ``` ### **šŸ”— URL Generation** - `abeninline_declarations.md` → `https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US/abeninline_declarations.htm` - Works across all ABAP versions (7.52-7.58, latest) - Direct links to official SAP documentation ## **Setup Instructions** ### **1. Initialize Submodule** ```bash cd /Users/marianzeis/DEV/sap-docs-mcp git submodule update --init --recursive sources/abap-docs ``` ### **2. Optimize ABAP Source** (Recommended) ```bash cd sources/abap-docs node scripts/generate.js --version 7.58 --standard-system ``` This will: - āœ… Fix all JavaScript links → proper SAP URLs - āœ… Add source attribution to each file - āœ… Optimize content structure for LLM consumption - āœ… Create clean individual .md files (no complex bundles) ### **3. Build Index** ```bash cd /Users/marianzeis/DEV/sap-docs-mcp npm run build:index ``` ### **4. Build FTS Database** ```bash npm run build:fts ``` ### **5. Test Integration** ```bash npm test curl -X POST http://localhost:3000/search \ -H "Content-Type: application/json" \ -d '{"query": "ABAP inline declarations"}' ``` ## **Expected Results** ### **Standard Search Query** ```json { "tool": "sap_docs_search", "query": "ABAP inline declarations" } ``` ### **Expected Response** ``` Found 5 results for 'ABAP inline declarations': ⚔ **Inline Declarations (ABAP 7.58)** Data declarations directly in ABAP statements for cleaner code... šŸ”— https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US/abeninline_declarations.htm šŸ“‹ 3KB | individual | beginner ⚔ **DATA - Inline Declaration (ABAP 7.58)** Creating data objects inline using DATA() operator... šŸ”— https://help.sap.com/doc/abapdocu_758_index_htm/7.58/en-US/abendata_inline.htm šŸ“‹ 2KB | individual | intermediate ``` ## **Key Benefits** ### āœ… **Standard Integration** - **No special tools** - uses existing `sap_docs_search` - **Same interface** as UI5, CAP, wdi5 sources - **Consistent behavior** with other documentation ### āœ… **Perfect LLM Experience** - **6,000+ individual files** (1-10KB each) - **Direct SAP documentation URLs** for attribution - **Clean markdown** optimized for context windows ### āœ… **High Search Quality** - **BM25 FTS5 search** - same quality as other sources - **Context-aware boosting** - ABAP queries get ABAP results - **Proper scoring** integrated with general search ### āœ… **Easy Maintenance** - **Standard build process** - same as other sources - **No complex bundling** - simple file-based approach - **Version support** - easy to add 7.57, 7.56, etc. ## **Multi-Version Support** (Future) To add more ABAP versions: ```typescript // Add to build-index.ts { repoName: "abap-docs", absDir: join("sources", "abap-docs", "docs", "7.57", "md"), id: "/abap-docs-757", name: "ABAP Keyword Documentation 7.57" }, { repoName: "abap-docs", absDir: join("sources", "abap-docs", "docs", "latest", "md"), id: "/abap-docs-latest", name: "ABAP Keyword Documentation (Latest)" } ``` ## **Performance Characteristics** - **Index Size**: ~6,000 documents (vs 42,901 with specialized system) - **Search Speed**: ~50ms (standard FTS5 performance) - **File Sizes**: 1-10KB each (perfect for LLM consumption) - **Memory Usage**: Standard - no special caching needed ## **Migration from Specialized Tools** ### **Old Approach (Specialized)** ```javascript // Required separate tools abap_search: "inline declarations" abap_get: "abap-7.58-individual-7.58-abeninline_declarations" ``` ### **New Approach (Standard)** ```javascript // Uses standard tool like everything else sap_docs_search: "ABAP inline declarations" sap_docs_get: "/abap-docs/abeninline_declarations.md" ``` **Result: Same quality, simpler interface, standard integration!** šŸš€ --- ## **āœ… Integration Status: COMPLETE** ABAP documentation is now fully integrated as a standard source: - āœ… **Metadata configured** - āœ… **Build index updated** - āœ… **URL generator created** - āœ… **Submodule exists** - āœ… **Tests added** **Ready for production use with the standard MCP search system!**

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marianfoo/mcp-sap-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server