Skip to content

[BUG]: Few MCP servers are not supported - Error when adding gateway #2322

@BenjaminNechicattu

Description

@BenjaminNechicattu

🐞 Bug Summary

Few MCP servers are not supported. Raising error when trying to add gateway.

MCP Url : https://complex-tools-openapi-1.onrender.com/mcp/

Error is as given below :

Image

🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

Affects Watson Orchestrate Integrations.


🔁 Steps to Reproduce

  1. add add gateway with https://complex-tools-openapi-1.onrender.com/mcp/

🤔 Expected Behavior

What should have happened instead?
Gateway should have been created.


📓 Logs / Error Output

Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.

2026-01-22T06:12:13 - httpx - INFO - HTTP Request: POST https://complex-tools-openapi-1.onrender.com/mcp/ "HTTP/1.1 200 OK"
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - response_closed.started
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - response_closed.complete
2026-01-22T06:12:13 - mcp.client.streamable_http - DEBUG - Sending client message: root=JSONRPCRequest(method='tools/list', params=None, jsonrpc='2.0', id=1)
2026-01-22T06:12:13 - httpcore.connection - DEBUG - connect_tcp.started host='complex-tools-openapi-1.onrender.com' port=443 local_address=None timeout=30 socket_options=None
2026-01-22T06:12:13 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0xe0bd9136be00>
2026-01-22T06:12:13 - httpcore.connection - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0xe0bd901be3d0> server_hostname='complex-tools-openapi-1.onrender.com' timeout=30
2026-01-22T06:12:13 - httpcore.connection - DEBUG - start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0xe0bd9136bf80>
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'POST']>
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - send_request_headers.complete
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'POST']>
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - send_request_body.complete
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'POST']>
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Thu, 22 Jan 2026 06:12:13 GMT'), (b'Content-Type', b'application/json; charset=utf-8'), (b'Content-Length', b'901'), (b'Connection', b'keep-alive'), (b'CF-RAY', b'9c1ce5ff3b9f9e38-SIN'), (b'access-control-allow-credentials', b'true'), (b'access-control-allow-origin', b'*'), (b'Content-Encoding', b'br'), (b'etag', b'W/"a76-aityqdS5sz/Wqk/Mw35Yr4tmkUw"'), (b'rndr-id', b'9db05182-c994-4ee2'), (b'vary', b'Accept-Encoding'), (b'x-powered-by', b'Express'), (b'x-render-origin-server', b'Render'), (b'cf-cache-status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'alt-svc', b'h3=":443"; ma=86400')])
2026-01-22T06:12:13 - httpx - INFO - HTTP Request: POST https://complex-tools-openapi-1.onrender.com/mcp/ "HTTP/1.1 200 OK"
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'POST']>
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - receive_response_body.complete
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - response_closed.started
2026-01-22T06:12:13 - httpcore.http11 - DEBUG - response_closed.complete
2026-01-22T06:12:13 - mcpgateway.services.gateway_service - INFO - Fetched 2 tools from gateway
2026-01-22T06:12:13 - httpcore.connection - DEBUG - close.started
2026-01-22T06:12:13 - httpcore.connection - DEBUG - close.complete
2026-01-22T06:12:13 - mcpgateway.services.gateway_service - ERROR - ValueErrors in group: (ValueError("Invalid tool input schema: {'type': 'object', 'required': ['name', 'sku', 'quantity', 'price'], 'properties': {'name': {'type': 'string', 'description': 'Item name', 'minLength': 1, 'maxLength': 200}, 'sku': {'type': 'string', 'description': 'Stock Keeping Unit', 'pattern': '^[A-Z]{3}-[0-9]{3}$'}, 'quantity': {'type': 'integer', 'description': 'Quantity in stock', 'minimum': 0, 'maximum': 10000}, 'price': {'type': 'number', 'description': 'Unit price', 'minimum': 0, 'exclusiveMinimum': True}, 'category': {'type': 'string', 'description': 'Item category', 'enum': ['Electronics', 'Accessories', 'Furniture', 'Office Supplies']}, 'specifications': {'type': 'object', 'description': 'Nested specifications object', 'properties': {'brand': {'type': 'string', 'description': 'Brand name'}, 'model': {'type': 'string', 'description': 'Model number'}, 'warranty': {'type': 'string', 'description': 'Warranty period'}}}}} is not valid under any of the given schemas\n\nFailed validating 'anyOf' in metaschema['properties']['properties']['additionalProperties']['properties']['items']:\n    {'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/schemaArray'}],\n     'default': True}\n\nOn schema['properties']['items']['items']:\n    {'type': 'object',\n     'required': ['name', 'sku', 'quantity', 'price'],\n     'properties': {'name': {'type': 'string',\n                             'description': 'Item name',\n                             'minLength': 1,\n                             'maxLength': 200},\n                    'sku': {'type': 'string',\n                            'description': 'Stock Keeping Unit',\n                            'pattern': '^[A-Z]{3}-[0-9]{3}$'},\n                    'quantity': {'type': 'integer',\n                                 'description': 'Quantity in stock',\n                                 'minimum': 0,\n                                 'maximum': 10000},\n                    'price': {'type': 'number',\n                              'description': 'Unit price',\n                              'minimum': 0,\n                              'exclusiveMinimum': True},\n                    'category': {'type': 'string',\n                                 'description': 'Item category',\n                                 'enum': ['Electronics',\n                                          'Accessories',\n                                          'Furniture',\n                                          'Office Supplies']},\n                    'specifications': {'type': 'object',\n                                       'description': 'Nested '\n                                                      'specifications '\n                                                      'object',\n                                       'properties': {'brand': {'type': 'string',\n                                                                'description': 'Brand '\n                                                                               'name'},\n                                                      'model': {'type': 'string',\n                                                                'description': 'Model '\n                                                                               'number'},\n                                                      'warranty': {'type': 'string',\n                                                                   'description': 'Warranty '\n                                                                                  'period'}}}}}"),)
2026-01-22T06:12:13 - mcpgateway.services.structured_logger - ERROR - [gateway_service] Gateway creation failed due to validation error
2026-01-22T06:12:13 - mcpgateway.services.structured_logger - WARNING - [http_gateway] Request completed: POST /admin/gateways - 400
2026-01-22T06:12:13 - uvicorn.access - INFO - 172.17.0.1:36002 - "POST /admin/gateways HTTP/1.1" 400
2026-01-22T06:12:13 - uvicorn.error - ERROR - Exception in ASGI application
Traceback (most recent call last):
  File "/app/.venv/lib64/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/fastapi/applications.py", line 1135, in __call__
    await super().__call__(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/applications.py", line 107, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/mcpgateway/main.py", line 1433, in __call__
    response = await self.dispatch(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mcpgateway/middleware/token_scoping.py", line 784, in __call__
    return await call_next(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mcpgateway/main.py", line 1431, in call_next
    return await self._call_streamable_http(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mcpgateway/main.py", line 1484, in _call_streamable_http
    await self.application(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 198, in __call__
    raise app_exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/app/.venv/lib64/python3.12/site-packages/starlette_compress/__init__.py", line 92, in __call__
    return await self._zstd(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/starlette_compress/_zstd_legacy.py", line 100, in __call__
    await self.app(scope, receive, wrapper)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/cors.py", line 144, in simple_response
    await self.app(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/prometheus_fastapi_instrumentator/middleware.py", line 177, in __call__
    raise exc
  File "/app/.venv/lib64/python3.12/site-packages/prometheus_fastapi_instrumentator/middleware.py", line 175, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/app/.venv/lib64/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/routing.py", line 716, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/routing.py", line 736, in app
    await route.handle(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/routing.py", line 290, in handle
    await self.app(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/fastapi/routing.py", line 115, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/app/.venv/lib64/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/app/.venv/lib64/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/app/.venv/lib64/python3.12/site-packages/fastapi/routing.py", line 97, in app
    async with AsyncExitStack() as request_stack:
               ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/contextlib.py", line 754, in __aexit__
    raise exc_details[1]
  File "/usr/lib64/python3.12/contextlib.py", line 737, in __aexit__
    cb_suppress = await cb(*exc_details)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/contextlib.py", line 217, in __aexit__
    await anext(self.gen)
  File "/app/.venv/lib64/python3.12/site-packages/fastapi/concurrency.py", line 39, in contextmanager_in_threadpool
    await anyio.to_thread.run_sync(
  File "/app/.venv/lib64/python3.12/site-packages/anyio/to_thread.py", line 63, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2502, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/app/.venv/lib64/python3.12/site-packages/anyio/_backends/_asyncio.py", line 986, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/app/mcpgateway/db.py", line 5288, in get_db
    db.commit()
  File "/app/.venv/lib64/python3.12/site-packages/sqlalchemy/orm/session.py", line 2030, in commit
    trans.commit(_to_root=True)
  File "<string>", line 2, in commit
  File "/app/.venv/lib64/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 101, in _go
    self._raise_for_prerequisite_state(fn.__name__, current_state)
  File "/app/.venv/lib64/python3.12/site-packages/sqlalchemy/orm/session.py", line 971, in _raise_for_prerequisite_state
    raise sa_exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: Invalid tool input schema: {'type': 'object', 'required': ['name', 'sku', 'quantity', 'price'], 'properties': {'name': {'type': 'string', 'description': 'Item name', 'minLength': 1, 'maxLength': 200}, 'sku': {'type': 'string', 'description': 'Stock Keeping Unit', 'pattern': '^[A-Z]{3}-[0-9]{3}$'}, 'quantity': {'type': 'integer', 'description': 'Quantity in stock', 'minimum': 0, 'maximum': 10000}, 'price': {'type': 'number', 'description': 'Unit price', 'minimum': 0, 'exclusiveMinimum': True}, 'category': {'type': 'string', 'description': 'Item category', 'enum': ['Electronics', 'Accessories', 'Furniture', 'Office Supplies']}, 'specifications': {'type': 'object', 'description': 'Nested specifications object', 'properties': {'brand': {'type': 'string', 'description': 'Brand name'}, 'model': {'type': 'string', 'description': 'Model number'}, 'warranty': {'type': 'string', 'description': 'Warranty period'}}}}} is not valid under any of the given schemas

Failed validating 'anyOf' in metaschema['properties']['properties']['additionalProperties']['properties']['items']:
    {'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/schemaArray'}],
     'default': True}

On schema['properties']['items']['items']:
    {'type': 'object',
     'required': ['name', 'sku', 'quantity', 'price'],
     'properties': {'name': {'type': 'string',
                             'description': 'Item name',
                             'minLength': 1,
                             'maxLength': 200},
                    'sku': {'type': 'string',
                            'description': 'Stock Keeping Unit',
                            'pattern': '^[A-Z]{3}-[0-9]{3}$'},
                    'quantity': {'type': 'integer',
                                 'description': 'Quantity in stock',
                                 'minimum': 0,
                                 'maximum': 10000},
                    'price': {'type': 'number',
                              'description': 'Unit price',
                              'minimum': 0,
                              'exclusiveMinimum': True},
                    'category': {'type': 'string',
                                 'description': 'Item category',
                                 'enum': ['Electronics',
                                          'Accessories',
                                          'Furniture',
                                          'Office Supplies']},
                    'specifications': {'type': 'object',
                                       'description': 'Nested '
                                                      'specifications '
                                                      'object',
                                       'properties': {'brand': {'type': 'string',
                                                                'description': 'Brand '
                                                                               'name'},
                                                      'model': {'type': 'string',
                                                                'description': 'Model '
                                                                               'number'},
                                                      'warranty': {'type': 'string',
                                                                   'description': 'Warranty '
                                                                                  'period'}}}}} (Background on this error at: https://sqlalche.me/e/20/7s2a)
2026-01-22T06:12:17 - filelock - DEBUG - Attempting to acquire lock 247104815048000 on /tmp/gateway_service_leader.lock

🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit e.g. v0.9.0 or main@a1b2c3d
Runtime e.g. Python 3.11, Gunicorn
Platform / OS e.g. Ubuntu 22.04, macOS
Container e.g. Docker, Podman, none

🧩 Additional Context (optional)

Add any configuration details, flags, or related issues.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwxowxo integration

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions