OpenAPI Generation for OpenWebUI Integration
MCPHub now supports generating OpenAPI 3.0.3 specifications from MCP tools, enabling seamless integration with OpenWebUI and other OpenAPI-compatible systems without requiring MCPO as an intermediary proxy.Features
- ✅ Automatic OpenAPI Generation: Converts MCP tools to OpenAPI 3.0.3 specification
- ✅ OpenWebUI Compatible: Direct integration without MCPO proxy
- ✅ Real-time Tool Discovery: Dynamically includes tools from connected MCP servers
- ✅ Dual Parameter Support: Supports both GET (query params) and POST (JSON body) for tool execution
- ✅ No Authentication Required: OpenAPI endpoints are public for easy integration
- ✅ Comprehensive Metadata: Full OpenAPI specification with proper schemas and documentation
API Endpoints
OpenAPI Specification
Custom API title
Custom API description
Custom API version
Custom server URL
Include disabled tools
Comma-separated list of server names to include
Available Servers
Tool Statistics
Tool Execution
The name of the MCP server
The name of the tool to execute
OpenWebUI Integration
To integrate MCPHub with OpenWebUI:1
Start MCPHub
Ensure MCPHub is running with your MCP servers configured
2
Get OpenAPI Specification
3
Add to OpenWebUI
Import the OpenAPI specification file or point to the URL directly in OpenWebUI
Configuration Example
In OpenWebUI, you can add MCPHub as an OpenAPI tool by using:OpenAPI URL
http://localhost:3000/api/openapi.json
Base URL
http://localhost:3000/api
Generated OpenAPI Structure
The generated OpenAPI specification includes:Tool Conversion Logic
- Simple tools (≤10 primitive parameters) → GET endpoints with query parameters
- Complex tools (objects, arrays, or >10 parameters) → POST endpoints with JSON request body
- All tools include comprehensive response schemas and error handling
Example Generated Operation
Security
- Bearer authentication is defined but not enforced for tool execution endpoints
- Enables flexible integration with various OpenAPI-compatible systems
Benefits over MCPO
Direct Integration
No need for intermediate proxy
Real-time Updates
OpenAPI spec updates automatically as MCP servers connect/disconnect
Better Performance
Direct tool execution without proxy overhead
Simplified Architecture
One less component to manage
Troubleshooting
OpenAPI spec shows no tools
OpenAPI spec shows no tools
Ensure MCP servers are connected. Check
/api/openapi/stats
for server status.Tool execution fails
Tool execution fails
Verify the tool name and parameters match the OpenAPI specification. Check server logs for details.
OpenWebUI can't connect
OpenWebUI can't connect
Ensure MCPHub is accessible from OpenWebUI and the OpenAPI URL is correct.
Missing tools in specification
Missing tools in specification
Check if tools are enabled in your MCP server configuration. Use
includeDisabled=true
to see all tools.