Skip to main content
Glama

coBWeb

An MCP server for modeling in SAP BW/4HANA. coBWeb talks to the REST interface of the BW Modeling Tools (/sap/bw/modeling/…) and gives a language model eleven intent-based tools: search, read, write, activate, data, monitoring, runtime actions and transports. It does not offer one tool per object type and operation.

The design goal is a small, stable tool list that costs few input tokens on every step, and writes that finish a task in few calls:

  • Few tools, small schemas. The whole catalog has 11 tools and about 16,200 characters (roughly 4,600 tokens). The default profile modeling has 8 tools and about 10,600 characters.

  • One call per change. bw_write takes several objects at once (InfoObjects, a DataStore object, a CompositeProvider, a transformation and its DTP), orders them by dependency, locks, saves, activates and unlocks. The model never handles lock handles or sessions.

  • Declarative specs. An object is described by a spec; the same spec again reports unchanged. bw_describe returns the spec format of a type.

  • Compact answers. Reads return a summary first; detail and part give more on request. Errors say what to change.

  • Safe by default. Without flags the server only reads. Writes, data access and runtime actions are switched on separately and limited to packages and InfoAreas you allow.

  • Structured results for programs. With COBWEB_STRUCTURED=true, reads and the data flow also come as JSON with an output schema, for applications that call coBWeb without a model.

Tools

Tool

Purpose

bw_search

find objects by name or description; list an InfoArea

bw_read

read one object: summary, full or raw; part for one section

bw_context

data flow and where-used of an object in one answer

bw_describe

the spec format bw_write expects for a type

bw_write

create, update, delete several objects and activate them in one call; validate_only checks without writing

bw_activate

check or activate inactive objects

bw_data

query data (rows, columns, filters, variables, hierarchy nodes), DataSource preview, characteristic values

bw_monitor

process chain runs, load requests, remodeling requests, query statistics

bw_run

run a DTP, start a process chain, activate or delete requests, remodeling, push data into an ADSO

bw_transport

changeable transport requests, transport tasks, package assignment, moving objects between InfoAreas

bw_system

system profile and active safety settings; release a lock after an aborted change

Parameters and examples: docs/TOOLS.md.

Related MCP server: SAP BTP ABAP ADT MCP Server

Object types

Code

Object

Read

Write

AREA

InfoArea

✔

create, update, delete

IOBJ

InfoObject (characteristics, key figures, attributes, compounding, reference characteristics, text types, hierarchies)

✔

create, update, delete

ADSO

DataStore object (advanced) incl. fields without InfoObject, keys, settings, planning

✔

create, update, delete

HCPR

CompositeProvider (union, join), mappings, field groups

✔

create, update, delete

TRCS

InfoSource

✔

create, update, delete

TRFN

Transformation: rules, lookups, start, end and expert routines, runtime

✔

create, update, delete

DTPA

Data transfer process: mode, filters, filter routines, semantic groups

✔

create, update, delete

RSDS

DataSource: fields, delta

✔

create, update, delete

LSYS

Source system and its entities

✔

–

RSPC

Process chain: steps, decisions, scheduling; settings of each process variant

✔

create, update, delete

QUERY

Query: layout, filter, members, characteristics, settings, cells, roles

✔

create, update, delete

VARIABLE, CKF, RKF, STRUCTURE

Query components

✔

create, update, delete

ALVL, FILTER, PLSE, PLSQ

Aggregation level, planning filter, planning function, planning sequence

✔

create, update, delete

HIER

Hierarchy of a characteristic (<characteristic>/<hierarchy>)

✔

create, update, delete

DEST

Open Hub destination

✔

delete

ROLE

Roles and the queries published in them

✔

via the query (roles_add, roles_remove)

coBWeb is developed and tested on SAP BW/4HANA 2.0 and later. The platform is detected at start; classic BW 7.5 on HANA is recognized but not supported.

Setup

Requirements: Node.js 22 or later; a BW/4HANA system with the BW Modeling Tools services active and a user with modeling authorization.

git clone https://github.com/oliverluette/coBWeb-mcp.git
cd coBWeb-mcp
npm install
npm run build

Configuration

All settings are environment variables of the server process.

Connection:

Variable

Meaning

BW_URL

base URL of the BW system, e.g. https://bw.example.com:44300

BW_USER, BW_PASSWORD

logon (basic authentication)

BW_CLIENT

client, default 001

BW_COOKIE_FILE

instead of user and password: cookies of a browser session (e.g. SAML)

BW_PLATFORM

auto (default) or bw4

Tools and safety (all optional; without flags the server is read-only):

Variable

Default

Meaning

COBWEB_PROFILE

modeling

tool set: modeling, analysis, operations or full

COBWEB_TOOLS

–

explicit tool list, overrides the profile

COBWEB_TYPES

all

allowed object types, e.g. AREA,IOBJ,ADSO

COBWEB_ALLOW_WRITES

false

create, change, delete, activate, transports, unlock

COBWEB_ALLOW_DATA

false

read business data (bw_data)

COBWEB_ALLOW_EXECUTE

false

runtime actions (bw_run)

COBWEB_ALLOWED_PACKAGES

$TMP

packages writes may go to; patterns with *, e.g. $*,Z*

COBWEB_ALLOWED_INFOAREAS

*

InfoAreas objects may be created in or changed

COBWEB_DENY_ACTIONS

–

single actions to refuse, e.g. bw_write.delete,bw_run.delete_request

COBWEB_MAX_RESULT_CHARS

