Skip to main content

MCP Server - API Usage & Reference

API Endpoints

Call a Tool

Endpoint: POST {OMURL}/mcp Sample Request (Search Metadata):
Sample Response:

Get a Prompt

Endpoint: POST {OMURL}/mcp Sample Request:
Sample Response:

Error Handling

Authentication Error

Invalid Tool Error

Validation Error

Best Practices

  1. Always authenticate: Include the JWT token in every request
  2. Handle errors gracefully: Check for error responses and handle them appropriately
  3. Use appropriate limits: Don’t request too many results at once to avoid performance issues
  4. Cache server capabilities: Store the results of the initialize call to avoid repeated requests
  5. Use specific entity types: When possible, specify entityType to get more relevant results

Security Considerations

  • JWT tokens should be kept secure and not logged
  • Use HTTPS for all communications
  • Implement token refresh logic for long-running connections
  • Follow your organization’s security policies for API access
For more sample use cases with MCP please check out our blog!

Reach out on Slack!

With MCP, we are finding new ways to use OpenMetadata all the time! Think you’ve got a great new use case? Show us what you’ve got in Slack!