feat: /docs/openapi.json to include Tools Array #117

Open
opened 2026-02-15 21:14:57 -05:00 by yindo · 4 comments
Owner

Originally created by @daryltucker on GitHub (Sep 29, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

When you GET openapi.json on the root, it's such a tease!

{
  "openapi": "3.1.0",
  "info": {
    "title": "MCP OpenAPI Proxy",
    "description": "Automatically generated API from MCP Tool Schemas\n\n- **available tools**:\n    - [memory](/memory/docs)\n    - [time](/time/docs)\n    - [fetch](/fetch/docs)\n    - [sequential-thinking](/sequential-thinking/docs)\n    - [MongoDB](/MongoDB/docs)\n    - [git-mcp-docs](/git-mcp-docs/docs)\n    - [awslabs.aws-documentation-mcp-server](/awslabs.aws-documentation-mcp-server/docs)\n    - [json-mcp-server](/json-mcp-server/docs)",
    "version": "1.0"
  },
  "paths": {}
}

Desired Solution you'd like

{
  "openapi": "3.1.0",
  "info": {
    "title": "MCP OpenAPI Proxy",
    "description": "Automatically generated API from MCP Tool Schemas\n\n- **available tools**:\n    - [memory](/memory/docs)\n    - [time](/time/docs)\n    - [fetch](/fetch/docs)\n    - [sequential-thinking](/sequential-thinking/docs)\n    - [MongoDB](/MongoDB/docs)\n    - [git-mcp-docs](/git-mcp-docs/docs)\n    - [awslabs.aws-documentation-mcp-server](/awslabs.aws-documentation-mcp-server/docs)\n    - [json-mcp-server](/json-mcp-server/docs)",
    "tools": {
      "time": "/time/docs",
      "memory": "/memory/docs",
      ...
      "json-mcp-server": "/json-mcp-server/docs",
    }
    "version": "1.0"
  },
  "paths": {}
}

Alternatives Considered

I can't imagine this isn't already standardized somewhere, or available somehow, but I haven't been able to find the information to make this happen. If mcpo already has the ability to hand out a list (that can be properly iterated over), please point me in the right direction.

Additional Context

The idea is that I want to set up an MCP Server (ie: mcpo), and be able to do auto-discovery on the available tools.
The first step in that process would be to determine which tools are available, and how to interact with them (ie: Name and Documentation Location).

  1. This would help allow Open WebUI in allowing easier adding of MCP Servers, and not having to add each endpoint individually.
  2. This would allow non-Open WebUI 'clients' to leverage the power and ease-of-use of mcpo.
  3. This would allow users using clients that do not support auto-discovery, to use tooling against the server to auto-generate available tools (ie: Claude-style .json).
Originally created by @daryltucker on GitHub (Sep 29, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description When you GET `openapi.json` on the root, it's such a tease! ```json { "openapi": "3.1.0", "info": { "title": "MCP OpenAPI Proxy", "description": "Automatically generated API from MCP Tool Schemas\n\n- **available tools**:\n - [memory](/memory/docs)\n - [time](/time/docs)\n - [fetch](/fetch/docs)\n - [sequential-thinking](/sequential-thinking/docs)\n - [MongoDB](/MongoDB/docs)\n - [git-mcp-docs](/git-mcp-docs/docs)\n - [awslabs.aws-documentation-mcp-server](/awslabs.aws-documentation-mcp-server/docs)\n - [json-mcp-server](/json-mcp-server/docs)", "version": "1.0" }, "paths": {} } ``` ### Desired Solution you'd like ```json { "openapi": "3.1.0", "info": { "title": "MCP OpenAPI Proxy", "description": "Automatically generated API from MCP Tool Schemas\n\n- **available tools**:\n - [memory](/memory/docs)\n - [time](/time/docs)\n - [fetch](/fetch/docs)\n - [sequential-thinking](/sequential-thinking/docs)\n - [MongoDB](/MongoDB/docs)\n - [git-mcp-docs](/git-mcp-docs/docs)\n - [awslabs.aws-documentation-mcp-server](/awslabs.aws-documentation-mcp-server/docs)\n - [json-mcp-server](/json-mcp-server/docs)", "tools": { "time": "/time/docs", "memory": "/memory/docs", ... "json-mcp-server": "/json-mcp-server/docs", } "version": "1.0" }, "paths": {} } ``` ### Alternatives Considered I can't imagine this isn't already standardized somewhere, or available somehow, but I haven't been able to find the information to make this happen. If `mcpo` already has the ability to hand out a list (that can be properly iterated over), please point me in the right direction. ### Additional Context The idea is that I want to set up an MCP Server (ie: `mcpo`), and be able to do auto-discovery on the available tools. The first step in that process would be to determine which tools are available, and how to interact with them (ie: Name and Documentation Location). 1. This would help allow Open WebUI in allowing easier adding of MCP Servers, and not having to add each endpoint individually. 2. This would allow non-Open WebUI 'clients' to leverage the power and ease-of-use of `mcpo`. 3. This would allow users using clients that do not support auto-discovery, to use tooling against the server to auto-generate available tools (ie: Claude-style `.json`).
Author
Owner

@daryltucker commented on GitHub (Sep 30, 2025):

https://gist.github.com/daryltucker/2e6c2b20149ddf4f310efbea60fd88ad

@daryltucker commented on GitHub (Sep 30, 2025): https://gist.github.com/daryltucker/2e6c2b20149ddf4f310efbea60fd88ad
Author
Owner

@taylorwilsdon commented on GitHub (Oct 18, 2025):

Those aren't tools, they're paths to tools - if it exposed it as tools, open-webui would try to invoke the tools directly from /openapi.json which will never work.

@taylorwilsdon commented on GitHub (Oct 18, 2025): Those aren't tools, they're paths to tools - if it exposed it as tools, open-webui would try to invoke the tools directly from /openapi.json which will never work.
Author
Owner

@ChinthapalliNikhithaChandana commented on GitHub (Nov 14, 2025):

Those aren't tools, they're paths to tools - if it exposed it as tools, open-webui would try to invoke the tools directly from /openapi.json which will never work.

Is this issue resolved? I'm having the same issue with paths being returned empty {}

@ChinthapalliNikhithaChandana commented on GitHub (Nov 14, 2025): > Those aren't tools, they're paths to tools - if it exposed it as tools, open-webui would try to invoke the tools directly from /openapi.json which will never work. Is this issue resolved? I'm having the same issue with paths being returned empty {}
Author
Owner

@karoldydo commented on GitHub (Dec 4, 2025):

Well, I came here with the same issue - but I've a solution for you!

First, when you define the config.json file, for example:

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=Europe/Warsaw"]
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "git": {
      "command": "uvx",
      "args": ["mcp-server-git"]
    },
    "web-search-prime": {
      "type": "streamable-http",
      "url": "https://api.z.ai/api/mcp/web_search_prime/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_Z_AI_TOKEN_HERE"
      }
    },
    "web-reader": {
      "type": "streamable-http",
      "url": "https://api.z.ai/api/mcp/web_reader/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_Z_AI_TOKEN_HERE"
      }
    },
    "zai-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@z_ai/mcp-server"],
      "env": {
        "Z_AI_API_KEY": "YOUR_Z_AI_TOKEN_HERE",
        "Z_AI_MODE": "ZAI"
      }
    }
  }
}

