agentleFS
marianfoomarianfoo/mcp-sap-docs/.cursor/rules/00-overview.mdc

mcp-sap-docs / rules

Cursor rule243 starsChanged 6 months agoApache-2.0View on GitHub

Use this when asked about "how it works", "where to change X", or "what runs in prod". @file package.json @file src/metadata.json @file src/lib/config.ts @file src/lib/metadata.ts @file src/lib/search.ts @file src/server.ts @file src/http-server.ts @file src/streamable-http-server.ts @file ecosystem.config.cjs @file docs/ARCHITECTURE.md @file docs/DEV.md

We split this 00-overview.mdc into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when asked about "how it works", "where to change X", or "what runs in prod".

    line 3
  2. Very specific:

    Metadata-Driven: All source configurations centralized in src/metadata.json

    line 9

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
00-overview.mdc
# SAP Docs MCP – High-level Overview (Rule)

Use this when asked about "how it works", "where to change X", or "what runs in prod".

## System Architecture
- **MCP Server**: Stdio-based server for Claude/LLM integration
- **HTTP Servers**: Development server (port 3001) and streamable HTTP server (port 3122)
- **Search Pipeline**: BM25-only (FTS5) → metadata-driven configuration → formatted results
- **Metadata-Driven**: All source configurations centralized in `src/metadata.json`
- **Submodule Management**: Shallow, single-branch clones with blob filtering for performance

## Key Components
- **Search**: Pure BM25 using SQLite FTS5 for fast, reliable search
- **Configuration**: Centralized metadata system with type-safe APIs
- **Sources**: 27 documentation sources (SAPUI5, CAP, ABAP Standard + Cloud, wdi5, Cloud SDK, etc.)
- **Tools**: 5 MCP tools (search, fetch, sap_community_search, sap_help_search, sap_help_get)
- **Build Process**: TypeScript compilation → Index building → FTS database creation
- **ABAP Integration**: Standard + Cloud variants (on-premise + BTP) with intelligent filtering

## Production Setup
- **Remote Server**: Hosted MCP server at https://mcp-sap-docs.marianzeis.de/mcp
- **PM2**: 3 processes (proxy, http, streamable) via `ecosystem.config.cjs`
- **Deployment**: GitHub Actions → SSH → enhanced `setup.sh` → PM2 restart
- **Health**: Multiple endpoints (/status, /health, /healthz, /readyz)
- **Submodules**: Optimized shallow clones with partial clone filtering
- **Protocol**: MCP Streamable HTTP (latest protocol) + STDIO support

@file package.json
@file src/metadata.json
@file src/lib/config.ts
@file src/lib/metadata.ts
@file src/lib/search.ts
@file src/server.ts
@file src/http-server.ts
@file src/streamable-http-server.ts
@file ecosystem.config.cjs
@file docs/ARCHITECTURE.md
@file docs/DEV.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.