MCP server for querying SQL Server Analysis Services (SSAS) via DAX and MDX
Project description
SSAS MCP Server
A Model Context Protocol (MCP) server that connects AI agents to SQL Server Analysis Services (SSAS). It lets tools like GitHub Copilot, Claude (via Codex or Claude Code), and other MCP clients run DAX and MDX queries, explore models, and list measures, all through natural language.
Windows only
SSAS uses the ADOMD.NET client library, which requires .NET Framework on Windows.
Features
| Tool | Description |
|---|---|
execute_query |
Run any DAX (EVALUATE ...) or MDX (SELECT ...) query |
list_catalogs |
List all databases on the SSAS instance |
list_tables |
List tables, dimensions, and measure groups |
list_columns |
List columns for a specific table |
list_measures |
List all visible measures with their DAX expressions |
describe_model |
High-level summary: tables, measures, metadata |
Prerequisites
-
Python 3.10+
-
ADOMD.NET client library
The DLLMicrosoft.AnalysisServices.AdomdClient.dllmust be present on the machine. It ships with any of these:- SQL Server Management Studio (SSMS)
- Power BI Desktop
- The standalone AMO/ADOMD client libraries
The server auto-detects common install locations. If your DLL is elsewhere, set the
ADOMD_DLL_PATHenvironment variable to the folder containing it.
Installation
pip install ssas-mcp-server
After installation, the server can be started with:
ssas-mcp-server
Or install from source:
git clone https://github.com/NexusAI-Solutions/ssas-mcp-server.git
cd ssas-mcp-server
pip install .
Configuration
The server is configured through environment variables:
| Variable | Required | Description |
|---|---|---|
SSAS_SERVER |
Yes | SSAS instance name (e.g. SERVER\INSTANCE) |
SSAS_DATABASE |
Yes | Database / catalog name |
SSAS_PROVIDER |
No | OLAP provider (default: MSOLAP) |
SSAS_CONNECTION_STRING |
No | Full ADOMD connection string (overrides server/database/provider) |
ADOMD_DLL_PATH |
No | Explicit path to the folder containing the ADOMD.NET DLL |
Usage
Run directly
set SSAS_SERVER=SERVER\INSTANCE
set SSAS_DATABASE=My Cube
ssas-mcp-server
The server starts in stdio mode and waits for an MCP client to connect.
You can also run it as a Python module:
python -m ssas_mcp_server
VS Code / Codex
Add this to your .vscode/mcp.json:
{
"servers": {
"ssas": {
"command": "ssas-mcp-server",
"env": {
"SSAS_SERVER": "SERVER\\INSTANCE",
"SSAS_DATABASE": "My Cube"
}
}
}
}
Claude Code
claude mcp add ssas -- ssas-mcp-server
Then set the environment variables in your shell before starting Claude Code, or pass them inline.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"ssas": {
"command": "ssas-mcp-server",
"env": {
"SSAS_SERVER": "SERVER\\INSTANCE",
"SSAS_DATABASE": "My Cube"
}
}
}
}
Example queries
Once connected, you can ask your AI assistant things like:
- "List all tables in the SSAS model"
- "Show me the measures and their DAX expressions"
- "Run this DAX query:
EVALUATE TOPN(10, 'Sales', [Revenue], DESC)" - "Describe the data model"
- "What columns does the Customers table have?"
Troubleshooting
Could not load file or assembly 'Microsoft.AnalysisServices.AdomdClient'
The ADOMD.NET DLL was not found. Solutions:
- Install SSMS, Power BI Desktop, or the standalone AMO client libraries.
- Set
ADOMD_DLL_PATHto the folder containingMicrosoft.AnalysisServices.AdomdClient.dll.
To find the DLL on your system:
where /r "C:\Program Files" Microsoft.AnalysisServices.AdomdClient.dll
Server is not found or not accessible
- Verify the server name matches exactly what works in SSMS or Power BI.
- For named instances, use the
SERVER\INSTANCEformat. - Make sure the SQL Server Browser service is running if you are connecting by instance name.
License
MIT
Publishing to PyPI
Install the packaging tools:
python -m pip install --upgrade build twine
Build and validate the distribution files:
python -m build
python -m twine check dist/*
Upload to TestPyPI first:
python -m twine upload --repository testpypi dist/*
If the TestPyPI package installs and runs correctly, upload to PyPI:
python -m twine upload dist/*
Automatic publishing from GitHub
This repository includes a GitHub Actions workflow that builds and publishes the package to PyPI when a GitHub Release is published.
To enable it, create a PyPI Trusted Publisher for this project:
- PyPI project name:
ssas-mcp-server - Owner:
NexusAI-Solutions - Repository name:
ssas-mcp-server - Workflow name:
publish.yml - Environment name:
pypi
Then publish a GitHub Release after bumping the version in pyproject.toml.
PyPI does not allow replacing an existing version, so every release must use a
new version number.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssas_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: ssas_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f72167b2dc4d954608c9a0a2109f6c98292050e7c6d0be4407536aaf5e95a9
|
|
| MD5 |
4f118aa63db38491731edd6603562540
|
|
| BLAKE2b-256 |
66e52d3d1b20d1a71158623f69ed552a7b6a22c0b2e3c8a2b7b4ac7b8cc54109
|
Provenance
The following attestation bundles were made for ssas_mcp_server-0.1.0.tar.gz:
Publisher:
publish.yml on NexusAI-Solutions/ssas-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssas_mcp_server-0.1.0.tar.gz -
Subject digest:
70f72167b2dc4d954608c9a0a2109f6c98292050e7c6d0be4407536aaf5e95a9 - Sigstore transparency entry: 2167473182
- Sigstore integration time:
-
Permalink:
NexusAI-Solutions/ssas-mcp-server@9542d69bbe5b3295e429a8a27008df47181712ec -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NexusAI-Solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9542d69bbe5b3295e429a8a27008df47181712ec -
Trigger Event:
release
-
Statement type:
File details
Details for the file ssas_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ssas_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0cead6caf59b6d90e9c2f44220085e308b78149fc56f8dec1e1d11918036074
|
|
| MD5 |
80d8821f58525c2b7785b6fde908fc9c
|
|
| BLAKE2b-256 |
34d0e5c44628c76ff64ebc0ac202db264cf5df8eb88a53fdcf042e18aeee1005
|
Provenance
The following attestation bundles were made for ssas_mcp_server-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on NexusAI-Solutions/ssas-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssas_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
c0cead6caf59b6d90e9c2f44220085e308b78149fc56f8dec1e1d11918036074 - Sigstore transparency entry: 2167473188
- Sigstore integration time:
-
Permalink:
NexusAI-Solutions/ssas-mcp-server@9542d69bbe5b3295e429a8a27008df47181712ec -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NexusAI-Solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9542d69bbe5b3295e429a8a27008df47181712ec -
Trigger Event:
release
-
Statement type: