{
  "openapi": "3.1.0",
  "info": {
    "title": "CustomMCP.com public API",
    "version": "1.0.0",
    "summary": "Catalog, estimator, public knowledge, inquiry intake and MCP discovery for CustomMCP.com.",
    "description": "Public, unauthenticated endpoints. The inquiry endpoint is a write and requires consent. Error responses use RFC 9457 problem details.",
    "contact": {
      "name": "CustomMCP.com",
      "url": "https://custommcp.com/contact/"
    },
    "license": {
      "name": "Reference server MIT; site content all rights reserved",
      "identifier": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://custommcp.com",
      "description": "Production"
    }
  ],
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "tags": [
    {
      "name": "Catalog"
    },
    {
      "name": "Pricing"
    },
    {
      "name": "Intake"
    },
    {
      "name": "Knowledge"
    },
    {
      "name": "Agents"
    },
    {
      "name": "Evidence"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Operations"
    }
  ],
  "paths": {
    "/api/estimate": {
      "post": {
        "tags": [
          "Pricing"
        ],
        "operationId": "estimateProject",
        "summary": "Estimate an indicative project range",
        "description": "Return an indicative, non-binding USD range from tool and integration counts. Deterministic formula; not a quote.",
        "x-capability-id": "pricing.estimate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Indicative range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateOutput"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/inquiry": {
      "post": {
        "tags": [
          "Intake"
        ],
        "operationId": "createInquiry",
        "summary": "Store a project brief",
        "description": "Store a project inquiry with consent and return a human-readable reference code. Requires the caller to confirm the submission.",
        "x-capability-id": "inquiry.create",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InquiryInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InquiryOutput"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/inquiry/{reference}": {
      "get": {
        "tags": [
          "Intake"
        ],
        "operationId": "getInquiryStatus",
        "summary": "Check an inquiry status without exposing its content",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^INQ-[0-9]{4}-[A-Z0-9]{6}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "receivedAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/services": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "operationId": "listServices",
        "summary": "List services with indicative ranges",
        "x-capability-id": "services.list",
        "responses": {
          "200": {
            "description": "Services",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/{provider}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getIntegrationRequirements",
        "summary": "Get integration prerequisites and limits",
        "x-capability-id": "integrations.requirements",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "postgresql",
                "google-drive"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requirements",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "operationId": "searchKnowledge",
        "summary": "Search public content",
        "x-capability-id": "knowledge.search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 120
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            }
          }
        }
      }
    },
    "/api/page": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "operationId": "getPage",
        "summary": "Get a page as Markdown",
        "x-capability-id": "knowledge.page",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "/resources/what-is-mcp/"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page Markdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageContent"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/agent-prompt": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "getAgentPrompt",
        "summary": "Get a context-aware handoff prompt",
        "x-capability-id": "handoff.prompt",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prompt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPrompt"
                }
              }
            }
          }
        }
      }
    },
    "/api/evidence/{id}": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "operationId": "getEvidence",
        "summary": "Retrieve a signed execution receipt",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceReceipt"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/paid/security-checklist": {
      "get": {
        "tags": [
          "Payments"
        ],
        "operationId": "getPaidChecklist",
        "summary": "Machine-payment protected checklist (challenge adapter)",
        "description": "Without payment credentials, returns HTTP 402 with a WWW-Authenticate Payment challenge. Settlement is not configured in this build; a dev token can be enabled by an operator.",
        "responses": {
          "200": {
            "description": "Unlocked content when a valid dev settlement token is configured",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "303": {
            "description": "Human browser redirect to the explanation page"
          },
          "402": {
            "description": "Payment challenge",
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "mcpJsonRpc",
        "summary": "MCP stateless Streamable HTTP endpoint",
        "description": "Accepts JSON-RPC 2.0 initialize, tools/list, tools/call, resources/list, resources/read, prompts/list and prompts/get. State-changing calls return X-Evidence-Id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted"
          },
          "400": {
            "$ref": "#/components/responses/Problem"
          },
          "415": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "tags": [
          "Operations"
        ],
        "operationId": "health",
        "summary": "Liveness and build identity",
        "responses": {
          "200": {
            "description": "Healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "checkedAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "status",
          "detail"
        ]
      },
      "EstimateInput": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "description": "Number of MCP tools to build."
          },
          "integrations": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20,
            "description": "Number of upstream systems to connect."
          }
        },
        "required": [
          "tools",
          "integrations"
        ],
        "additionalProperties": false
      },
      "EstimateOutput": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "const": "USD"
          },
          "low": {
            "type": "integer"
          },
          "high": {
            "type": "integer"
          },
          "binding": {
            "type": "boolean",
            "const": false
          },
          "formula": {
            "type": "string"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "low",
          "high",
          "binding",
          "formula",
          "disclaimer"
        ]
      },
      "InquiryInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "topic": {
            "type": "string",
            "enum": [
              "new-project",
              "security",
              "privacy",
              "other"
            ]
          },
          "deployment": {
            "type": "string",
            "enum": [
              "cloud",
              "on-premises",
              "hybrid",
              "unsure"
            ]
          },
          "requirements": {
            "type": "string",
            "minLength": 20,
            "maxLength": 4000
          },
          "consent": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "email",
          "topic",
          "deployment",
          "requirements",
          "consent"
        ],
        "additionalProperties": false
      },
      "InquiryOutput": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "pattern": "^INQ-[0-9]{4}-[A-Z0-9]{6}$"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "const": "stored"
          }
        },
        "required": [
          "reference",
          "receivedAt",
          "status"
        ]
      },
      "ServiceList": {
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "priceLabel": {
                  "type": "string"
                },
                "timeline": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "summary",
                "priceLabel",
                "timeline",
                "url"
              ]
            }
          }
        },
        "required": [
          "services"
        ]
      },
      "Integration": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "readAccess": {
            "type": "string"
          },
          "writeAccess": {
            "type": "string"
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "name",
          "summary",
          "readAccess",
          "writeAccess",
          "prerequisites",
          "limits",
          "url"
        ]
      },
      "SearchResults": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "snippet": {
                  "type": "string"
                },
                "score": {
                  "type": "number"
                }
              },
              "required": [
                "title",
                "url",
                "snippet",
                "score"
              ]
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "PageContent": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "canonicalUrl": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "updated": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "canonicalUrl",
          "markdown",
          "updated"
        ]
      },
      "AgentPrompt": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "page": {
            "type": "string"
          },
          "canonicalUrl": {
            "type": "string"
          }
        },
        "required": [
          "prompt",
          "page",
          "canonicalUrl"
        ]
      },
      "EvidenceReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "capabilityId": {
            "type": "string"
          },
          "caller": {
            "type": "string"
          },
          "requestDigest": {
            "type": "string"
          },
          "responseDigest": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "keyId": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "capabilityId",
          "requestDigest",
          "responseDigest",
          "issuedAt",
          "keyId",
          "signature"
        ]
      }
    },
    "responses": {
      "Problem": {
        "description": "RFC 9457 problem details",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    }
  },
  "x-capability-ir": "https://custommcp.com/capabilities.json",
  "x-generated-at": "2026-11-29T00:00:00-05:00"
}
