Skip to main content
Glama
README.md
# BelugaMCP

Unified SAP MCP monorepo — combining 3 SAP documentation projects into a single, extensible ecosystem.

> **BelugaMCP** is the "canivete suíço" for SAP development via MCP (Model Context Protocol).
> Search SAP documentation, lint ABAP code, explore BTP services, and more — all from your AI assistant.

## Variants

| Variant | Focus | Sources | abap_lint | Discovery Center |
|---------|-------|---------|-----------|-----------------|
| `sap-docs` | Full SAP ecosystem (UI5, CAP, ABAP, BTP, ...) | 29 | ❌ | ✅ |
| `abap` | ABAP/RAP development | 12 | ✅ | ✅ |

## Quick Start

```bash
# Clone and setup
git clone https://github.com/anomalyco/BelugaMCP
cd BelugaMCP
./scripts/setup.sh

# (Optional) Generate ABAP keyword documentation
./scripts/run-pipeline.sh

# Build all packages
npm run build

# Start the sap-docs variant (stdio)
npm run dev:sap-docs
```

### Configuration in Cursor / Claude Desktop

```json
{
  "mcpServers": {
    "beluga-sap": {
      "command": "node",
      "args": ["packages/server-sap-docs/dist/index.js"],
      "env": { "MCP_VARIANT": "sap-docs" }
    }
  }
}
```

For ABAP:

```json
{
  "mcpServers": {
    "beluga-abap": {
      "command": "node",
      "args": ["packages/server-abap/dist/index.js"],
      "env": { "MCP_VARIANT": "abap" }
    }
  }
}
```

## Packages

| Package | Type | Description |
|---------|------|-------------|
| `packages/abap-docs/` | Data pipeline | Scraper + generator for ABAP Keyword Documentation (JS vanilla) |
| `packages/server-core/` | Core library | Shared MCP server code — handlers, search, metadata, URL generation |
| `packages/server-sap-docs/` | Wrapper | Thin entry point for the `sap-docs` variant |
| `packages/server-abap/` | Wrapper | Thin entry point for the `abap` variant |

## Available Tools

| Tool | Description | sap-docs | abap |
|------|-------------|----------|------|
| `search` | Hybrid search (FTS5 + semantic + online) | ✅ | ✅ |
| `fetch` | Full document retrieval | ✅ | ✅ |
| `abap_lint` | Static ABAP code analysis | ❌ | ✅ |
| `abap_feature_matrix` | ABAP feature availability by release | ✅ | ✅ |
| `sap_community_search` | SAP Community blog/Q&A search | ✅ | ✅ |
| `sap_search_objects` | SAP released objects search | ✅ | ✅ |
| `sap_get_object_details` | Released object details | ✅ | ✅ |
| `sap_discovery_center_search` | BTP service catalog search | ✅ | ✅ |
| `sap_discovery_center_service` | BTP service details | ✅ | ✅ |

## Scripts

| Script | Description |
|--------|-------------|
| `npm run scrape` | Scrape ABAP documentation from SAP Help |
| `npm run generate` | Generate Markdown from scraped HTML |
| `npm run pipeline` | Full scrape + generate pipeline |
| `npm run run-pipeline` | Full pipeline via shell script |
| `npm run build` | Build all packages (server-core → wrappers) |
| `npm run dev:sap-docs` | Dev mode with hot reload (sap-docs) |
| `npm run dev:abap` | Dev mode with hot reload (abap) |
| `npm test` | Run all tests |

## Architecture

See [ARCHITECTURE.md](./ARCHITECTURE.md) for a deep dive into the monorepo structure, variant system, and data flow.

## Credits

BelugaMCP is a unification of 3 open-source projects. See [CREDITS.md](./CREDITS.md) for full attribution.

## License

MIT — compatible with all original projects.