{
  "openapi": "3.0.0",
  "info": {
    "title": "Nyne.ai MCP Server API",
    "description": "Model Context Protocol server providing semantic people search, profile enrichment, and AI-powered profile analysis from Nyne.ai's comprehensive person graph.",
    "version": "0.1.0",
    "contact": {
      "email": "support@nyne.ai",
      "url": "https://nyne.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.nyne.ai"
    }
  ],
  "paths": {
    "/mcp/message": {
      "post": {
        "operationId": "mcpMessage",
        "summary": "Send MCP JSON-RPC message",
        "description": "Send JSON-RPC 2.0 messages to interact with MCP tools (initialize, tools/list, tools/call)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JSONRPCRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JSONRPCResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": ["nyne.read", "nyne.search", "nyne.answer"]
          },
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "JSONRPCRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"],
            "description": "JSON-RPC version"
          },
          "id": {
            "type": "string",
            "description": "Request identifier"
          },
          "method": {
            "type": "string",
            "enum": ["initialize", "tools/list", "tools/call", "resources/list", "prompts/list"],
            "description": "MCP method name"
          },
          "params": {
            "type": "object",
            "description": "Method parameters"
          }
        }
      },
      "JSONRPCResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "description": "Success result"
          },
          "error": {
            "type": "object",
            "description": "Error object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.nyne.ai/mcp/oauth/authorize",
            "tokenUrl": "https://api.nyne.ai/mcp/oauth/token",
            "scopes": {
              "nyne.read": "Read person profiles",
              "nyne.search": "Search for people",
              "nyne.answer": "Ask questions about profiles"
            }
          }
        }
      },
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "API Key authentication (requires X-API-Secret header as well)"
      }
    }
  }
}




