Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Consume ontology (preview) as an MCP server

The Model Context Protocol (MCP) server allows AI systems to discover and interact with external tools in a structured way, extending beyond their own data and reasoning. Ontology can function as an MCP server, exposing an API so that external AI systems can interact with it through the MCP protocol. This helps integrate ontology into AI workflows.

Important

This feature is in preview.

Prerequisites

Before using ontology as an MCP server, make sure you have the following prerequisites:

How it works

To create the MCP server endpoint, you need the URL of your ontology (preview) item.

To find the URL, follow these steps:

  1. Open your ontology item in Fabric.

  2. View the URL in the browser, in the format https://app.fabric.microsoft.com/groups/<workspace-ID>/ontologies/<ontology-item-ID>.

    Copy the values of <workspace-ID> and <ontology-item-ID> from the URL.

    👁 Screenshot of the values in the URL.

  3. Form the MCP server URL by entering the copied values into this string: https://api.fabric.microsoft.com/v1/mcp/dataPlane/workspaces/<workspace-ID>/items/<ontology-item-ID>/ontologyEndpoint.

You use this MCP server URL in the next section.

Setting up the MCP server in VS Code

  1. Open VS Code and select a folder to work in.

  2. Inside this folder, create a folder named .vscode.

  3. Inside the inner folder, create a file called mcp.json.

  4. VS Code automatically displays a blue Add Server button at the bottom right of the window.

    👁 Screenshot showing the MCP server json file.

  5. Select Add Server and select HTTP. You're prompted to enter a URL. Use the MCP server URL that you copied in the previous section.

    👁 Screenshot showing the selection of HTTP.

    👁 Screenshot showing to enter the URL for MCP server.

  6. Press Enter and provide a name for your MCP server. Use this name to display the MCP server in your VS Code environment.

  7. VS Code attempts to authenticate with the server. Select Allow and sign in with your credentials.

The server is created.

👁 Screenshot showing the MCP file of the ontology.

Enabling Agent Mode

After adding the MCP server, enable Agent Mode in VS Code. Agent Mode lets VS Code act as an orchestrator interface, connecting your editor with MCP servers to interact with external tools like ontology. To enable it:

  1. In VS Code, open "Chat" (Ctrl + Shift + I).

  2. Start the MCP server.

    👁 Screenshot of starting the server in agent mode.

  3. Confirm that the server is running. Then, enter any prompts to activate the mode.

    👁 Screenshot showing the running server and place for prompts in agent mode.

  4. When Agent Mode is active, select an orchestrator to handle your queries. Available orchestrators in public preview include GPT-5, GPT-4.1, Claude Sonnet 4.5, Gemini 2.5 pro, and many more. The orchestrator manages the flow of information between your queries in VS Code and the ontology MCP server.


Feedback

Was this page helpful?

Additional resources