{
  "openapi": "3.1.0",
  "info": {
    "title": "Oh my AI API & Machine Protocol",
    "version": "1.0.0",
    "description": "Production API endpoints, intake scoping interfaces, and Model Context Protocol (MCP) integrations for Oh my AI B.V.",
    "contact": {
      "name": "Oh my AI Engineering Team",
      "email": "info@ohmyai.nl",
      "url": "https://ohmyai-exedev.vercel.app/docs"
    },
    "license": {
      "name": "Proprietary / Commercial"
    }
  },
  "servers": [
    {
      "url": "https://ohmyai-exedev.vercel.app",
      "description": "Production Vercel Anycast Edge Server"
    }
  ],
  "paths": {
    "/.well-known/mcp": {
      "get": {
        "summary": "MCP Server Card Discovery",
        "description": "Retrieve the Model Context Protocol server-card discovery manifest as per SEP-1649.",
        "responses": {
          "200": {
            "description": "Discovery card with Streamable HTTP transport information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerCard"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "MCP Streamable HTTP JSON-RPC Handshake",
        "description": "Execute JSON-RPC 2.0 MCP protocol requests including initialize, ping, tools/list, and tools/call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "summary": "MCP Server Card Endpoint",
        "responses": {
          "200": {
            "description": "MCP server discovery manifest"
          }
        }
      },
      "post": {
        "summary": "MCP JSON-RPC Endpoint",
        "responses": {
          "200": {
            "description": "MCP JSON-RPC response"
          }
        }
      }
    },
    "/api/intake": {
      "post": {
        "summary": "Submit AI Automation Scoping Intake",
        "description": "Submit process details, timing expectations, and business contact information for a production AI system engagement.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntakeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Intake successfully received and queued for review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload format or missing required fields"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "McpServerCard": {
        "type": "object",
        "properties": {
          "mcpVersion": { "type": "string", "example": "2024-11-05" },
          "serverInfo": {
            "type": "object",
            "properties": {
              "name": { "type": "string", "example": "oh-my-ai" },
              "version": { "type": "string", "example": "1.0.0" },
              "description": { "type": "string" }
            }
          },
          "transport": {
            "type": "object",
            "properties": {
              "type": { "type": "string", "example": "streamable-http" },
              "endpoint": { "type": "string", "example": "/api/mcp" }
            }
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method", "id"],
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"] },
          "id": { "type": ["string", "number"] },
          "method": { "type": "string", "example": "initialize" },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"] },
          "id": { "type": ["string", "number"] },
          "result": { "type": "object" },
          "error": { "type": "object" }
        }
      },
      "IntakeRequest": {
        "type": "object",
        "required": ["process", "timing", "contact"],
        "properties": {
          "systemType": { "type": "string", "enum": ["agent", "gpt", "automation", "integration"] },
          "process": { "type": "string", "example": "Customer support ticket categorization and triage." },
          "timing": { "type": "string", "example": "immediate" },
          "contact": {
            "type": "object",
            "required": ["name", "company", "email"],
            "properties": {
              "name": { "type": "string" },
              "company": { "type": "string" },
              "email": { "type": "string", "format": "email" }
            }
          }
        }
      },
      "IntakeResponse": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "example": "received" },
          "message": { "type": "string" },
          "leadId": { "type": "string" }
        }
      }
    }
  }
}
