This MCP server provides a natural language interface to a Microsoft Fabric GraphQL endpoint.
- Test Connection: specific tool to verify connectivity and auth.
- Execute Query: Runs GraphQL queries against the configured Fabric endpoint.
- Reporting & Visualization:
- CSV Reports:
generate_csv_report - Excel Reports:
generate_excel_report(Rich formatting) - Charts:
visualize_data(Bar, Line, Scatter, Pie)
- CSV Reports:
The easiest way to get started is to install the package and its dependencies using the provided installer.
This will install the server in editable mode and generate configuration templates.
python install.pypip install -r requirements.txt
pip install -e .After installation, you must configure the server with your Microsoft Fabric GraphQL endpoint details.
The installer generates template snippets:
COPILOT_CONFIG_SNIPPET.jsonfor GitHub Copilot.GEMINI_CONFIG_SNIPPET.jsonfor Gemini.
Required Environment Variables:
FABRIC_GRAPHQL_ENDPOINT: Your Microsoft Fabric GraphQL API endpoint URL.FABRIC_TOKEN(Optional): A direct access token (Bearer token).- If provided, this is used for the
Authorizationheader. - If NOT provided, the server attempts to use
DefaultAzureCredential.
- If provided, this is used for the
Copy the configured snippet into your client's settings.
Add the snippet to your ~/.copilot/mcp-config.json (User-level) or .copilot/mcp-config.json (Repository-level).
{
"mcpServers": {
"fabric-graphql": {
"command": "python",
"args": ["-m", "fabric_mcp.server"],
"env": {
"FABRIC_GRAPHQL_ENDPOINT": "https://<your-fabric-endpoint>/graphql",
"FABRIC_TOKEN": "<your-access-token>"
}
}
}
}Add the following to your gemini-extension.json or global configuration.
{
"id": "fabric-graphql",
"command": "python",
"args": ["-m", "fabric_mcp.server"],
"env": {
"FABRIC_GRAPHQL_ENDPOINT": "https://<your-fabric-endpoint>/graphql",
"FABRIC_TOKEN": "<your-access-token>"
}
}test_connection: Pings the endpoint to verify setup.execute_fabric_query(query): Runs a GraphQL query.generate_csv_report(data_json, filename): Saves the last result to a CSV.
Fabric defaults to disabling GraphQL introspection for security. To fix this:
- Option A (Recommended): Enable it in Fabric.
- Go to your Fabric Workspace.
- Open the API for GraphQL item.
- Look for "Security" or "Settings".
- Check "Allow introspection".
- Option B (Manual):
- Copy the Schema (SDL) from the Fabric portal (there is usually a "Copy Schema" button).
- Paste it into a file named
schema.graphqlinside adocsfolder in this project:<PROJECT_ROOT>/docs/schema.graphql. - The tool will read this file instead of asking the server.