Getting Started with Claude Code
Connect your OpenMetadata instance to Claude Code, Anthropic’s CLI-based AI coding assistant, for AI-powered metadata exploration directly from your terminal.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
- Claude Code installed (installation guide)
Connect with OAuth 2.0 (Recommended)
OAuth lets you authenticate using your existing OpenMetadata login, with no tokens to manage.Step 1: Add the MCP Server
Open your terminal and run:<YOUR-OpenMetadata-SERVER> with your OpenMetadata instance URL (e.g., your-openmetadata-instance.com).
This registers the OpenMetadata MCP Server as an HTTP remote server in Claude Code.
Step 2: Authenticate
Start Claude Code and run the/mcp command:
openmetadata server listed. Select Authenticate next to it. A browser window will open prompting you to sign in with your OpenMetadata credentials:
- SSO (Google, Azure, Okta, etc.): You will be redirected to your SSO provider’s login page
- Basic Auth: Enter your OpenMetadata username and password
Authentication tokens are stored securely by Claude Code and refreshed automatically. Use the
/mcp command and select Clear authentication to revoke access if needed.Server Scope Options
By default,claude mcp add registers the server for the current project only (local scope). You can change the scope:
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: Add the MCP Server with Authentication Header
<YOUR-OpenMetadata-SERVER> with your OpenMetadata instance URL and <YOUR-OpenMetadata-PAT> with your Personal Access Token.
Alternative: JSON Configuration
You can also add the server using a JSON configuration:Managing Your MCP Server
Claude Code provides several commands to manage your MCP servers:/mcp command to view server status, authenticate, or clear authentication.
Try It Out
Once connected, start a Claude Code session and ask questions about your metadata:“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.”
“Show me the lineage of data feeding the sales dashboard.”You should see Claude 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 - Check server status: Run
/mcpin Claude Code to see if the server is connected - Re-authenticate: Run
/mcpand select Clear authentication, then authenticate again - Verify configuration: Run
claude mcp get openmetadatato check the server configuration - Check Claude Code version: Ensure you are running an up-to-date version with
claude update