Getting Started with VS Code
Connect your OpenMetadata instance to Visual Studio Code for AI-powered metadata exploration using GitHub Copilot’s MCP support.Prerequisites
Before you begin, ensure you have:- OpenMetadata v1.8.0+ running
- MCP Application installed in OpenMetadata
- Navigate to
<YOUR-OpenMetadata-SERVER>/marketplace/apps/McpApplication - Install McpApplication if not already installed
- Navigate to
- Visual Studio Code with MCP support enabled
Connect with OAuth 2.0 (Recommended)
OAuth lets you authenticate using your existing OpenMetadata login, with no tokens to manage.Step 1: Open the Command Palette
Open VS Code and launch the Command Palette:- macOS:
Cmd + Shift + P - Windows/Linux:
Ctrl + Shift + P
Step 2: Select HTTP Type
When prompted, choose HTTP as the server type.Step 3: Enter Your MCP Server URL
Enter your OpenMetadata MCP Server URL:https://your-openmetadata-instance.com/mcp
Step 4: Name Your Server
Give your MCP server a name (e.g.,OpenMetadata).
VS Code will automatically generate the configuration in your mcp.json file:
Step 5: Authenticate
VS Code will open a browser window prompting you to sign in with your OpenMetadata credentials. Follow the on-screen instructions based on your configured authentication method:- SSO (Google, Azure, Okta, etc.): You will be redirected to your SSO provider’s login page
- Basic Auth: Enter your OpenMetadata username and password
The
mcp.json configuration file is located at:- macOS:
~/Library/Application Support/Code/User/mcp.json - Linux:
~/.config/Code/User/mcp.json - Windows:
%APPDATA%\Code\User\mcp.json
Connect with Personal Access Token (PAT)
If you prefer token-based authentication or OAuth is not available in your environment, you can use a Personal Access Token.Step 1: Generate a PAT
Follow the Personal Access Token guide to generate your token.Step 2: Configure MCP Server
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P), search for MCP: Add Server…, select HTTP, and enter your server URL.
Then edit the generated mcp.json to include your authorization header:
<YOUR-OpenMetadata-SERVER> with your OpenMetadata instance URL and <YOUR-OpenMetadata-PAT> with your Personal Access Token.
Try It Out
Once connected, test your setup by asking questions in VS Code’s Copilot chat:“What tables do you have access to in OpenMetadata?”
“Imagine you’re a data analyst tasked with building a customer retention dashboard. Find relevant customer and transaction tables in the metadata catalog.”You should see VS Code using the OpenMetadata MCP tools to search and retrieve information from your metadata catalog.
Troubleshooting
If you encounter connection issues:- Verify OpenMetadata is running:
curl <YOUR-OpenMetadata-SERVER>/api/health - Check MCP endpoint:
curl <YOUR-OpenMetadata-SERVER>/mcp(should return 401) - Verify MCP Application is installed: Visit
<YOUR-OpenMetadata-SERVER>/marketplace/apps/McpApplication - Re-authenticate: Remove and re-add the server in VS Code to trigger a fresh OAuth login
- Check configuration file: Ensure
mcp.jsonhas valid JSON syntax - Restart VS Code after making configuration changes