Skip to main content

MCP server for SAP Business Data Cloud integration

Project description

SAP Business Data Cloud MCP Server

License: MIT Python 3.9+ MCP

An MCP (Model Context Protocol) server that provides integration with SAP Business Data Cloud (BDC) Connect SDK. This server enables AI assistants like Claude to interact with SAP BDC for data sharing, Delta Sharing protocol operations, and data product management.

Status: Initial Release - Ready for validation testing

Features

This MCP server exposes the following SAP BDC capabilities:

  • Create/Update Shares: Manage data shares with ORD metadata
  • CSN Schema Management: Configure shares using Common Semantic Notation
  • Data Product Publishing: Publish and unpublish data products
  • Share Deletion: Remove and withdraw shared resources
  • CSN Template Generation: Auto-generate CSN templates from Databricks shares

Prerequisites

  • Python 3.9 or higher
  • Access to a Databricks environment
  • SAP Business Data Cloud account
  • Databricks recipient configured for Delta Sharing

Quick Start

Installation

# Clone the repository
git clone https://github.com/MarioDeFelipe/sap-bdc-mcp-server.git
cd sap-bdc-mcp-server

2. Install Dependencies

pip install -e .

Or for development:

pip install -e ".[dev]"

3. Configure Environment

Copy the example environment file and configure it:

cp .env.example .env

Edit .env and set your Databricks recipient name:

DATABRICKS_RECIPIENT_NAME=your_recipient_name
LOG_LEVEL=INFO

Usage

Running the Server

The MCP server runs as a stdio-based service:

python -m sap_bdc_mcp.server

Or using the installed script:

sap-bdc-mcp

Integration with Claude Desktop

Add this server to your Claude Desktop configuration file:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "sap-bdc": {
      "command": "python",
      "args": ["-m", "sap_bdc_mcp.server"],
      "env": {
        "DATABRICKS_RECIPIENT_NAME": "your_recipient_name"
      }
    }
  }
}

Alternatively, if installed in a virtual environment:

{
  "mcpServers": {
    "sap-bdc": {
      "command": "C:\\path\\to\\venv\\Scripts\\python.exe",
      "args": ["-m", "sap_bdc_mcp.server"],
      "env": {
        "DATABRICKS_RECIPIENT_NAME": "your_recipient_name"
      }
    }
  }
}

Available Tools

1. create_or_update_share

Create or update a data share with ORD metadata.

Parameters:

  • share_name (required): Name of the share
  • ord_metadata (optional): ORD metadata object
  • tables (optional): Array of table names to include

Example:

{
  "share_name": "customer_data_share",
  "ord_metadata": {
    "title": "Customer Data",
    "description": "Shared customer information"
  },
  "tables": ["customers", "orders"]
}

2. create_or_update_share_csn

Create or update a share using CSN format.

Parameters:

  • share_name (required): Name of the share
  • csn_schema (required): CSN schema definition object

Example:

{
  "share_name": "product_share",
  "csn_schema": {
    "definitions": {
      "Products": {
        "kind": "entity",
        "elements": {
          "ID": {"type": "String"},
          "name": {"type": "String"}
        }
      }
    }
  }
}

3. publish_data_product

Publish a data product to make it available for consumption.

Parameters:

  • share_name (required): Name of the share
  • data_product_name (required): Name of the data product

Example:

{
  "share_name": "customer_data_share",
  "data_product_name": "CustomerAnalytics"
}

4. delete_share

Delete a share and withdraw shared resources.

Parameters:

  • share_name (required): Name of the share to delete

Example:

{
  "share_name": "old_share"
}

5. generate_csn_template

Generate a CSN template from an existing Databricks share.

Parameters:

  • share_name (required): Name of the Databricks share

Example:

{
  "share_name": "existing_databricks_share"
}

Architecture

The server uses:

  • MCP SDK: For protocol implementation
  • SAP BDC Connect SDK: For SAP Business Data Cloud operations
  • Delta Sharing: Open protocol for secure data sharing
  • ORD Protocol: For resource discovery and metadata

Development

Running Tests

pytest

Project Structure

sap-bdc-mcp-server/
├── src/
│   └── sap_bdc_mcp/
│       ├── __init__.py
│       ├── server.py       # Main MCP server implementation
│       └── config.py       # Configuration management
├── pyproject.toml          # Project dependencies
├── .env.example           # Environment variable template
└── README.md              # This file

Important Notes

Databricks Integration

The SAP BDC Connect SDK requires integration with Databricks. The server needs:

  • A valid Databricks environment with dbutils available
  • A configured recipient for Delta Sharing

Note: When running outside Databricks (e.g., local development), you may need to mock or provide alternative implementations for Databricks utilities.

Authentication

Authentication is handled through:

  1. Databricks workspace credentials
  2. Recipient configuration in Databricks
  3. SAP BDC service credentials (configured in Databricks)

Troubleshooting

"BDC client not initialized" Error

The client requires initialization with Databricks utilities. If running in a non-Databricks environment, you may need to:

  • Run the server within a Databricks notebook
  • Use Databricks Connect for local development
  • Mock the required Databricks utilities for testing

Missing Environment Variables

Ensure DATABRICKS_RECIPIENT_NAME is set in your environment or .env file.

Resources

License

This MCP server is provided as-is. Please review the SAP BDC Connect SDK license terms when using this integration.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on:

  • Setting up your development environment
  • Running tests
  • Submitting pull requests
  • Code style guidelines

Roadmap

  • Initial validation with Databricks environment
  • PyPI package publication
  • npm package for Node.js environments
  • Additional SAP BDC SDK features
  • Enhanced error handling and logging
  • Integration examples and tutorials

Support

Acknowledgments

  • SAP for the BDC Connect SDK
  • Anthropic for the Model Context Protocol
  • The MCP community for inspiration and support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sap_bdc_mcp_server-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sap_bdc_mcp_server-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file sap_bdc_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: sap_bdc_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sap_bdc_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b14447c7ac401ce733c9da499b396df720a7ae9f9a4ae20e5159dbb5979a14f
MD5 c12fc0000f8b312208c1cc2c900c036f
BLAKE2b-256 050a319a6142ef936009603863c245703f2708ac1845f43c8ce1d186555987ab

See more details on using hashes here.

File details

Details for the file sap_bdc_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sap_bdc_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83f06540ca0a348ce3465a97e6bd96e12acbc0285f5d33413ea784c20494ba9d
MD5 1e02bd0ab76d631d7d643be41695d84b
BLAKE2b-256 813ac3218b60b2964c5db3593177c7b3634d3432c15a6a8569e0602caa4d9f66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page