Check Existing Issues
mcpo Version
v0.0.20
Open WebUI Version (if applicable)
N/A
Operating System
Docker (Linux Container)
Browser (if applicable)
N/A
Confirmation
Expected Behavior
mcpo should start successfully and expose @brave/brave-search-mcp-server tools via OpenAPI, just like it does for other MCP servers.
Actual Behavior
mcpo crashes during startup when parsing the Brave server's tool schemas. The _process_schema_property function receives a list object where it expects a dict, causing:
AttributeError: 'list' object has no attribute 'get'
The server fails to connect and mcpo logs it in the startup summary.
Steps to Reproduce
- Add the current latest Brave package to an mcpo config:
"brave": {
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server"],
"env": { "BRAVE_API_KEY": "..." }
}
- Start mcpo.
- Wait for mcpo to reach the Brave server during initialization.
- Observe the
AttributeError crash in logs.
Logs & Screenshots
Full traceback:
2026-05-16 07:55:35,024 - ERROR - Failed to connect to MCP server 'brave-search-mcp-server': AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/mcpo/main.py", line 719, in lifespan
await create_dynamic_endpoints(app, api_dependency=api_dependency)
File "/app/.venv/lib/python3.12/site-packages/mcpo/main.py", line 546, in create_dynamic_endpoints
response_model_fields = get_model_fields(
^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/mcpo/utils/main.py", line 253, in get_model_fields
python_type_hint, pydantic_field_info = _process_schema_property(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/mcpo/utils/main.py", line 221, in _process_schema_property
item_type_hint, _ = _process_schema_property(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/mcpo/utils/main.py", line 183, in _process_schema_property
nested_type_hint, nested_pydantic_field = _process_schema_property(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/mcpo/utils/main.py", line 221, in _process_schema_property
item_type_hint, _ = _process_schema_property(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/mcpo/utils/main.py", line 126, in _process_schema_property
prop_type = prop_schema.get("type")
^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'get'
Workaround that works: pin to 1.3.7 and force stdio:
"args": ["-y", "@brave/brave-search-mcp-server@1.3.7", "--transport", "stdio"]
Additional Information
The crash occurs because _process_schema_property types its prop_schema parameter as Dict[str, Any] and calls .get("type") unconditionally. However, valid JSON Schema Draft 7 allows items to be either a single schema object or an array of schema objects (tuple validation). When mcpo recurses into the latter, it passes a Python list back into _process_schema_property, triggering the AttributeError.
Suggested fix: add an isinstance(items_schema, list) guard in the prop_type == "array" branch inside mcpo/utils/main.py.
Check Existing Issues
mcpo Version
v0.0.20
Open WebUI Version (if applicable)
N/A
Operating System
Docker (Linux Container)
Browser (if applicable)
N/A
Confirmation
README.md.Expected Behavior
mcpo should start successfully and expose
@brave/brave-search-mcp-servertools via OpenAPI, just like it does for other MCP servers.Actual Behavior
mcpo crashes during startup when parsing the Brave server's tool schemas. The
_process_schema_propertyfunction receives alistobject where it expects adict, causing:The server fails to connect and mcpo logs it in the startup summary.
Steps to Reproduce
AttributeErrorcrash in logs.Logs & Screenshots
Full traceback:
Workaround that works: pin to
1.3.7and force stdio:Additional Information
The crash occurs because
_process_schema_propertytypes itsprop_schemaparameter asDict[str, Any]and calls.get("type")unconditionally. However, valid JSON Schema Draft 7 allowsitemsto be either a single schema object or an array of schema objects (tuple validation). When mcpo recurses into the latter, it passes a Pythonlistback into_process_schema_property, triggering theAttributeError.Suggested fix: add an
isinstance(items_schema, list)guard in theprop_type == "array"branch insidemcpo/utils/main.py.