{"openapi":"3.1.0","info":{"title":"MCP Connector Hub","description":"Backend MVP to register MCP servers, probe HTTP/OAuth metadata, and generate Hermes Agent mcp_servers config.","version":"0.1.0"},"paths":{"/flows/barbearia/auth":{"post":{"tags":["lp-builder"],"summary":"Auth","operationId":"auth_flows_barbearia_auth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/flows/barbearia.json":{"get":{"tags":["lp-builder"],"summary":"Get Flow","operationId":"get_flow_flows_barbearia_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Flow Flows Barbearia Json Get"}}}}}}},"/flows/barbearia/deploy":{"post":{"tags":["lp-builder"],"summary":"Deploy","description":"Deploy LP: receive fields as JSON string + optional logo upload.","operationId":"deploy_flows_barbearia_deploy_post","parameters":[{"name":"x-token","in":"header","required":false,"schema":{"type":"string","title":"X-Token"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_deploy_flows_barbearia_deploy_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lps/register":{"post":{"tags":["lp tracking"],"summary":"Register Lp","operationId":"register_lp_v1_lps_register_post","parameters":[{"name":"x-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LpRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Register Lp V1 Lps Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lp-events":{"post":{"tags":["lp tracking"],"summary":"Record Lp Event","operationId":"record_lp_event_v1_lp_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LpEventRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Record Lp Event V1 Lp Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lps":{"get":{"tags":["lp tracking"],"summary":"List Lps","operationId":"list_lps_v1_lps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Lps V1 Lps Get"}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/catalog":{"get":{"tags":["catalog"],"summary":"List Catalog","operationId":"list_catalog_v1_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CatalogItem"},"type":"array","title":"Response List Catalog V1 Catalog Get"}}}}}}},"/v1/probe":{"post":{"tags":["probe"],"summary":"Probe Url","operationId":"probe_url_v1_probe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers":{"post":{"tags":["mcp servers"],"summary":"Create Mcp Server","operationId":"create_mcp_server_v1_mcp_servers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp servers"],"summary":"List Mcp Servers","operationId":"list_mcp_servers_v1_mcp_servers_get","parameters":[{"name":"include_disabled","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Disabled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServer"},"title":"Response List Mcp Servers V1 Mcp Servers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{server_id}":{"get":{"tags":["mcp servers"],"summary":"Get Mcp Server","operationId":"get_mcp_server_v1_mcp_servers__server_id__get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["mcp servers"],"summary":"Update Mcp Server","operationId":"update_mcp_server_v1_mcp_servers__server_id__patch","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mcp servers"],"summary":"Delete Mcp Server","operationId":"delete_mcp_server_v1_mcp_servers__server_id__delete","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{server_id}/probe":{"post":{"tags":["probe"],"summary":"Probe Mcp Server","operationId":"probe_mcp_server_v1_mcp_servers__server_id__probe_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{server_id}/oauth/start":{"post":{"tags":["oauth"],"summary":"Start Oauth","operationId":"start_oauth_v1_mcp_servers__server_id__oauth_start_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{server_id}/oauth/status":{"get":{"tags":["oauth"],"summary":"Oauth Status","operationId":"oauth_status_v1_mcp_servers__server_id__oauth_status_get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/oauth/meta/diagnostics":{"get":{"tags":["oauth"],"summary":"Meta Oauth Diagnostics","operationId":"meta_oauth_diagnostics_v1_admin_oauth_meta_diagnostics_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"title":"Response Meta Oauth Diagnostics V1 Admin Oauth Meta Diagnostics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp-servers/{server_id}/test":{"post":{"tags":["mcp servers"],"summary":"Test Mcp Server","operationId":"test_mcp_server_v1_mcp_servers__server_id__test_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"AuthRequest"},"AuthResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"AuthResponse"},"AuthType":{"type":"string","enum":["none","bearer","header","oauth"],"title":"AuthType"},"Body_deploy_flows_barbearia_deploy_post":{"properties":{"fields":{"type":"string","title":"Fields"},"logo":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Logo"}},"type":"object","title":"Body_deploy_flows_barbearia_deploy_post"},"CatalogItem":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"transport":{"$ref":"#/components/schemas/Transport"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"auth_type":{"$ref":"#/components/schemas/AuthType","default":"none"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","display_name","description","transport"],"title":"CatalogItem"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LpEventRequest":{"properties":{"event":{"type":"string","maxLength":80,"minLength":1,"title":"Event"},"lp_slug":{"type":"string","maxLength":120,"minLength":1,"title":"Lp Slug"},"lead_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Lead Id"},"business_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Business Name"},"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Url"},"referrer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Referrer"},"github_repo":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Github Repo"},"github_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Github Url"},"template_version":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Template Version"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["event","lp_slug"],"title":"LpEventRequest"},"LpRegisterRequest":{"properties":{"slug":{"type":"string","maxLength":120,"minLength":1,"title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"type":"string","maxLength":500,"minLength":1,"title":"Url"},"lead_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Lead Id"},"github_repo":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Github Repo"},"github_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Github Url"},"template_version":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Template Version"}},"type":"object","required":["slug","name","url"],"title":"LpRegisterRequest"},"McpServer":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{1,63}$","title":"Name","examples":["meta_ads"]},"display_name":{"type":"string","maxLength":120,"minLength":2,"title":"Display Name","examples":["Meta Ads MCP"]},"transport":{"$ref":"#/components/schemas/Transport","default":"http"},"enabled":{"type":"boolean","title":"Enabled","default":true},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url","examples":["https://mcp.facebook.com/ads"]},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","examples":["npx"]},"args":{"items":{"type":"string"},"type":"array","title":"Args","examples":[["-y","@modelcontextprotocol/server-filesystem","/data"]]},"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env","description":"Env var names to values or secret placeholders. Do not store raw secrets in production."},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Header names to values or secret placeholders."},"auth_type":{"$ref":"#/components/schemas/AuthType","default":"none"},"timeout":{"type":"integer","maximum":600.0,"minimum":1.0,"title":"Timeout","default":180},"connect_timeout":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Connect Timeout","default":60},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"id":{"type":"string","title":"Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["name","display_name","id","created_at","updated_at"],"title":"McpServer"},"McpServerCreate":{"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]{1,63}$","title":"Name","examples":["meta_ads"]},"display_name":{"type":"string","maxLength":120,"minLength":2,"title":"Display Name","examples":["Meta Ads MCP"]},"transport":{"$ref":"#/components/schemas/Transport","default":"http"},"enabled":{"type":"boolean","title":"Enabled","default":true},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url","examples":["https://mcp.facebook.com/ads"]},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","examples":["npx"]},"args":{"items":{"type":"string"},"type":"array","title":"Args","examples":[["-y","@modelcontextprotocol/server-filesystem","/data"]]},"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env","description":"Env var names to values or secret placeholders. Do not store raw secrets in production."},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","description":"Header names to values or secret placeholders."},"auth_type":{"$ref":"#/components/schemas/AuthType","default":"none"},"timeout":{"type":"integer","maximum":600.0,"minimum":1.0,"title":"Timeout","default":180},"connect_timeout":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Connect Timeout","default":60},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","display_name"],"title":"McpServerCreate"},"McpServerUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Display Name"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Args"},"env":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Env"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"auth_type":{"anyOf":[{"$ref":"#/components/schemas/AuthType"},{"type":"null"}]},"timeout":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":1.0},{"type":"null"}],"title":"Timeout"},"connect_timeout":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":1.0},{"type":"null"}],"title":"Connect Timeout"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"McpServerUpdate"},"McpTestResult":{"properties":{"ok":{"type":"boolean","title":"Ok"},"server_id":{"type":"string","title":"Server Id"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"auth_used":{"type":"boolean","title":"Auth Used","default":false},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"message":{"type":"string","title":"Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok","server_id","message"],"title":"McpTestResult"},"OAuthStartResponse":{"properties":{"login_url":{"type":"string","title":"Login Url"},"authorization_server":{"type":"string","title":"Authorization Server"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"flow":{"type":"string","title":"Flow","default":"authorization_code_pkce"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["login_url","authorization_server"],"title":"OAuthStartResponse"},"OAuthStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"server_id":{"type":"string","title":"Server Id"},"token_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"status":{"type":"string","title":"Status","default":"disconnected"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["connected","server_id"],"title":"OAuthStatusResponse"},"ProbeRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"timeout":{"type":"integer","maximum":120.0,"minimum":1.0,"title":"Timeout","default":20}},"type":"object","required":["url"],"title":"ProbeRequest"},"ProbeResult":{"properties":{"ok":{"type":"boolean","title":"Ok"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"transport":{"$ref":"#/components/schemas/Transport","default":"http"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"www_authenticate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Www Authenticate"},"oauth_resource_metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Resource Metadata Url"},"oauth_resource_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Oauth Resource Metadata"},"authorization_servers":{"items":{"type":"string"},"type":"array","title":"Authorization Servers"},"scopes_supported":{"items":{"type":"string"},"type":"array","title":"Scopes Supported"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"ProbeResult"},"Transport":{"type":"string","enum":["http","stdio"],"title":"Transport"},"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"}}}}