{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/register":{"post":{"tags":["MCP OAuth"],"summary":"Post Register","operationId":"post_register_register_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["MCP OAuth"],"summary":"Get Oas Metadata","operationId":"get_oas_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["MCP OAuth"],"summary":"Get Prm","description":"RFC 9728 Protected Resource Metadata — needed so clients (Cursor, Claude, etc.)\ncan discover the authorization server after receiving a 401 from /mcp.","operationId":"get_prm__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp":{"get":{"tags":["MCP OAuth"],"summary":"Get Mcp Wk","operationId":"get_mcp_wk__well_known_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["MCP OAuth"],"summary":"Get Authorize","operationId":"get_authorize_oauth_authorize_get","parameters":[{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"","title":"Scope"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge Method"}},{"name":"mcp_handoff","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set by app when user is not in a webview session; show email only.","title":"Mcp Handoff"},"description":"Set by app when user is not in a webview session; show email only."},{"name":"mcp_oauth_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Oauth Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["MCP OAuth"],"summary":"Post Authorize","operationId":"post_authorize_oauth_authorize_post","parameters":[{"name":"mcp_oauth_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Oauth Session"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_post_authorize_oauth_authorize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["MCP OAuth"],"summary":"Post Token","operationId":"post_token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_post_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["MCP OAuth"],"summary":"Post Revoke","operationId":"post_revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_post_revoke_oauth_revoke_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/auth/handoff":{"get":{"tags":["MCP Auth"],"summary":"Get Handoff From App Session","description":"Set ``mcp_oauth_session`` from a short-lived handoff token (user was logged\nin on the app host) and return to the OAuth authorize step.","operationId":"get_handoff_from_app_session_mcp_auth_handoff_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"One-time handoff JWT from app.revealed","title":"Token"},"description":"One-time handoff JWT from app.revealed"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/auth/email":{"post":{"tags":["MCP Auth"],"summary":"Post Start Magic For Oauth","description":"Send a magic link. The user lands on this host, session cookie is set, then\nwe redirect to continue_to.","operationId":"post_start_magic_for_oauth_mcp_auth_email_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_post_start_magic_for_oauth_mcp_auth_email_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/auth/verify":{"get":{"tags":["MCP Auth"],"summary":"Get Verify Mcp Oauth","operationId":"get_verify_mcp_oauth_mcp_auth_verify_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_post_authorize_oauth_authorize_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"scope":{"type":"string","title":"Scope","default":""},"state":{"type":"string","title":"State","default":""},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method"},"decision":{"type":"string","title":"Decision"}},"type":"object","required":["client_id","redirect_uri","code_challenge","code_challenge_method","decision"],"title":"Body_post_authorize_oauth_authorize_post"},"Body_post_revoke_oauth_revoke_post":{"properties":{"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"client_id":{"type":"string","title":"Client Id","default":""},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","title":"Body_post_revoke_oauth_revoke_post"},"Body_post_start_magic_for_oauth_mcp_auth_email_post":{"properties":{"email":{"type":"string","title":"Email"},"continue_to":{"type":"string","title":"Continue To","description":"Path on MCP host, e.g. /oauth/authorize?response_type=code&..."}},"type":"object","required":["email","continue_to"],"title":"Body_post_start_magic_for_oauth_mcp_auth_email_post"},"Body_post_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","required":["grant_type","client_id"],"title":"Body_post_token_oauth_token_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}