DATA SOURCE6 min read
REST APIs (OpenAPI)
Connecting REST APIs to Conexor with automatic OpenAPI discovery
Overview
Conexor can connect to any REST API that provides an OpenAPI (Swagger) specification. The API's endpoints are automatically discovered and exposed as MCP tools.
Supported OpenAPI Versions
- OpenAPI 3.0.x
- OpenAPI 3.1.x
- Swagger 2.0
Auto-Discovery
Conexor automatically discovers OpenAPI specs from common paths:
text
/swagger.json /openapi.json /api/swagger.json /api/openapi.json /v1/swagger.json /v2/openapi.json /docs/swagger.json /docs/openapi.json
You can also specify a custom OpenAPI URL when creating the data source.
Authentication Types
No Auth
Public APIs without authentication
API Key
X-API-Key header or query param
Bearer Token
Authorization: Bearer xxx
Basic Auth
Username/password encoded
Tool Generation
Each OpenAPI operation becomes an MCP tool:
- Tool name: operationId or method + path
- Description: operation summary and description
- Input schema: generated from parameters and request body
INFOOnly GET operations are exposed as tools by default. POST/PUT/DELETE can be enabled per data source.
Configuration Example
json
{
"name": "Petstore API",
"type": "RestApi",
"connectionMode": "Direct",
"apiBaseUrl": "https://petstore.swagger.io/v2",
"apiAuthType": "ApiKey",
"apiAuthValue": "your-api-key-here",
"openApiSpecUrl": "https://petstore.swagger.io/v2/swagger.json"
}Security
- SSRF protection - blocks requests to private IP ranges
- Request timeout - 30 seconds max
- Response size limit - 10MB max
- Credentials encrypted at rest