OpenApiServerConfigurator
Rasuvaeff\Mcp\OpenApi\OpenApiServerConfigurator
Class — Rasuvaeff\Mcp\OpenApi — Source
Bridges allow-listed OpenAPI operations onto the MCP server: each operationId becomes a tool named after it (or after its $toolNames override), with the input schema derived from the operation's parameters/request body, the output schema derived from its success response (object-typed application/json only) and calls executed as real HTTP requests against the upstream API — passing its full middleware stack (validation, rate limiting, auth).
Fail-closed: an empty allow-list exposes nothing; an operationId missing from the document throws UnknownOperationException at build time; with $safeMethodsOnly a non-GET operation in the allow-list throws UnsafeOperationException instead of being exposed; an unknown operationId in $toolNames or $dryRunOperations throws InvalidArgumentException, and a rename — from $toolNames or from $modifier — that is invalid or collides with another bridged tool's name (or with an attribute tool's, which McpServerFactory reserves through ReservedToolNamesAwareInterface) throws InvalidSpecException.
Methods
withReservedToolNames()
withReservedToolNames(array $names): staticconfigure()
configure(Mcp\Server\Builder $builder): void