Skip to main content

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

Station reads your OpenAPI spec and exposes each endpoint as an MCP tool.

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:

Template Variable Resolution

Variables in {{ .VAR }} format are resolved from:
  1. variables.yml in the environment
  2. Environment variables
  3. Default values in metadata

Authentication Support

Configure via variables:

Smart Tool Sync

Station detects OpenAPI spec changes and refreshes tools automatically.

Configuration

Bundle Manifest

Runtime Options

Supported Features

Best Practices

  1. Use operationId - Explicit IDs make cleaner tool names
  2. Write good summaries - Used as tool descriptions
  3. Define schemas - Better type information for agents
  4. Use template variables - Keep credentials out of specs
  5. 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

Check:
  1. operationId is defined in spec
  2. Spec file path is correct
  3. Run stn tools list to see available tools

Authentication Errors

Check:
  1. Token is set in variables.yml or environment
  2. Security scheme matches your auth method
  3. Token hasn’t expired

Schema Validation Errors

Check:
  1. Request schema matches API expectations
  2. Required fields are provided
  3. Types match (string vs number)

Next Steps