{
  "openapi": "3.1.0",
  "info": {
    "title": "MijnJurist MCP API",
    "version": "1.0.0",
    "summary": "Nederlands en Europees recht voor AI-assistenten via het Model Context Protocol.",
    "description": "De publieke API van MijnJurist is een MCP-server (Streamable HTTP, JSON-RPC 2.0). AI-assistenten zoals Claude en ChatGPT zoeken er in wetgeving, rechtspraak, Kamerstukken, de cao van de gebruiker en diens eigen documenten. Alle tools zijn alleen-lezen. Toegang gaat met OAuth 2.0 (authorization code met PKCE S256, dynamic client registration) en een MijnJurist-account met een abonnement of proefperiode. Een account maak je zelf aan via https://mijnjurist.ai/auth/register: 3 dagen gratis het volledige platform, zonder creditcard. Uitleg voor mensen: https://mijnjurist.ai/connector Versiebeheer: het MCP-protocol wordt per verzoek onderhandeld met de header MCP-Protocol-Version; oudere protocolversies blijven ondersteund zolang de MCP-SDK ze ondersteunt. Wijzigingen staan in info.version van deze spec. Free trial: 3 days, self-serve sign-up at https://mijnjurist.ai/auth/register without credit card; OAuth clients register themselves via dynamic client registration. Deprecation policy: https://mijnjurist.ai/api-versies (breaking changes announced at least 90 days ahead with Deprecation and Sunset headers).",
    "contact": {
      "name": "MijnJurist support",
      "email": "support@mijnjurist.ai",
      "url": "https://mijnjurist.ai/contact"
    },
    "termsOfService": "https://mijnjurist.ai/gebruiksvoorwaardenmijnjurist.pdf",
    "x-deprecation-policy": "https://mijnjurist.ai/api-versies",
    "x-cli": "claude mcp add --transport http mijnjurist https://api.mijnjurist.ai/mcp"
  },
  "externalDocs": {
    "description": "MijnJurist koppelen aan Claude of ChatGPT",
    "url": "https://mijnjurist.ai/connector"
  },
  "servers": [
    {
      "url": "https://api.mijnjurist.ai"
    }
  ],
  "security": [
    {
      "mijnjuristOAuth": ["mcp:read"]
    }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "operationId": "mcpRequest",
        "summary": "MCP-verzoek (JSON-RPC 2.0)",
        "description": "Eén JSON-RPC 2.0-bericht volgens het Model Context Protocol, zoals initialize, tools/list of tools/call. Tools: zoek_wetboeken, haal_artikel_op, zoek_rechtspraak, zoek_kamerstukken, zoek_caos, zoek_documenten, haal_template_op en valideer_citaat.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "haal_artikel_op",
                  "arguments": {
                    "document_id": "Sr",
                    "article": "310"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC-antwoord, als JSON of als server-sent events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Geen of een ongeldig access token. De WWW-Authenticate-header verwijst naar de protected-resource-metadata (RFC 9728).",
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                },
                "example": {
                  "statusCode": 401,
                  "message": "Je sessie is verlopen. Log opnieuw in."
                }
              }
            }
          },
          "400": {
            "description": "Ongeldig verzoek, bijvoorbeeld geen geldig JSON-RPC-bericht.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/HttpError"
                    },
                    {
                      "$ref": "#/components/schemas/JsonRpcResponse"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Te veel verzoeken. Zie de RateLimit-headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconden tot het venster vernieuwt."
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "Onverwachte fout aan onze kant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "required": false,
            "description": "Versie van het MCP-protocol. Zonder header geldt 2025-03-26.",
            "schema": {
              "type": "string",
              "enum": ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"]
            },
            "example": "2025-11-25"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "mijnjuristOAuth": {
        "type": "oauth2",
        "description": "OAuth 2.0 met PKCE (S256) en dynamic client registration via https://api.mijnjurist.ai/register. Metadata: https://api.mijnjurist.ai/.well-known/oauth-authorization-server en https://api.mijnjurist.ai/.well-known/oauth-protected-resource/mcp.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.mijnjurist.ai/authorize",
            "tokenUrl": "https://api.mijnjurist.ai/token",
            "refreshUrl": "https://api.mijnjurist.ai/token",
            "scopes": {
              "mcp:read": "Alleen lezen: zoeken in wetgeving, rechtspraak, Kamerstukken, de eigen cao en eigen documenten, en templates ophalen. Kan niets in het account wijzigen."
            }
          }
        }
      }
    },
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": ["string", "integer"]
          },
          "method": {
            "type": "string"
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc"],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": ["string", "integer", "null"]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "$ref": "#/components/schemas/JsonRpcError"
          }
        }
      },
      "HttpError": {
        "type": "object",
        "description": "Foutmelding op HTTP-niveau, met een Nederlandse tekst voor de gebruiker.",
        "required": ["statusCode", "message"],
        "properties": {
          "statusCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "JsonRpcError": {
        "type": "object",
        "description": "Fout binnen een JSON-RPC-antwoord (HTTP 200).",
        "required": ["code", "message"],
        "properties": {
          "code": {
            "type": "integer",
            "description": "-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error.",
            "enum": [-32700, -32600, -32601, -32602, -32603]
          },
          "message": {
            "type": "string"
          },
          "data": {}
        }
      }
    }
  }
}
