{"openapi":"3.1.0","info":{"title":"Dockflow MCP Proxy","description":"Aggregating MCP proxy for Dockflow services","version":"1.0.0"},"paths":{"/public/track":{"post":{"summary":"Public Track","operationId":"public_track_public_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/track/notify":{"post":{"summary":"Public Track Notify","operationId":"public_track_notify_public_track_notify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/_health":{"get":{"summary":"Health Check","description":"Health check endpoint.","operationId":"health_check__health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint with service info.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"summary":"Oauth Authorization Server Metadata","description":"OAuth 2.0 Authorization Server Metadata (RFC 8414).\n\nReturns metadata about the authorization server for client discovery.","operationId":"oauth_authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openid-configuration":{"get":{"summary":"Openid Configuration","description":"OpenID Connect Discovery (fallback).\n\nSome clients look for openid-configuration instead of oauth-authorization-server.\nReturn the same metadata for compatibility.","operationId":"openid_configuration__well_known_openid_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Oauth Protected Resource Metadata","description":"OAuth 2.0 Protected Resource Metadata.\n\nReturns metadata about this resource server.\nSince we proxy OAuth endpoints to core-api, advertise ourselves as the auth server.\nThe resource URL is the MCP endpoint using Streamable HTTP transport.","operationId":"oauth_protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"summary":"Openai Apps Challenge","description":"OpenAI's domain-ownership check for SERVICE_HOST.\n\nIt has to be text/plain and the body has to be the token alone — OpenAI\ncompares the whole response. Served here rather than at the edge because\nthe k3s ingress, unlike the nginx vhost this replaces, cannot synthesise a\nresponse body.","operationId":"openai_apps_challenge__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/register":{"post":{"summary":"Oauth Register","description":"Proxy Dynamic Client Registration to core-api.\n\nClaude Desktop/Code calls /register on the MCP server itself.\nWe intercept to add our callback URL to the redirect_uris, ensuring\nthat the OAuth flow works with our redirect interception.","operationId":"oauth_register_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/device-auth":{"post":{"summary":"Initiate Device Auth","description":"Initiate Device Authorization Flow (RFC 8628).\n\nReturns device_code and user_code for CLI authentication.\nUser should visit verification_uri and enter the user_code.","operationId":"initiate_device_auth_device_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/device-auth/poll":{"post":{"summary":"Poll Device Auth","description":"Poll for device authorization completion.\n\nCall this endpoint periodically after user has been directed to the verification URI.\nReturns tokens when authorization is complete.","operationId":"poll_device_auth_device_auth_poll_post","parameters":[{"name":"device_code","in":"query","required":true,"schema":{"type":"string","description":"Device code from initiate","title":"Device Code"},"description":"Device code from initiate"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/authorize":{"get":{"summary":"Oauth Authorize","description":"Intercept OAuth authorization requests and proxy to core-api.\n\nThis endpoint intercepts the original redirect_uri (e.g., http://localhost:49866/callback)\nand replaces it with our own callback URL (https://mcp.dockflow.com/callback).\nAfter authorization, our callback redirects back to the original URI with the auth code.\n\nThis allows Claude Code CLI to use dynamic localhost ports without requiring\neach port to be pre-registered in core-api's OAuth application.","operationId":"oauth_authorize_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/callback":{"get":{"summary":"Oauth Callback","description":"OAuth callback endpoint.\n\nHandles the authorization code callback from core-api and redirects\nback to the original client redirect_uri (e.g., Claude Code's localhost).","operationId":"oauth_callback_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"type":"string","title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token":{"post":{"summary":"Oauth Token","description":"Proxy token requests to core-api.\n\nHandles token exchange and refresh requests from Claude.\nFor authorization_code grants, we replace the redirect_uri with our callback\nto match what we used during the authorization request.","operationId":"oauth_token_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/logout":{"post":{"summary":"Logout","description":"Invalidate a session.","operationId":"logout_logout_post","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NotifyRequest":{"properties":{"reference":{"type":"string","maxLength":200,"title":"Reference"},"email":{"type":"string","maxLength":254,"title":"Email"},"poll_token":{"type":"string","maxLength":200,"title":"Poll Token"},"page":{"type":"string","maxLength":200,"title":"Page","default":""},"carrier_prefix":{"anyOf":[{"type":"string","pattern":"^[A-Z]{4}$"},{"type":"null"}],"title":"Carrier Prefix"}},"type":"object","required":["reference","email","poll_token"],"title":"NotifyRequest"},"TrackRequest":{"properties":{"reference":{"type":"string","maxLength":200,"title":"Reference"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"},"poll_token":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Poll Token"},"page":{"type":"string","maxLength":200,"title":"Page","default":""},"carrier_prefix":{"anyOf":[{"type":"string","pattern":"^[A-Z]{4}$"},{"type":"null"}],"title":"Carrier Prefix"}},"type":"object","required":["reference"],"title":"TrackRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}