{
  "openapi": "3.0.3",
  "info": {
    "title": "Tresslers Group MCP Gateway",
    "description": "Model Context Protocol endpoint for AI agent access to the Tresslers Group intelligence library. Supports semantic vector search, knowledge graph traversal, and full dossier retrieval with on-chain Base USDC micro-tolls (payment_proof txHash; EIP-712 / Permit2 reference spec on /api/verify-payment).",
    "version": "2.2.0",
    "contact": {
      "name": "Tresslers Group",
      "email": "connect@tresslersgroup.com",
      "url": "https://tresslersgroup.com"
    }
  },
  "servers": [
    {
      "url": "https://tresslersgroup.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/mcp": {
      "post": {
        "summary": "MCP JSON-RPC 2.0 Tool Execution",
        "description": "Executes Model Context Protocol tools (list_dossiers, search_intelligence_matrix, ask_intelligence_rag, query_knowledge_graph, read_dossier, get_dossier_delta, optimize_codon, get_model_record) via standard HTTP POST JSON-RPC 2.0 protocol.",
        "operationId": "mcpToolCall",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": { "type": "string", "example": "2.0" },
                  "id": { "type": "string", "example": "1" },
                  "method": { "type": "string", "example": "tools/call" },
                  "params": { "type": "object" }
                },
                "required": ["jsonrpc", "method"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 tool execution response",
            "content": {
              "application/json": {
                "schema": { "type": "object" }
              }
            }
          }
        }
      },
      "get": {
        "summary": "MCP Server-Sent Events endpoint",
        "description": "Connects to the Tresslers Group intelligence substrate via the Model Context Protocol (SSE transport). Supports JSON-RPC 2.0 tool dispatch.",
        "operationId": "mcpConnect",
        "responses": {
          "200": {
            "description": "SSE stream established",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Machine-readable site index",
        "description": "Returns a structured overview of the Tresslers Group site, content domains, and machine interface endpoints.",
        "responses": {
          "200": {
            "description": "Plain text site index",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "summary": "Full intelligence library with excerpts",
        "description": "Returns titles, metadata, and content excerpts for all published dossiers. Full text available via MCP read_dossier tool.",
        "responses": {
          "200": {
            "description": "Plain text library index with excerpts",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "summary": "RSS 2.0 feed",
        "description": "RSS feed with content excerpts for all published intelligence dossiers.",
        "responses": {
          "200": {
            "description": "RSS XML feed",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
