openapi-sync-mcp
v6.4.2Type-safe MCP server for OpenAPI Sync to inspect, validate, and synchronize OpenAPI specs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
openapi_sync_validate
Validate the openapi-sync config file and all configured API specs without writing any files to disk. Use this as a pre-flight check before syncing. Supports frozen lockfile verification, snapshot validation, and breaking-change gating.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
failOnBreaking | boolean | Fail if breaking changes are detected compared to stored snapshot. |
folder | string | Output directory for generated files (default: '' project root). |
frozen | boolean | Fail if any spec does not match .openapi-sync/lock.json. |
language | string | Target programming language. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
useSnapshot | boolean | Validate against committed .openapi-sync/snapshots/<api>.json. |
openapi_sync_list_endpoints
Fetch and parse all configured OpenAPI specs, then return a structured list of every endpoint (name, HTTP method, path, tags, summary). No files are written. Use this to understand the API surface before deciding on a client type or tag filters.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
folder | string | Output directory for generated files (default: '' project root). |
language | string | Target programming language. |
limit | integer | Return at most this many endpoints. |
offset | integer | Skip this many endpoints before returning results. |
outputFolder | string | Alias for folder. |
pathContains | string | Only include endpoints whose path contains this substring. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
tags | array | Filter endpoints to only those with one of these OpenAPI tags. |
useCache | boolean | Reuse previously stored endpoints instead of reloading the spec. |
openapi_sync_sync
Run a full openapi-sync — fetches all configured OpenAPI specs and writes TypeScript types, endpoint builder functions, and optional validation schemas (Zod/Yup/Joi) to disk. Returns a SyncResult with the list of files written and any errors. Run this after validating your config.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configFormat | string | Config file format to create when preserving config. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
folder | string | Output directory for generated files (default: '' project root). |
frozen | boolean | Fail without writing files if any spec does not match .openapi-sync/lock.json. |
language | string | Target programming language. |
outputFolder | string | Alias for folder. |
preserve | boolean | Auto-create a config file preserving CLI options after sync succeeds if no config file exists. |
preset | string | Named preset to apply automatically. |
refetchInterval | number | Auto-refetch interval in ms. Omit unless you want a long-lived process timer; not for one-shot agent calls. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
useSnapshot | boolean | Generate deterministically from committed .openapi-sync/snapshots/<api>.json. |
openapi_sync_get_endpoint_details
Return the full stored endpoint details for one specific endpoint by operationId or name.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
folder | string | Output directory for generated files (default: '' project root). |
language | string | Target programming language. |
name | string | The endpoint name to look up. |
operationId | string | The operationId of the endpoint to look up. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
openapi_sync_read_generated_type
Read the exact generated TypeScript interface or type declaration from the generated types file. Supports optional pagination for large types.
| Parameter | Type | Description |
|---|---|---|
typeName * | string | The exported interface or type name to read. |
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
folder | string | Output directory for generated files (default: '' project root). |
language | string | Target programming language. |
maxLines | number | Maximum number of lines to return. |
offset | number | Starting line offset (0-indexed) for paginating large type definitions. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
openapi_sync_doctor
Run diagnostic health checks on openapi.sync configuration, API specs, peer dependencies, cache, and folder permissions. Returns structured health report and actionable recommendations.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
folder | string | Output directory for generated files (default: '' project root). |
language | string | Target programming language. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
openapi_sync_generate_client
Generate a fully-typed API client for one or all configured APIs. Supports: fetch, axios, react-query, swr, rtk-query, next-fetch. Syncs the latest spec first, then writes client files to disk (unless dryRun: true). Returns a SyncResult with the list of files written.
| Parameter | Type | Description |
|---|---|---|
type * | string | The type of API client to generate. |
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
baseURL | string | Base URL to bake into the generated client (e.g. https://api.example.com). Can be overridden at runtime in the generated code. |
baseUrl | string | Alias for baseURL. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
dryRun | boolean | Show what files would be written without writing them. |
endpoints | array | Only generate client methods for these specific endpoint names / operationIds. |
folder | string | Output directory for generated files (default: '' project root). |
frozen | boolean | Fail without writing files if any spec does not match .openapi-sync/lock.json. |
language | string | Target programming language. |
output | string | Output directory for generated client. |
outputDir | string | Custom output directory for the generated client files (alias for output). |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
tags | array | Only generate client methods for endpoints with these tags. |
useCache | boolean | Reuse cached endpoints when available instead of reloading specs. |
useSnapshot | boolean | Generate client from committed .openapi-sync/snapshots/<api>.json. |
verbose | boolean | In dry-run mode, also include full endpoint listing in output. |
openapi_sync_purge
Detect and remove generated files that no longer match your current OpenAPI spec. Supports 'yes' to delete files without confirmation or 'dryRun' to preview.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
deleteFiles | boolean | Alias for yes. |
dryRun | boolean | Show which files would be deleted without deleting them. |
folder | string | Output directory for generated files (default: '' project root). |
language | string | Target programming language. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
yes | boolean | Delete stale files without confirmation prompt. |
openapi_sync_init
Create an openapi.sync config file in the current working directory without any interactive prompts. First-class authentication and runSync are supported.
| Parameter | Type | Description |
|---|---|---|
apiName * | string | A short identifier for this API used as a folder name and config key (e.g. 'petstore', 'my-api'). Letters, numbers, hyphens and underscores only. |
apiFile | string | Direct path to a local OpenAPI specification file. |
apiSource | string | URL to the OpenAPI spec (https://...) or relative path to a local file (e.g. ./api/openapi.yaml). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
clientType | string | Client type to pre-configure in the config. Omit to skip client generation. |
configFormat | string | Config file format (default: typescript). |
excludeTags | array | Tags to exclude from generation (e.g. ['deprecated', 'internal']). |
folderSplit | boolean | Organize generated files into folders by OpenAPI tags. |
outputFolder | string | Output folder for generated files (default: '' project root). |
preset | string | Starter preset configuring client type, validation library, and conventions in one option. |
refetchInterval | number | Auto-refetch interval in milliseconds (omit to disable). |
runSync | boolean | If true, immediately run a full sync after creating the config file. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
showCurl | boolean | Include cURL examples in generated docs (default: false). |
typesPrefix | string | Prefix for generated TypeScript interface names (default: 'I', e.g. IPet). |
useOperationId | boolean | Use operationId from spec for naming (default: true). |
validationLibrary | string | Validation library to pre-configure. Omit to skip validation schema generation. |
openapi_sync_read_config
Read the current openapi.sync config file from the working directory and return its contents as a string. Useful to inspect what APIs are configured before running sync or generate-client.
openapi_sync_diff
Compare configured OpenAPI specs against their locked .openapi-sync/snapshots/<api>.json baseline (or explicit from/to paths/URLs) and classify breaking vs non-breaking contract changes.
| Parameter | Type | Description |
|---|---|---|
api | string | API specification source (<name>=<url>, direct URL, or name to filter). |
apiFile | string | Direct local file path to OpenAPI specification. |
apiName | string | Name for the API (default: 'api'). |
apiUrl | string | Direct URL to OpenAPI specification (JSON or YAML). |
authHeader | string | Custom header in 'Key: Value' format (used with authType: custom). |
authIn | string | API key location: header or query (used with authType: apiKey). |
authName | string | API key header or query param name (default: X-API-Key). |
authPassword | string | Password for basic auth. |
authToken | string | Bearer token or password value / env var reference for auth. |
authType | string | Spec authentication type (bearer, basic, apiKey, custom). |
authUsername | string | Username for basic auth. |
authValue | string | API key secret value. |
configJson | string | Raw JSON string defining an openapi-sync configuration. |
failOnBreaking | boolean | Return success: false when breaking contract changes are detected. |
folder | string | Output directory for generated files (default: '' project root). |
from | string | Optional baseline OpenAPI spec path or URL (defaults to .openapi-sync/snapshots/<api>.json). |
language | string | Target programming language. |
outputFolder | string | Alias for folder. |
preset | string | Named preset to apply automatically. |
server | string | Default server index or base URL override. |
sharedPaths | boolean | Group endpoints by URL path and extract shared path functions and BASE_URL in endpoints.ts. |
to | string | Optional target OpenAPI spec path or URL (defaults to configured spec source). |