This means, the mcpo is creating for every single MCP server a different api endpoints, for this above config.json file it will be:

http://mcpo:8000/time/
http://mcpo:8000/memory/
http://mcpo:8000/git/
http://mcpo:8000/web-search-prime/
http://mcpo:8000/web-reader/
http://mcpo:8000/zai-mcp-server/

Next - in Open WebUI you need to setup a variable TOOL_SERVER_CONNECTIONS, for example:

[
   {
      "type":"openapi",
      "url":"http://mcpo:8000/time",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-time",
         "name":"Time Tools",
         "description":"MCP time server - current time and timezone conversion"
      }
   },
   {
      "type":"openapi",
      "url":"http://mcpo:8000/memory",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-memory",
         "name":"Memory Tools",
         "description":"MCP memory server - knowledge graph operations"
      }
   },
   {
      "type":"openapi",
      "url":"http://mcpo:8000/git",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-git",
         "name":"Git Tools",
         "description":"MCP git server - git operations"
      }
   },
   {
      "type":"openapi",
      "url":"http://mcpo:8000/web-search-prime",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-web-search",
         "name":"Web Search Prime",
         "description":"MCP web search - search the internet with Z.ai"
      }
   },
   {
      "type":"openapi",
      "url":"http://mcpo:8000/web-reader",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-web-reader",
         "name":"Web Reader",
         "description":"MCP web reader - fetch and read web pages with Z.ai"
      }
   },
   {
      "type":"openapi",
      "url":"http://mcpo:8000/zai-mcp-server",
      "spec_type":"url",
      "spec":"",
      "path":"openapi.json",
      "auth_type":"none",
      "key":"",
      "config":{
         "enable":true
      },
      "info":{
         "id":"mcpo-vision",
         "name":"Vision Tools",
         "description":"MCP vision server - image and video analysis with Z.ai"
      }
   }
]

Remember that the variable in the .env must be inlined:

