OpenAPI MCP Servers
:::caution[Experimental] OpenAPI to MCP conversion is currently in beta. The API may change. ::: Station can automatically convert OpenAPI/Swagger specifications into MCP servers, making any REST API instantly available as agent tools.How It Works
Quick Start
1. Add OpenAPI Spec to Bundle
2. Use Template Variables
Your OpenAPI spec can use template variables:3. Assign to Agent
Station Admin Example
Create an agent that manages Station itself using the Station API:OpenAPI Spec
Agent Definition
Usage
Features
Automatic Tool Generation
Each OpenAPI path becomes an MCP tool:| OpenAPI | MCP Tool |
|---|---|
GET /users | __listUsers (from operationId) |
POST /users | __createUser |
GET /users/{id} | __getUserById |
DELETE /users/{id} | __deleteUser |
Template Variable Resolution
Variables in{{ .VAR }} format are resolved from:
variables.ymlin the environment- Environment variables
- Default values in metadata
Authentication Support
Smart Tool Sync
Station detects OpenAPI spec changes and refreshes tools automatically.Configuration
Bundle Manifest
Runtime Options
Supported Features
| OpenAPI Feature | Support |
|---|---|
| OpenAPI 3.0 | ✅ Full |
| OpenAPI 3.1 | ✅ Full |
| Swagger 2.0 | ✅ Converted |
| JSON specs | ✅ |
| YAML specs | ✅ |
| $ref resolution | ✅ |
| allOf/oneOf/anyOf | ✅ |
| Bearer auth | ✅ |
| API key auth | ✅ |
| OAuth2 | ⚠️ Partial |
Best Practices
- Use operationId - Explicit IDs make cleaner tool names
- Write good summaries - Used as tool descriptions
- Define schemas - Better type information for agents
- Use template variables - Keep credentials out of specs
- Version your specs - Track API changes in Git
Limitations
- No webhooks - Only request/response patterns
- No streaming - Standard HTTP only
- Limited OAuth - Manual token management required
- Schema complexity - Very complex schemas may simplify
Troubleshooting
Tool Not Found
operationIdis defined in spec- Spec file path is correct
- Run
stn tools listto see available tools
Authentication Errors
- Token is set in variables.yml or environment
- Security scheme matches your auth method
- Token hasn’t expired
Schema Validation Errors
- Request schema matches API expectations
- Required fields are provided
- Types match (string vs number)

