Set Up the Metric Insights MCP Server for Fabric

This article describes a step of Connecting to Fabric Data Agent MCP Server. Set up the MCP Server locally on the same machine where the application is running or remotely on a separate server or cloud platform.

Prerequisites:

  • 256MB RAM and 1 vCPU;
  • Python 3.12 or higher;
  • Required Python packages (see requirements.txt in git repository).

In this article:

  1. Install MCP Server
  2. Docker Setup
  3. Troubleshooting

1. Install MCP Server

Clone the repository.

git clone [email protected]:metricinsights/FabricDataAgentMCP.git
cd fabric_data_agent_mcp

Create a virtual environment.

python -m venv venv
source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Create .env file. This step is optional.

MCP_HOST=0.0.0.0
MCP_PORT=8010

0.0.0.0 (in MCP_HOST field) and 8010 (in MCP_PORT field) are default values and can be changed to more suitable for an individual setup.

2. Docker Setup

Build the Docker image.

docker build -t fda_mcp .

Run with Docker Compose.

docker-compose up -d

3. Troubleshooting

Server won't start:

  • Check if port 8010 is already in use;
  • Verify Python version (3.12+ required);
  • Ensure all dependencies are installed.

Authentication errors:

  • Verify your Token is valid and hasn't expired;
  • Check that the Token has appropriate Fabric workspace access;
  • If using Service Principal: verify Azure credentials are correct and Service Principal has Fabric access.

Timeout errors:

Default timeout is 120 seconds, large queries may take longer.

Check network connectivity to Fabric API.

Docker issues:

  • Ensure Docker daemon is running;
  • Check port mapping in docker-compose.yml;
  • View logs: docker-compose logs -f.