20000

upper bound of every tool result

COBWEB_AUDIT_FILE

–

file for the audit log (one JSON line per written object)

COBWEB_LOG_LEVEL

info

error, warn, info, debug (stderr)

COBWEB_STRUCTURED

false

structured results for programs, not for model clients (see docs/TOOLS.md)

Profiles:

Profile

Tools

modeling

search, read, context, describe, write, activate, transport, system

analysis

search, read, context, data

operations

search, read, monitor, run, system

full

all eleven

Tools that a profile or the flags leave out are not offered at all, so the model never sees them. bw_system(action="profile") shows the active settings.

Claude Desktop

In claude_desktop_config.json:

{
  "mcpServers": {
    "cobweb": {
      "command": "node",
      "args": ["/path/to/coBWeb-mcp/dist/transport/stdio.js"],
      "env": {
        "BW_URL": "https://…",
        "BW_USER": "…",
        "BW_PASSWORD": "…",
        "BW_CLIENT": "001",
        "COBWEB_PROFILE": "modeling",
        "COBWEB_ALLOW_WRITES": "true"
      }
    }
  }
}

Restart Claude Desktop after a change.

Claude Code

claude mcp add cobweb --env BW_URL=https://… --env BW_USER=… --env BW_PASSWORD=… --env BW_CLIENT=001 \
  -- node /path/to/coBWeb-mcp/dist/transport/stdio.js

Other MCP hosts

Any host that starts stdio servers works: command node, argument dist/transport/stdio.js, and the environment variables above.

Development

Command

Purpose

npm run build

compile TypeScript to dist/

npm run typecheck

type check without output

node scripts/tools-list.mjs [profile]

print the tool list a profile offers (JSON)

node scripts/dev-reload.mjs

development launcher: runs the server as a child and restarts it before the next tool call when dist/ changed

For development, point the host's args at scripts/dev-reload.mjs instead of dist/transport/stdio.js; a new build then takes effect without restarting the host. A changed tool list is announced with notifications/tools/list_changed; hosts that do not read it again need a restart for that.

How the server is built: docs/ARCHITECTURE.md. Changes per version: CHANGELOG.md.

Origin

coBWeb started as a fork of bw-modeling-mcp (MIT License). It keeps that project's BW client and its write, reporting and runtime paths for the BW REST services (src/legacy/, parts of src/bw/), changed where needed; the tool design, object adapters, write engine and policy are new. The details are in NOTICE.

License

MIT, see LICENSE. Third-party parts: see NOTICE.

Available Tools

6 tools
bw_contextData flow and where-usedA
Read-onlyIdempotent

Show how a BW object is connected: relation="dataflow" lists sources and targets with the transformations and DTPs between them; "where_used" lists objects that reference it (impact before a change). Use it instead of reading many objects one by one. depth controls how many hops are followed.

Inputs: name (required), type (required), depth, relation, +2 more.

bw_describeSpec format for bw_writeA
Read-onlyIdempotent

Return the spec format bw_write expects for one object type and action: allowed fields, data types, defaults, rules and a minimal example. Call it once per type before the first bw_write of that type; the result does not change during a session.

Inputs: type (required), action.

bw_readRead a BW objectA
Read-onlyIdempotent

Read the definition of one BW object. detail="summary" (default) returns a compact, model-friendly overview (fields, keys, settings, status); "full" adds every property; "raw" returns the backend XML/JSON and should only be used for debugging. Use part to read only one section of a large object, e.g. fields, keys, rules, steps, layout.

Inputs: name (required), type (required), part, detail, +1 more.

bw_systemSystem profile and maintenanceA
Read-onlyIdempotent

System information: release, platform (BW/4HANA or classic), enabled object types and the active safety settings. Call it only when a call fails for a system reason, not as a first step.

Inputs: action.

bw_transportTransports and packagesB
Read-onlyIdempotent

List the changeable transport requests (own, modifiable by default). Use it before bw_write when an object lives outside $TMP.

Inputs: action (required), user, objects, package, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation4/5

    The six tools have mostly distinct roles: search finds names, read returns object definitions, context shows relationships, describe returns write-spec metadata, transport lists transport requests, and system reports environment details. The main ambiguity is that bw_describe and bw_transport both reference a missing bw_write, so an agent may wonder how their outputs are actually meant to be used.

    Naming Consistency4/5

    All tools use a consistent bw_ prefix and lowercase snake_case, which is predictable and readable. The suffix convention mixes nouns (bw_system, bw_transport, bw_context) with verbs (bw_search, bw_read, bw_describe), though this is a minor deviation rather than a serious inconsistency.

    Tool Count4/5

    Six tools is a reasonable, well-scoped count for a BW metadata and inspection server. However, the set feels slightly thin for a domain whose own tool descriptions assume an available write operation.

    Completeness2/5

    The surface is read-heavy and severe gaps exist: bw_write is repeatedly referenced but absent, and there are no create, update, delete, or transport-release operations. This will cause dead ends for any agent trying to follow the documented workflow of inspecting then modifying BW objects.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      A
      maintenance
      Enables AI assistants to read, create, and modify SAP BW/4HANA modeling objects via the internal REST API, including aDSOs, InfoObjects, transformations, DTPs, queries, and more.
      21
      173 npm
      85
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables AI assistants like Claude to work directly inside SAP BW/4HANA systems — reading, creating and modifying BW modeling objects via the internal REST API used by Eclipse BWMT.
      MIT