FAQ
π Q: Why isn't my local OpenAPI tool server accessible from the WebUI interface?β
A: If you added the server under your own Settings β Integrations, the browser calls it directly, so a tool server on http://localhost:8000 is subject to CORS (Cross-Origin Resource Sharing). Global tool servers added in Admin Settings are called by the Open WebUI backend instead, and CORS never applies to them.
Make sure to explicitly enable CORS headers in your OpenAPI server. For example, if you're using FastAPI, you can add:
from fastapi.middleware.cors import CORSMiddleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # or specify your client origin
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)Also, if Open WebUI is served over HTTPS (e.g., https://yourdomain.com), your local server must meet one of the following conditions:
- Be accessed from the same domain using HTTPS (e.g., https://localhost:8000).
- OR run on localhost (127.0.0.1) to allow browsers to relax security for local development.
- Otherwise, browsers may block insecure requests from HTTPS pages to HTTP APIs due to mixed-content rules.
To work securely in production over HTTPS, your OpenAPI servers must also be served over HTTPS.
π Q: Do I need to use FastAPI for my server implementation?β
A: No! While our reference implementations are written using FastAPI for clarity and ease of use, you can use any framework or language that produces a valid OpenAPI (Swagger) specification. Some common choices include:
- FastAPI (Python)
- Flask + Flask-RESTX (Python)
- Express + Swagger UI (JavaScript/Node)
- Spring Boot (Java)
- Go with Swag or Echo
The key is to ensure your server exposes a valid OpenAPI schema, and that it communicates over HTTP(S). It is important to set a custom operationId for all endpoints.
π Q: Why choose OpenAPI over MCP?β
A: OpenAPI wins over MCP in most real-world scenarios due to its simplicity, tooling ecosystem, stability, and developer-friendliness. Here's why:
-
β β―Reuse Your Existing Code: If youβve built REST APIs before, you're mostly done: you donβt need to rewrite your logic. Just define a compliant OpenAPI spec and expose your current code as a tool server.
With MCP, you had to reimplement your tool logic inside a custom protocol layer, duplicating work and increasing the surface area to maintain.
-
πΌβ―Less to Maintain & Debug: OpenAPI fits naturally into modern dev workflows. You can test endpoints with Postman, inspect logs with built-in APIs, troubleshoot easily with mature ecosystem tools, and often without modifying your core app at all.
MCP introduced new layers of transport, schema parsing, and runtime quirks, all of which had to be debugged manually.
-
π Standards-Based: OpenAPI is widely adopted across the tech industry. Its well-defined structure means tools, agents, and servers can interoperate immediately, without needing special bridges or translations.
-
π§° Better Tooling: Thereβs an entire universe of tools that support OpenAPI: automatic client/server generation, documentation, validation, mocking, testing, and even security audit tools.
-
π First-Class Security Support: OpenAPI includes native support for things like OAuth2, JWTs, API Keys, and HTTPS, making it easier to build secure endpoints with common libraries and standards.
-
π§ More Devs Already Know It: Using OpenAPI means you're speaking a language already familiar to backend teams, frontend developers, DevOps, and product engineers. Thereβs no learning curve or costly onboarding required.
-
π Future-Proof & Extensible: OpenAPI evolves with API standards and is designed for forward compatibility. MCP, by contrast, was less standardized, often requiring changes as the surrounding ecosystem changed.
π§΅ Bottom line: OpenAPI lets you do more with less effort, less code duplication, and fewer surprises. Itβs a production-ready, developer-friendly route to powering LLM tools, without rebuilding everything from scratch.
π Q: How do I secure my OpenAPI tool server?β
A: OpenAPI supports industry-standard security mechanisms like:
- OAuth 2.0
- API Key headers
- JWT (JSON Web Token)
- Basic Auth
Use HTTPS in production to encrypt data in transit, and restrict endpoints with proper auth/authz methods as appropriate. You can incorporate these directly in your OpenAPI schema using the securitySchemes field.
β Q: What kind of tools can I build using OpenAPI tool servers?β
A: If it can be exposed via a REST API, you can build it. Common tool types include:
- Filesystem operations (read/write files, list directories)
- Git and document repository access
- Database querying or schema exploration
- Web scrapers or summarizers
- External SaaS integrations (e.g., Salesforce, Jira, Slack)
- LLM-attached memory stores / RAG components
- Secure internal microservices exposed to your agent