SSAS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SSAS MCP Server list measures in the Sales cube"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SSAS MCP Server
A read-only Model Context Protocol server for querying SQL Server Analysis Services — both multidimensional cubes (MDX) and tabular models (DAX) — with Windows Integrated Security (Kerberos/NTLM, no passwords).
Companion to mssql_mcp_server, but for the OLAP side of the house.
Features
list_metadata— discover a cube/model's measures, dimensions and hierarchies (viaMDSCHEMA_*DMVs, which work for both model types), so the agent never guesses bracketed unique names. The overview stays compact — measures, dimension names and multi-level user hierarchies; passdimension="[Dim Event]"to drill into one dimension's full attribute hierarchies and levels (a whole cube's attribute list can run to tens of thousands of tokens).execute_query— run an MDX (SELECT/WITH) or DAX (EVALUATE/DEFINE) query and get a flattened JSON table back.execute_dmv— guarded passthrough forSELECT ... FROM $SYSTEM.*schema rowsets (MDSCHEMA_*,TMSCHEMA_*,DISCOVER_*) for deeper introspection.Read-only by construction — statements that don't start with
SELECT/WITH/EVALUATE/DEFINEare rejected, XMLA payloads are rejected, and there is no DDL/process surface at all.Row cap + query timeout on every call so a runaway crossjoin can't flood the context window.
Related MCP server: SQL Server Analysis Services MCP Server by CData
Requirements
Windows-only by construction (the server drives ADOMD.NET via pythonnet):
Windows, domain-joined, with network access to the SSAS instance (default instance = TCP 2383).
The Windows account running the server has Read access to the SSAS database (role membership). Integrated auth means "whoever runs the process".
ADOMD.NET client libraries — ships with SSMS, or install the Analysis Services client libraries redistributable. Typically lands in
C:\Program Files\Microsoft.NET\ADOMD.NET\160.Python 3.11+
Installation
git clone https://github.com/dbdave/mssas_mcp_server
cd mssas_mcp_server
pip install -e .Smoke-test connectivity before wiring up MCP (if this fails it's network/auth/ADOMD install, not the server):
python test_connection.py <server> <catalog>Configuration
Variable | Required | Default | Notes |
| yes | — | Host, |
| yes | — | SSAS database name |
| no | — | Cube/model |
| no |
| Hard cap on returned rows |
| no |
| Per-query timeout, seconds |
| no | auto-detected | Folder containing |
Authentication is always Windows Integrated Security (Integrated Security=SSPI) —
no credentials in config.
MCP registration (Claude Code / Claude Desktop)
{
"mcpServers": {
"ssas-cube": {
"command": "python",
"args": ["-m", "ssas_mcp.server"],
"env": {
"SSAS_SERVER": "my-ssas-host",
"SSAS_CATALOG": "My_Cube_Db",
"SSAS_DEFAULT_CUBE": "Sales"
}
}
}
}One registered server targets one SSAS database. To use both a multidimensional and a
tabular instance, register the server twice with different SSAS_SERVER/SSAS_CATALOG
env blocks — the query language is chosen per call (execute_query accepts MDX or DAX,
and the engine itself only accepts the language matching the model type).
Example usage
Multidimensional (MDX):
SELECT NON EMPTY { [Measures].[Tickets Issued] } ON COLUMNS,
NON EMPTY { [Sales Item Fact Ordered Date].[Calendar].[Year Name].MEMBERS } ON ROWS
FROM [Sales]Tabular (DAX):
EVALUATE SUMMARIZECOLUMNS('Date'[Year], "Total Sales", [Total Sales])DMV introspection:
SELECT [MEASURE_NAME], [MEASUREGROUP_NAME] FROM $SYSTEM.MDSCHEMA_MEASURES WHERE [CUBE_NAME] = 'Sales'
SELECT * FROM $SYSTEM.TMSCHEMA_MEASURES -- tabular modelsResult format
Tools return JSON:
{
"columns": ["[Sales Item Fact Ordered Date].[Calendar].[Year Name].[MEMBER_CAPTION]", "[Measures].[Tickets Issued]"],
"rows": [["2025", 123456], ["2026", 98765]],
"row_count": 2,
"truncated": false
}Cells can be null and columns can be mixed-type — MDX cellsets are flattened
defensively (nulls preserved, Decimal → float, DateTime → ISO string).
Tests
pip install pytest
pytest tests/License
MIT
Available Tools
3 toolsexecute_dmvA
Execute a Dynamic Management View query for deeper metadata introspection.
Only SELECT ... FROM $SYSTEM.<rowset> is accepted. Useful rowsets:
MDSCHEMA_* (cubes, measures, dimensions, hierarchies, levels, members) for
multidimensional; TMSCHEMA_* (tables, columns, measures, relationships)
and DISCOVER_CALC_DEPENDENCY for tabular models; DISCOVER_* for server
state. Note DMV SQL is limited: no JOIN, no GROUP BY, WHERE supports only
simple = comparisons combined with AND/OR.
Args: query: The DMV SELECT query. max_rows: Optional per-call row cap (0 = use the server default).
Inputs: query (required), max_rows. Returns: result
execute_queryA
Execute a read-only MDX or DAX query against the SSAS database.
Use MDX (SELECT ... FROM [Cube]) for multidimensional cubes and DAX (EVALUATE ...) for tabular models. Results are returned as a JSON table {columns, rows, row_count, truncated}. Rows are capped (default 10000, or SSAS_ROW_LIMIT) and 'truncated' is true when the cap was hit. Only SELECT/WITH (MDX) and EVALUATE/DEFINE (DAX) statements are accepted - anything else is rejected.
Args: query: The MDX or DAX query text. max_rows: Optional per-call row cap (0 = use the server default).
Inputs: query (required), max_rows. Returns: result
list_metadataA
List the queryable metadata of an SSAS cube or tabular model.
Returns the exact bracketed unique names to use in MDX/DAX - call this before writing queries so names aren't guessed. Without a dimension, the overview lists measures (with measure group and display folder), dimension names, and multi-level user hierarchies. Pass a dimension to drill into that dimension's full set of attribute hierarchies and levels.
Args: cube_name: Cube (multidimensional) or model (tabular, usually 'Model') to describe. If omitted, uses the SSAS_DEFAULT_CUBE environment variable; if that is unset too, returns the list of available cubes/models so one can be chosen. dimension: Optional dimension unique name (e.g. '[Dim Event]') to list every hierarchy and level in that dimension.
Inputs: cube_name, dimension. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: execute_dmv for DMV system queries, execute_query for MDX/DAX against the cube/model, and list_metadata for exploring metadata structure. No functional overlap.
All tools follow a consistent verb_noun snake_case pattern: execute_dmv, execute_query, list_metadata. The naming is predictable and unambiguous.
Three tools cover the essential read-only query and metadata exploration workflow for SSAS, with no extraneous or missing operations. The count is well-scoped for the domain.
The tool set provides complete coverage for the stated purpose: listing metadata to discover names, executing queries via MDX/DAX or DMV, and handling cube/model selection. No obvious gaps.
Maintenance
Related MCP Connectors
MCP server for the Seline Analytics API
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP Server for interacting with Cube semantic layers that provides tools for querying and describing data from Cube deployments.15GPL 3.0
- AlicenseNot gradedqualityDmaintenanceThis read-only MCP Server allows you to connect to SQL Server Analysis Services data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out our MCP Server for SQL Server Analysis Services (https://www.cdata.com/drivers/ssas/download/mcp).1MIT
- AlicenseNot gradedqualityFmaintenanceRead-only MCP server for SQL databases (SQL Server, Postgres, SQLite) with multi-server support and three-layer safety using AST validation and linting.MIT
- AlicenseAqualityDmaintenanceMCP server for connecting to SQL Server in readonly mode. Allows any MCP client to explore the schema and run SELECT queries against a SQL Server database.6MIT