How dnic-dev/bw-modeling-mcp works
bw-modeling-mcp is an MCP server through which AI clients inspect and change live SAP BW systems. The main workflow is client request → MCP dispatch and platform checks → a domain tool → BW APIs, with results returned through the server. Tools cover object modeling, query design, data lineage and metadata, and operational data loads and monitoring. Shared client, platform, and request-context layers support BW access and hosted per-user identity. The README documents hosted OAuth and destinations; their wiring is not shown in the sampled source, so those links are omitted.
Main entry points: index.ts MCP server · bw-client.ts BW client · http.ts HTTP transport · query_update.ts Query updates
Components 28
MCP entry
- MCP server
src/index.ts - stdio transport
src/stdio.ts - HTTP transport
src/http.ts - Tool scopes
src/scopes.ts
Shared runtime
- Platform detection
src/platform.ts - Request context
src/request-context.ts - BW client
src/bw-client.ts
BW modeling
- Modeling objects
src/tools - Activation
src/tools/activation.ts - Transformations and DTPs
src/tools/transformation.ts - CompositeProviders
src/tools/composite_provider.ts - Reusable elements
src/tools/elem_write.ts
Queries and reporting
- Query tools
src/tools/query.ts - Query updates
src/tools/query_update.ts - Query cells
src/tools/query_cells.ts - Query characteristics
src/tools/query_characteristic.ts - Reporting
src/tools/reporting.ts
Metadata and lineage
- Search
src/tools/search.ts - Metadata readers
src/tools/metadata_tables.ts - Metadata SQL
src/tools/metadata_sql.ts - Data flow
src/tools/dataflow.ts
BW operations
- Request monitoring
src/tools/request_monitor.ts - Process chains
src/tools/processchain.ts - Data push
src/tools/push.ts
Other components
- AI client
- SAP BW system
- BTP destination
- XSUAA OAuth
Connections 44
- AI client → stdio transport: sends requests
src/stdio.ts - AI client → HTTP transport: sends requests
README.md - stdio transport → MCP server: starts
src/stdio.ts - HTTP transport → MCP server: routes requests
src/http.ts - HTTP transport → Request context: sets context
src/http.ts - HTTP transport → Tool scopes: checks access
src/http.ts - MCP server → Platform detection: checks availability
src/index.ts - MCP server → Modeling objects: dispatches tools
src/index.ts - MCP server → Query tools: dispatches tools
src/index.ts - MCP server → Query updates: dispatches tools
src/index.ts - MCP server → Query cells: dispatches tools
src/index.ts - MCP server → Query characteristics: dispatches tools
src/index.ts - MCP server → Reporting: dispatches tools
src/index.ts - MCP server → Search: dispatches tools
src/index.ts - MCP server → Metadata readers: dispatches tools
src/index.ts - MCP server → Data flow: dispatches tools
README.md - MCP server → Request monitoring: dispatches tools
README.md - MCP server → Process chains: dispatches tools
README.md - MCP server → Data push: dispatches tools
src/index.ts - Modeling objects → BW client: uses BW APIs
README.md - Activation → BW client: calls
src/tools/activation.ts - Transformations and DTPs → BW client: calls
src/tools/transformation.ts - Transformations and DTPs → Activation: uses
src/tools/transformation.ts - CompositeProviders → BW client: calls
src/tools/composite_provider.ts - Reusable elements → BW client: calls
src/tools/elem_write.ts - Query tools → BW client: calls
src/tools/query.ts - Query updates → Query tools: reuses query helpers
src/tools/query_update.ts - Query updates → BW client: calls
src/tools/query_update.ts - Query cells → Query updates: uses document helpers
src/tools/query_cells.ts - Query characteristics → Query updates: uses document helpers
src/tools/query_characteristic.ts - Reporting → BW client: calls
src/tools/reporting.ts - Search → Metadata SQL: queries metadata
src/tools/search.ts - Search → Metadata readers: reads provider details
src/tools/search.ts - Metadata readers → Metadata SQL: runs SQL reads
src/tools/metadata_tables.ts - Metadata SQL → BW client: calls ADT API
src/tools/metadata_sql.ts - Metadata readers → BW client: calls BW APIs
src/tools/metadata_tables.ts - Data flow → BW client: reads BW lineage
README.md - Request monitoring → BW client: calls manage API
README.md - Process chains → BW client: calls BW APIs
README.md - Data push → BW client: calls Push API
README.md - BW client → SAP BW system: connects to
README.md - XSUAA OAuth → HTTP transport: protects hosted access
README.md - HTTP transport → BTP destination: uses hosted destination
README.md - Request context → BW client: supplies active client
src/request-context.ts