A Model Context Protocol (MCP) server implementation for Microsoft Fabric Real-Time Intelligence (RTI). This server enables AI agents to interact with Fabric RTI services by providing tools through the MCP interface, allowing for seamless data querying and analysis capabilities.
Note
This project is in Public Preview and implementation may significantly change prior to General Availability.
The Fabric RTI MCP Server creates a seamless integration between AI agents and Fabric RTI services through:
- 🔄 Smart JSON communication that AI agents understand
- 🏗️ Natural language commands that get translated to Kql operations
- 💡 Intelligent parameter suggestions and auto-completion!
- ⚡ Consistent error handling that makes sense
- Eventhouse (Kusto): Execute KQL queries against Microsoft Fabric RTI Eventhouse and Azure Data Explorer(ADX).
- Activator
- Eventstreams
- Other RTI items
- "Get databases in Eventhouse'"
- "Sample 10 rows from table 'StormEvents' in Eventhouse"
- "What can you tell me about StormEvents data?"
- "Analyze the StormEvents to come up with trend analysis ocross past 10 years of data"
- "Analyze the commands in 'CommandExecution' table and categorize them as low/medium/high risks"
- List databases
- List tables
- Get schema for a table
- Sample rows from a table
- Execute query
- Ingest a csv
- Get shots
- Install either the stable or Insiders release of VS Code:
- Install the GitHub Copilot and GitHub Copilot Chat extensions
- Install
uv
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
or, check here for other install options
- Open VS Code in an empty folder
The Fabric RTI MCP Server is available on PyPI, so you can install it using pip. This is the easiest way to install the server.
1. Open the command palette (Ctrl+Shift+P) and run the command `MCP: Add Server`
2. Select install from Pip
3. When prompted, enter the package name `microsoft-fabric-rti-mcp`
4. Follow the prompts to install the package and add it to your settings.json or your mcp.json file
The process should end with the below settings in your settings.json
or your mcp.json
file.
{
"mcp": {
"server": {
"fabric-rti-mcp": {
"command": "uvx",
"args": [
"microsoft-fabric-rti-mcp"
],
"env": {
"KUSTO_SERVICE_URI": "https://help.kusto.windows.net/", // optionally provide cluster URI
"KUSTO_SERVICE_DEFAULT_DB": "Samples", // optionally provide database
"AZ_OPENAI_EMBEDDING_ENDPOINT": "https://your-openai-resource.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2024-10-21;impersonate" // optionally provide Azure OpenAI embedding endpoint (used for semantic search in the get shots tool)
}
}
}
}
}
- Make sure you have Python 3.10+ installed properly and added to your PATH.
- Clone the repository
- Install the dependencies (
pip install .
oruv tool install .
) - Add the settings below into your vscode
settings.json
or yourmcp.json
file. - Modify the path to match the repo location on your machine.
- Modify the cluster uri in the settings to match your cluster.
- Modify the cluster default database in the settings to match your database.
- Modify the embeddings endpoint in the settings to match yours. This step is optional and needed only in case you supply a shots table
{
"mcp": {
"servers": {
"kusto-mcp": {
"command": "uv",
"args": [
"--directory",
"C:/path/to/fabric-rti-mcp/",
"run",
"-m",
"fabric_rti_mcp.server"
],
"env": {
"KUSTO_SERVICE_URI": "https://help.kusto.windows.net/", // optionally provide cluster URI
"KUSTO_SERVICE_DEFAULT_DB": "Samples", // optionally provide database
"AZ_OPENAI_EMBEDDING_ENDPOINT": "https://your-openai-resource.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2024-10-21;impersonate" // optionally provide Azure OpenAI embedding endpoint (used for semantic search in the get shots tool)
}
}
}
}
}
Assuming you have python installed and the repo cloned:
pip install -e ".[dev]"
Follow the Manual Install instructions.
Use the Python: Attach
configuration in your launch.json
to attach to the running server.
Once VS Code picks up the server and starts it, navigate to it's output:
- Open command palette (Ctrl+Shift+P) and run the command
MCP: List Servers
- Navigate to
local-fabric-rti-mcp
and selectShow Output
- Pick up the process id (PID) of the server from the output
- Run the
Python: Attach
configuration in yourlaunch.json
file, and paste the PID of the server in the prompt - The debugger will attach to the server process, and you can start debugging
- Open GitHub Copilot in VS Code and switch to Agent mode
- You should see the Fabric RTI MCP Server in the list of tools
- Try a prompt that tells the agent to use the Eventhouse tools, such as "List my Kusto tables"
- The agent should be able to use the Fabric RTI MCP Server tools to complete your query
The MCP server can be configured using the following environment variables:
None - the server will work with default settings for demo purposes.
Variable | Description | Example |
---|---|---|
KUSTO_SERVICE_URI |
The URI of your Kusto cluster | https://mycluster.westus.kusto.windows.net |
KUSTO_SERVICE_DEFAULT_DB |
Default database name for queries | MyDatabase |
AZ_OPENAI_EMBEDDING_ENDPOINT |
Custom Azure OpenAI embedding endpoint for semantic search | https://your-resource.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2024-10-21;impersonate |
The AZ_OPENAI_EMBEDDING_ENDPOINT
is used by the semantic search functionality (e.g., kusto_get_shots
function) to find similar query examples.
Format Requirements:
https://{your-openai-resource}.openai.azure.com/openai/deployments/{deployment-name}/embeddings?api-version={api-version};impersonate
Components:
{your-openai-resource}
: Your Azure OpenAI resource name{deployment-name}
: Your text embedding deployment name (e.g.,text-embedding-ada-002
){api-version}
: API version (e.g.,2024-10-21
,2023-05-15
);impersonate
: Authentication method (you might use managed identity)
Authentication Requirements:
- Your Azure identity must have access to the OpenAI resource
- In case using managed identity, the OpenAI resource must should be configured to accept managed identity authentication
- The deployment must exist and be accessible
The get shots
tool retrieves shots that are most similar to your prompt out of the shots table. This function requires configuration of:
- Shots table that should have "EmbeddingText" (string) column containing the natural language prompt, "AugmentedText" (string) column containing the respective KQL, and "EmbeddingVector" (dynamic) column containing the embedding vector of the EmbeddingText.
- Azure OpenAI embedding endpoint to create embedding vectors for your prompt. Note that this endpoint must embed using the same model that was used for creating the "EmbeddingVector" column in the Shots table.
The MCP Server seamlessly integrates with your host operating system's authentication mechanisms, making it super easy to get started! We use Azure Identity under the hood via DefaultAzureCredential
, which tries these credentials in order:
- Environment Variables (
EnvironmentCredential
) - Perfect for CI/CD pipelines - Visual Studio (
VisualStudioCredential
) - Uses your Visual Studio credentials - Azure CLI (
AzureCliCredential
) - Uses your existing Azure CLI login - Azure PowerShell (
AzurePowerShellCredential
) - Uses your Az PowerShell login - Azure Developer CLI (
AzureDeveloperCliCredential
) - Uses your azd login - Interactive Browser (
InteractiveBrowserCredential
) - Falls back to browser-based login if needed
If you're already logged in through any of these methods, the Fabric RTI MCP Server will automatically use those credentials.
Your credentials are always handled securely through the official Azure Identity SDK - we never store or manage tokens directly.
MCP as a phenomenon is very novel and cutting-edge. As with all new technology standards, consider doing a security review to ensure any systems that integrate with MCP servers follow all regulations and standards your system is expected to adhere to. This includes not only the Azure MCP Server, but any MCP client/agent that you choose to implement down to the model provider.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.