Fetch
Web content fetching and conversion for efficient LLM usage
MOmodelcontextprotocol/servers92k近 7 天新增 209 个 star
Official OpenMetadata MCP: 21 read and write tools for search, lineage, data quality, governance.
OAuth 2.0 authentication server for Model Context Protocol (MCP) integration with OpenMetadata, enabling secure access to metadata through Claude Desktop and other MCP clients.
This module implements a complete OAuth 2.0 Authorization Code Flow with PKCE for MCP clients, enabling user authentication via OpenMetadata's existing SSO providers (Google, Okta, Azure AD, Auth0, AWS Cognito, Custom OIDC, LDAP, SAML) or Basic Auth. The implementation provides secure, standards-compliant access to OpenMetadata's metadata management capabilities through MCP tools.
Important: This is user SSO authentication for MCP clients, not connector-based OAuth for data sources. Users authenticate with their OpenMetadata credentials (SSO or username/password), and MCP tools execute with that user's permissions.
UserSSOOAuthProvider
OAuthHttpStatelessServerTransportProvider
SecurityConfigurationManager
OAuth Repositories
Five core OAuth tables with audit logging:
Cleanup Job: OAuthTokenCleanupJob runs every 10 minutes to purge expired tokens and pending requests.
┌─────────────┐ ┌──────────────┐
│ Claude │ │ OpenMetadata │
│ Desktop │ │ MCP │
│ (MCP Client)│ │ Server │
└──────┬──────┘ └──────┬───────┘
│ │
│ 1. Generate PKCE code_verifier (random 43-128 chars) │
│ Calculate code_challenge = BASE64URL(SHA256(verifier)) │
│ │
│ 2. GET /api/v1/mcp/authorize │
│ ?client_id={registered_client_id} │
│ &redirect_uri=http://127.0.0.1:XXXXX/callback │
│ &code_challenge={challenge} │
│ &code_challenge_method=S256 │
│ &state={client_state} │
│─────────────────────────────────────────────────────────────────>│
│ │
│ 3. Store OAuth state in database: │
│ - client_id, redirect_uri │
│ - code_challenge, method │
│ - state, scopes, TTL (10 min) │
│ Generate authRequestId │
│ │
│ 4. 302 Redirect to Auth Page │
│ /api/v1/mcp/authorize?state=mcp:{authRequestId} │
│<─────────────────────────────────────────────────────────────────│
│ │
│ 5. User authenticates via: │
│ ┌──────────────────────────────────────┐ │
│ │ Option A: SSO Provider │ │
│ │ - Redirect to SSO provider: │ │
│ │ • Google OAuth │ │
│ │ • Okta │ │
│ │ • Azure AD │ │
│ │ • Auth0 │ │
│ │ • AWS Cognito │ │
│ │ • Custom OIDC │ │
│ │ • LDAP │ │
│ │ • SAML │ │
│ │ - User grants consent │ │
│ │ - SSO callback with ID token (pac4j)│ │
│ └──────────────────────────────────────┘ │
│ OR │
│ ┌─────────────────────────────┐ │
│ │ Option B: Basic Auth │ │
│ │ - Username/password form │ │
│ │ - Validate with │ │
│ │ OpenMetadata │ │
│ └─────────────────────────────┘ │
│ │
│ 6. Lookup OAuth state from DB using │
│ authRequestId from state parameter │
│ Generate authorization code │
│ Store code + code_challenge in DB │
│ │
│ 7. 302 Redirect with authorization code │
│ {redirect_uri}?code={auth_code}&state={client_state} │
│<─────────────────────────────────────────────────────────────────│
│ │
│ 8. POST /api/v1/mcp/token │
│ grant_type=authorization_code │
│ code={auth_code} │
│ code_verifier={verifier} │
│ client_id={registered_client_id} │
│ redirect_uri=http://127.0.0.1:XXXXX/callback │
│─────────────────────────────────────────────────────────────────>│
│ │
│ 9. PKCE Validation: │
│ Lookup code_challenge from DB │
│ Verify: BASE64URL(SHA256(verifier)) │
│ == code_challenge │
│ Delete authorization code (single-use)│
│ │
│ 10. 200 OK │
│ { │
│ "access_token": "eyJhbGc...", // JWT, 1 hour TTL │
│ "refresh_token": "fernet_encrypted", // 7 days TTL │
│ "token_type": "Bearer", │
│ "expires_in": 3600 │
│ } │
│<─────────────────────────────────────────────────────────────────│
│ │
│ 11. Use MCP Tools │
│ Authorization: Bearer eyJhbGc... │
│─────────────────────────────────────────────────────────────────>│
│ MCP Tool Execution (lineage, search, discovery, etc.) │
│<─────────────────────────────────────────────────────────────────│
│ │
│ 12. Token Expiry - Refresh Flow │
│ POST /api/v1/mcp/token │
│ grant_type=refresh_token │
│ refresh_token={encrypted_token} │
│─────────────────────────────────────────────────────────────────>│
│ │
│ 13. Refresh Token Rotation: │
│ - Decrypt and validate refresh token │
│ - Delete old refresh token │
│ - Generate new access + refresh tokens│
│ │
│ 14. 200 OK │
│ { │
│ "access_token": "eyJhbGc...", // New JWT │
│ "refresh_token": "new_encrypted", // New rotated token │
│ "token_type": "Bearer", │
│ "expires_in": 3600 │
│ } │
│<─────────────────────────────────────────────────────────────────│
│ │
PKCE (Proof Key for Code Exchange)
Database-Backed State Persistence
Token Security
MCP-specific settings are managed via REST API with database persistence:
# Get current MCP configuration
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:8585/api/v1/system/mcp/config
# Update MCP configuration (no restart required)
curl -X PUT -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"baseUrl": "https://metadata.example.com",
"allowedOrigins": ["https://app.example.com"],
"connectTimeout": 30000,
"readTimeout": 60000,
"enabled": true
}' \
http://localhost:8585/api/v1/system/mcp/config
Configuration Properties:
baseUrl - OAuth issuer URL (used for metadata endpoints)allowedOrigins - CORS whitelist for OAuth endpoints (use specific origins, not *)connectTimeout - HTTP connection timeout for SSO provider metadata (milliseconds)readTimeout - HTTP read timeout for SSO provider metadata (milliseconds)enabled - Enable/disable MCP serverKey Features:
The OAuth server is configured in openmetadata.yaml:
MCP clients use Dynamic Client Registration (RFC 7591) via POST /api/v1/mcp/register:
The registration endpoint returns a client_id and optional client_secret for the OAuth flow.
All MCP tools authenticate using the Bearer token from the OAuth flow:
Permission Model: Tool permissions are enforced by OpenMetadata's Authorizer using the user's identity from the JWT. This ensures MCP users have the same access as they would in the OpenMetadata UI - respecting all policies, roles, and ownership rules. OAuth authenticates the user; the Authorizer enforces what they can access.
The transport provider extracts and validates the JWT on every request, setting up the security context for downstream MCP tool execution.
Thread Safety and Concurrency
HTTP Client Configuration
Session Security
Configuration Management
Input Validation
https://*.example.com)*) for development environmentsSecurityConfigurationManagerTest (9 tests)
MCPConfigurationIntegrationTest (9 tests, on hold)
15 comprehensive integration tests in UserSSOOAuthProviderIntegrationTest:
Tests SSO provider integration using pac4j with mock identity providers (Google, Okta, Azure AD, etc.). The UserSSOOAuthProvider auto-detects the configured SSO provider from OpenMetadata's authentication configuration.
Schema migrations in bootstrap/sql/migrations/native/1.12.0/:
OAuth components initialized in McpServer:
SSO Provider Configuration (varies by provider):
JWT Token Configuration:
MCP Configuration (optional, can be set via API):
Apache License 2.0
Web content fetching and conversion for efficient LLM usage
MOmodelcontextprotocol/servers92k近 7 天新增 209 个 star
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
D4D4Vinci/Scrapling90k近 7 天新增 1,196 个 star
MCP server for web search operations
BYbytedance/UI-TARS-desktop39k近 7 天新增 54 个 star
Search and discover Agent Skills from the skills.sh registry. Powered by HAPI MCP server.
AGagentskills/agentskills27k近 7 天新增 362 个 star
The search engine for AI agents: cited answers from your local code, docs, specs and logs.
XExerj-org/xerj17k近 7 天新增 6,272 个 star
调用 Apify Store 上的现成爬虫,抓取社交媒体、地图和电商数据。
APapify/apify-mcp-server13k近 7 天新增 1,248 个 star