Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
By using the local Fabric MCP server, AI agents can browse workspaces, read files, inspect table schemas, and manage directories in OneLake through natural-language conversation. The server runs on your machine and connects your agent to OneLake through the Model Context Protocol (MCP).
Tip
For an easier setup, start with the hosted OneLake MCP server when it's available for your item and supports the tools you need. You connect over HTTPS without installing a local MCP server. The hosted and local servers expose different tools; this article describes the local server.
Fabric items use open formats to store their data in OneLake. These items include lakehouses, mirrored databases, and KQL databases and semantic models with OneLake availability enabled. The local server's OneLake tools let AI agents explore these items through a single set of commands.
Prerequisites
- A Fabric workspace with at least one item that stores data in OneLake.
- Azure CLI installed and signed in (
az login). - Visual Studio Code with an MCP-compatible AI extension (such as GitHub Copilot).
Install the local Fabric MCP server
To install the local server in Visual Studio Code, use the Fabric MCP server VS Code extension. Install the extension and the OneLake tools are available automatically.
For manual configuration or use outside VS Code, see the setup instructions in the Fabric MCP Server README.
Authentication and permissions
The local server's OneLake tools use your existing Azure identity and Fabric permissions. Your AI agent can only access workspaces and items you already have permission to view. You don't need any additional roles or permissions beyond your normal workspace access.
Sign in with the Azure CLI before using the tools:
az login
Local OneLake MCP tool capabilities
The tools cover three areas of OneLake:
| Category | What you can do | OneLake APIs used |
|---|---|---|
| Workspace and item discovery | List workspaces, list items within a workspace, create new items (lakehouses, notebooks, SQL databases, and more). | OneLake data plane API and Fabric REST API |
| File and directory operations | Browse, read, write, upload, download, and delete files and directories. Both DFS and Blob Storage endpoints are available. | OneLake file system APIs |
| Table operations | Get table API configuration, list namespaces (schemas), list tables, and retrieve full table definitions with column names, types, and metadata. | OneLake table APIs |
The tools include 19 commands. Most commands accept friendly names as well as GUIDs — for example, you can reference an item as SalesLakehouse.lakehouse instead of a GUID.
For the full command reference with parameters and example output, see the OneLake tools README on GitHub.
Example: explore a lakehouse
After you install the local Fabric MCP server, ask your AI agent to explore your data. For example:
"List the tables in my Sales lakehouse and tell me about the schema of each one."
The agent uses the OneLake MCP tools to locate the workspace, find the lakehouse, discover the table namespaces, and retrieve the full table definitions — without writing any code or opening the Fabric portal.
Other tasks you can ask your AI agent to complete:
- Inventory a workspace — "Scan my workspace and tell me what items are there, how big they are, and what tables they contain."
- Read and write files — "Upload this CSV to the Files folder in my lakehouse" or "Read the config file in the Monitoring folder."
- Document a mirrored database — "Describe the tables and storage structure of my mirrored database."
- Create items — "Create a new lakehouse called StagingData in my Analytics workspace."
Limitations
- The
item createcommand currently requires a GUID-based workspace ID. Your AI agent handles this automatically by callingonelake workspace listto resolve the workspace name to an ID. - The OneLake MCP tools don't include shortcut management commands. To list or create shortcuts, use the OneLake shortcuts REST API.