# Tool server connections for Open WebUI (JSON array format)
# Full schema required: type, url, spec_type, spec, path, auth_type, key, config, info
# Each MCPO MCP server is mounted on a separate path and registered as an individual tool server
TOOL_SERVER_CONNECTIONS=[{"type":"openapi","url":"http://mcpo:8000/time","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-time","name":"Time Tools","description":"MCP time server - current time and timezone conversion"}},{"type":"openapi","url":"http://mcpo:8000/memory","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-memory","name":"Memory Tools","description":"MCP memory server - knowledge graph operations"}},{"type":"openapi","url":"http://mcpo:8000/git","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-git","name":"Git Tools","description":"MCP git server - git operations"}},{"type":"openapi","url":"http://mcpo:8000/web-search-prime","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-web-search","name":"Web Search Prime","description":"MCP web search - search the internet with Z.ai"}},{"type":"openapi","url":"http://mcpo:8000/web-reader","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-web-reader","name":"Web Reader","description":"MCP web reader - fetch and read web pages with Z.ai"}},{"type":"openapi","url":"http://mcpo:8000/zai-mcp-server","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-vision","name":"Vision Tools","description":"MCP vision server - image and video analysis with Z.ai"}}]

Or add each endpoint manually in the "External Tools".

@karoldydo commented on GitHub (Dec 4, 2025): Well, I came here with the same issue - but I've a solution for you! First, when you define the `config.json` file, for example: ```json { "mcpServers": { "time": { "command": "uvx", "args": ["mcp-server-time", "--local-timezone=Europe/Warsaw"] }, "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] }, "git": { "command": "uvx", "args": ["mcp-server-git"] }, "web-search-prime": { "type": "streamable-http", "url": "https://api.z.ai/api/mcp/web_search_prime/mcp", "headers": { "Authorization": "Bearer YOUR_Z_AI_TOKEN_HERE" } }, "web-reader": { "type": "streamable-http", "url": "https://api.z.ai/api/mcp/web_reader/mcp", "headers": { "Authorization": "Bearer YOUR_Z_AI_TOKEN_HERE" } }, "zai-mcp-server": { "type": "stdio", "command": "npx", "args": ["-y", "@z_ai/mcp-server"], "env": { "Z_AI_API_KEY": "YOUR_Z_AI_TOKEN_HERE", "Z_AI_MODE": "ZAI" } } } } ``` This means, the `mcpo` is creating for every single MCP server a different api endpoints, for this above `config.json` file it will be: ```text http://mcpo:8000/time/ http://mcpo:8000/memory/ http://mcpo:8000/git/ http://mcpo:8000/web-search-prime/ http://mcpo:8000/web-reader/ http://mcpo:8000/zai-mcp-server/ ``` Next - in Open WebUI you need to setup a variable `TOOL_SERVER_CONNECTIONS`, for example: ```json [ { "type":"openapi", "url":"http://mcpo:8000/time", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-time", "name":"Time Tools", "description":"MCP time server - current time and timezone conversion" } }, { "type":"openapi", "url":"http://mcpo:8000/memory", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-memory", "name":"Memory Tools", "description":"MCP memory server - knowledge graph operations" } }, { "type":"openapi", "url":"http://mcpo:8000/git", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-git", "name":"Git Tools", "description":"MCP git server - git operations" } }, { "type":"openapi", "url":"http://mcpo:8000/web-search-prime", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-web-search", "name":"Web Search Prime", "description":"MCP web search - search the internet with Z.ai" } }, { "type":"openapi", "url":"http://mcpo:8000/web-reader", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-web-reader", "name":"Web Reader", "description":"MCP web reader - fetch and read web pages with Z.ai" } }, { "type":"openapi", "url":"http://mcpo:8000/zai-mcp-server", "spec_type":"url", "spec":"", "path":"openapi.json", "auth_type":"none", "key":"", "config":{ "enable":true }, "info":{ "id":"mcpo-vision", "name":"Vision Tools", "description":"MCP vision server - image and video analysis with Z.ai" } } ] ``` Remember that the variable in the `.env` must be inlined: ```text # Tool server connections for Open WebUI (JSON array format) # Full schema required: type, url, spec_type, spec, path, auth_type, key, config, info # Each MCPO MCP server is mounted on a separate path and registered as an individual tool server TOOL_SERVER_CONNECTIONS=[{"type":"openapi","url":"http://mcpo:8000/time","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-time","name":"Time Tools","description":"MCP time server - current time and timezone conversion"}},{"type":"openapi","url":"http://mcpo:8000/memory","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-memory","name":"Memory Tools","description":"MCP memory server - knowledge graph operations"}},{"type":"openapi","url":"http://mcpo:8000/git","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-git","name":"Git Tools","description":"MCP git server - git operations"}},{"type":"openapi","url":"http://mcpo:8000/web-search-prime","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-web-search","name":"Web Search Prime","description":"MCP web search - search the internet with Z.ai"}},{"type":"openapi","url":"http://mcpo:8000/web-reader","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-web-reader","name":"Web Reader","description":"MCP web reader - fetch and read web pages with Z.ai"}},{"type":"openapi","url":"http://mcpo:8000/zai-mcp-server","spec_type":"url","spec":"","path":"openapi.json","auth_type":"none","key":"","config":{"enable":true},"info":{"id":"mcpo-vision","name":"Vision Tools","description":"MCP vision server - image and video analysis with Z.ai"}}] ``` Or add each endpoint manually in the "External Tools".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/mcpo#117