BC MCP Server
# BC MCP Server
[](https://www.npmjs.com/package/@ciellos/bc-mcp-server)
[](https://opensource.org/licenses/MIT)
MCP (Model Context Protocol) Server for Microsoft Dynamics 365 Business Central. Enables AI agents like **Windsurf**, **Claude**, and **Copilot Studio** to interact with Business Central ERP modules.
## Features
- π **Full CRUD Operations** - Query, Create, Update, Delete BC records
- π **All BC Modules** - Finance, Sales, Purchasing, Inventory
- π **OAuth2 Authentication** - Secure Azure AD authentication
- π οΈ **Standardized MCP Protocol** - Works with any MCP-compatible client
## Installation
### Via NPX (Recommended)
```bash
npx @ciellos/bc-mcp-server
```
### Via NPM
```bash
npm install -g @ciellos/bc-mcp-server
bc-mcp-server
```
### From Source
```bash
git clone https://github.com/ciellos-dev/bc-mcp-server.git
cd bc-mcp-server
npm install
npm start
```
## Configuration
### Environment Variables
Create a `.env` file or set environment variables:
```env
BC_TENANT_ID=your-azure-tenant-id
BC_CLIENT_ID=your-app-client-id
BC_CLIENT_SECRET=your-app-client-secret
BC_ENVIRONMENT=Production
BC_COMPANY=CRONUS USA, Inc.
```
### Windsurf Configuration
Add to your Windsurf MCP settings (`%APPDATA%\Windsurf\mcp_settings.json`):
```json
{
"mcpServers": {
"business-central": {
"command": "npx",
"args": ["-y", "@ciellos/bc-mcp-server"],
"env": {
"BC_TENANT_ID": "your-tenant-id",
"BC_CLIENT_ID": "your-client-id",
"BC_CLIENT_SECRET": "your-client-secret",
"BC_ENVIRONMENT": "Production",
"BC_COMPANY": "CRONUS USA, Inc."
}
}
}
}
```
### Claude Desktop Configuration
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"business-central": {
"command": "npx",
"args": ["-y", "@ciellos/bc-mcp-server"],
"env": {
"BC_TENANT_ID": "your-tenant-id",
"BC_CLIENT_ID": "your-client-id",
"BC_CLIENT_SECRET": "your-client-secret",
"BC_ENVIRONMENT": "Production",
"BC_COMPANY": "CRONUS USA, Inc."
}
}
}
}
```
## Azure AD App Registration
1. Go to **Azure Portal** β **Azure Active Directory** β **App registrations**
2. Click **New registration**
3. Name: `BC MCP Server`
4. Click **Register**
5. Go to **API permissions** β **Add permission** β **Dynamics 365 Business Central**
6. Add `Financials.ReadWrite.All` permission
7. Click **Grant admin consent**
8. Go to **Certificates & secrets** β **New client secret**
9. Copy the secret value
## Available Tools
| Tool | Description |
|------|-------------|
| `bc_query` | Query BC entities with OData filters |
| `bc_get_record` | Get a single record by ID |
| `bc_create_record` | Create a new record |
| `bc_update_record` | Update an existing record |
| `bc_delete_record` | Delete a record |
| `bc_list_companies` | List all companies |
| `bc_get_metadata` | Get entity metadata/schema |
## Supported Entities
- `customers` - Customer records
- `vendors` - Vendor/Supplier records
- `items` - Inventory items
- `salesOrders` - Sales orders
- `salesInvoices` - Sales invoices
- `purchaseOrders` - Purchase orders
- `purchaseInvoices` - Purchase invoices
- `generalLedgerEntries` - GL entries
- `bankAccounts` - Bank accounts
- `employees` - Employee records
## Usage Examples
### In Windsurf/Claude
```
"List all customers from Business Central"
"Create a new vendor named Contoso Ltd"
"Show sales orders for customer 10000"
"Update item 1000 with new price 99.99"
```
## Architecture
```
βββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
β Windsurf/ ββββββΆβ BC MCP ββββββΆβ Business Central β
β Claude/Copilot βββββββ Server βββββββ API β
βββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
β β β
β MCP Protocol β REST/OData β
β (JSON-RPC 2.0) β (OAuth2) β
```
## License
MIT Β© Ciellos
## Contributing
Contributions are welcome! Please open an issue or submit a PR.
TDQS
Scored across 10 tools
The BC and ATDD tool clusters are mostly clearly separated by resource and action. The main overlap is atdd_validate_test, which returns all rule violations, versus the specific atdd_validate_naming/comments/scenarios tools; descriptions make the distinction workable but not perfectly crisp.
Names consistently use snake_case with clear bc_ and atdd_ domain prefixes, and most follow a verb_noun pattern. The only minor deviation is bc_query, which is verb-only and less parallel than bc_list_companies or bc_create_record.
Ten tools is well within a reasonable range for this server and each tool appears to serve a distinct workflow. The BC and ATDD subdomains each have a compact, purposeful set of operations.
The ATDD side is fairly complete, covering rules, parsing, validation, and test generation. The BC side has query, create, and list-companies but lacks obvious lifecycle operations such as update and delete, which will limit agents on common Business Central workflows.