SSAS MCP Server
A read-only MCP server for querying SQL Server Analysis Services (multidimensional cubes via MDX and tabular models via DAX) using Windows Integrated Security.
README
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.
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 |
|---|---|---|---|
SSAS_SERVER |
yes | — | Host, host\instance, or an http(s)://.../msmdpump.dll URL |
SSAS_CATALOG |
yes | — | SSAS database name |
SSAS_DEFAULT_CUBE |
no | — | Cube/model list_metadata uses when none is given |
SSAS_ROW_LIMIT |
no | 10000 |
Hard cap on returned rows |
SSAS_QUERY_TIMEOUT |
no | 60 |
Per-query timeout, seconds |
SSAS_ADOMD_DLL_DIR |
no | auto-detected | Folder containing Microsoft.AnalysisServices.AdomdClient.dll |
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 models
Result 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。