loading…
Search for a command to run...
loading…
Enables AI assistants to manage SAP Business Data Cloud operations including data shares, Delta Sharing, and data product publishing through an MCP interface.
Enables AI assistants to manage SAP Business Data Cloud operations including data shares, Delta Sharing, and data product publishing through an MCP interface.
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: ✅ Released on PyPI - v0.2.0 (2026-01-10)
New in v0.2.0: ✨ Added
provision_share(end-to-end orchestration) andvalidate_share_readiness(pre-flight validation) tools!
This MCP server provides 7 powerful tools for SAP BDC operations:
Choose your preferred language/platform:
pip install sap-bdc-mcp-server
npm install @mariodefelize/sap-bdc-mcp-server
Note: The npm package requires Python 3.9+ to be installed, as it wraps the Python MCP server.
See NPM_README.md for full Node.js/TypeScript documentation.
# Clone the repository
git clone https://github.com/MarioDeFelipe/sap-bdc-mcp-server.git
cd sap-bdc-mcp-server
# Install Python package in development mode
pip install -e .
# Install npm dependencies (optional, for Node.js development)
npm install
Create a .env file in the project root:
# Databricks Configuration
DATABRICKS_RECIPIENT_NAME=your_recipient_name
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=your_databricks_token
# Optional
LOG_LEVEL=INFO
The server will automatically use LocalDatabricksClient which works without dbutils.
If running inside Databricks notebooks, only set:
DATABRICKS_RECIPIENT_NAME=your_recipient_name
LOG_LEVEL=INFO
The server will automatically detect the notebook environment and use dbutils.
The MCP server runs as a stdio-based service:
python -m sap_bdc_mcp.server
Or using the installed script:
sap-bdc-mcp
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"
}
}
}
}
For Node.js/TypeScript applications, use the npm package:
import { createSapBdcMcpClient } from '@mariodefelize/sap-bdc-mcp-server';
const client = await createSapBdcMcpClient({
env: {
DATABRICKS_HOST: process.env.DATABRICKS_HOST,
DATABRICKS_TOKEN: process.env.DATABRICKS_TOKEN,
DATABRICKS_RECIPIENT_NAME: process.env.DATABRICKS_RECIPIENT_NAME,
},
});
// Validate a share
const validation = await client.validateShareReadiness({
share_name: 'my_share',
});
console.log(validation);
await client.close();
See NPM_README.md for complete Node.js/TypeScript documentation and examples.
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"
}
}
}
}
Create or update a data share with ORD metadata.
Parameters:
share_name (required): Name of the shareord_metadata (optional): ORD metadata objecttables (optional): Array of table names to includeExample:
{
"share_name": "customer_data_share",
"ord_metadata": {
"title": "Customer Data",
"description": "Shared customer information"
},
"tables": ["customers", "orders"]
}
Create or update a share using CSN format.
Parameters:
share_name (required): Name of the sharecsn_schema (required): CSN schema definition objectExample:
{
"share_name": "product_share",
"csn_schema": {
"definitions": {
"Products": {
"kind": "entity",
"elements": {
"ID": {"type": "String"},
"name": {"type": "String"}
}
}
}
}
}
Publish a data product to make it available for consumption.
Parameters:
share_name (required): Name of the sharedata_product_name (required): Name of the data productExample:
{
"share_name": "customer_data_share",
"data_product_name": "CustomerAnalytics"
}
Delete a share and withdraw shared resources.
Parameters:
share_name (required): Name of the share to deleteExample:
{
"share_name": "old_share"
}
Generate a CSN template from an existing Databricks share.
Parameters:
share_name (required): Name of the Databricks shareExample:
{
"share_name": "existing_databricks_share"
}
One-step provisioning: Creates Databricks share, grants to recipient, and registers with SAP BDC in a single operation.
This tool orchestrates the complete workflow:
Parameters:
share_name (required): Name of the share to createtables (required): Array of table names (format: catalog.schema.table or schema.table)ord_metadata (required): ORD metadata objecttitle (required): Display title for the shareshortDescription: Brief descriptiondescription: Detailed descriptionversion: Version number (e.g., "1.0.0")releaseStatus: Status (e.g., "active", "beta")tags: Array of tagscomment (optional): Comment for the Databricks shareauto_grant (optional): Auto-grant to recipient (default: true)skip_if_exists (optional): Skip if share already exists (default: true)Example:
{
"share_name": "customer_analytics",
"tables": ["main.analytics.customers", "main.analytics.orders"],
"ord_metadata": {
"title": "Customer Analytics Data",
"shortDescription": "Customer and order data for analytics",
"description": "Comprehensive customer analytics dataset including customer profiles and order history",
"version": "1.0.0",
"releaseStatus": "active",
"tags": ["analytics", "customer", "orders"]
},
"comment": "Customer analytics share for data consumers",
"auto_grant": true
}
What it does:
Why use this instead of manual steps:
Validate before you register: Check if a Databricks share is ready for BDC Connect operations.
This tool performs comprehensive pre-flight checks:
Parameters:
share_name (required): Name of the share to validatecheck_bdc_registration (optional): Also check BDC registration status (default: false)Example:
{
"share_name": "customer_data_share"
}
Success Response:
✅ Share 'customer_data_share' is READY for BDC Connect registration!
All checks passed:
✅ PASS Share 'customer_data_share' exists in Databricks
✅ PASS Share has 3 object(s)
✅ PASS Share is granted to recipient 'bdc-connect-12345'
Next step: Register with BDC using create_or_update_share('customer_data_share', ...)
Failure Response:
❌ Share 'test_share' is NOT ready for BDC Connect
Errors found:
❌ Share is empty - no tables added
❌ Share not granted to BDC Connect recipient 'bdc-connect-12345'
Required actions:
1. Add tables: w.shares.update(name='test_share', ...)
2. Grant share: GRANT SELECT ON SHARE test_share TO RECIPIENT `bdc-connect-12345`
Use Cases:
create_or_update_shareWhy this matters:
The server uses:
pytest
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
dbutils ChallengeThe SAP BDC Connect SDK was originally designed to run inside Databricks notebooks, requiring access to dbutils (Databricks utilities). This made local development challenging.
We've created LocalDatabricksClient - a custom wrapper that extends the SAP BDC SDK to work without dbutils. This enables:
✅ Local development - Run on your machine without Databricks notebooks ✅ IDE integration - Use your favorite development tools ✅ Easier debugging - Standard Python debugging workflows ✅ CI/CD friendly - Works in automated pipelines ✅ Claude Desktop integration - Direct MCP server usage
The LocalDatabricksClient class:
dbutils requirement - Accepts workspace URL and API token directly.env file - No notebook context neededfrom sap_bdc_mcp.local_client import LocalDatabricksClient
# Initialize from environment variables
client = LocalDatabricksClient.from_env()
# Or with explicit credentials
client = LocalDatabricksClient(
workspace_url="https://your-workspace.cloud.databricks.com",
api_token="your_token",
recipient_name="your_recipient"
)
BDC Connect Mode (Brownfield) ✨
Databricks Connect Mode
See our comprehensive guides:
Key points to highlight:
dbutils, limiting usage to Databricks notebooksdbutils actually providedLocalDatabricksClient that injects credentials directlyTechnical highlights:
DatabricksClient__init__ to bypass dbutils requirement_get_secret() to read from env vars┌─────────────────────────┐
│ Claude Desktop │
│ (MCP Client) │
└───────────┬─────────────┘
│ MCP Protocol (stdio)
┌───────────▼─────────────┐
│ sap_bdc_mcp.server │
│ ┌───────────────────┐ │
│ │ BDCClientManager │ │
│ │ (Auto-detect) │ │
│ └────────┬──────────┘ │
│ ├─────────────┼─ Notebook? → DatabricksClient (dbutils)
│ │ │
│ └─────────────┼─ Local? → LocalDatabricksClient (.env)
└───────────┼─────────────┘
│
┌───────────▼─────────────┐
│ SAP BDC Connect SDK │
│ ┌──────────────────┐ │
│ │ BdcConnectClient │ │
│ └────────┬─────────┘ │
└──────────┼──────────────┘
│ HTTPS/OIDC
┌──────────▼──────────────┐
│ Databricks + SAP BDC │
└─────────────────────────┘
The server uses:
The server supports two integration modes:
1. Notebook Mode (Original)
dbutils for credentials2. Local Mode (New!) ✨
Authentication is handled through:
For Local Development:
.env file exists with DATABRICKS_HOST, DATABRICKS_TOKEN, and DATABRICKS_RECIPIENT_NAMEFor Notebook Environment:
dbutils availableDATABRICKS_RECIPIENT_NAME environment variableFor local development, ensure these are set in your .env file:
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=dapi...
DATABRICKS_RECIPIENT_NAME=your_recipient_name
The share must exist in Databricks before registering with SAP BDC:
See HOW_TO_CREATE_SHARE.md for detailed steps.
Grant the share to your recipient in Databricks:
GRANT SELECT ON SHARE your_share_name TO RECIPIENT `your_recipient_name`;
This MCP server is provided as-is. Please review the SAP BDC Connect SDK license terms when using this integration.
Contributions are welcome! Please see CONTRIBUTING.md for details on:
Выполни в терминале:
claude mcp add sap-business-data-cloud-mcp-server -- npx Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolProvides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai