-
Notifications
You must be signed in to change notification settings - Fork 662
Description
Describe the bug
can't run within mcpo, it crashes
Expected Behavior
run within mcpo wrapper
Current Behavior
mcpo | INFO: Waiting for application startup.
mcpo | Downloading pydantic-core (1.8MiB)
mcpo | Downloading tokenizers (2.9MiB)
mcpo | Downloading sympy (6.0MiB)
mcpo | Downloading hf-xet (2.9MiB)
mcpo | Downloading lxml (4.8MiB)
mcpo | Downloading scipy (31.7MiB)
mcpo | Downloading botocore (13.2MiB)
mcpo | Downloading torch (94.4MiB)
mcpo | Downloading scikit-learn (8.9MiB)
mcpo | Downloading awslabs-aws-api-mcp-server (62.7MiB)
mcpo | Downloading awscli (4.5MiB)
mcpo | Downloading numpy (13.6MiB)
mcpo | Downloading faiss-cpu (3.6MiB)
mcpo | Downloading pillow (5.7MiB)
mcpo | Downloading networkx (1.9MiB)
mcpo | Downloading transformers (10.3MiB)
mcpo | Downloading setuptools (1.1MiB)
mcpo | Downloading pydantic-core
mcpo | Downloading setuptools
mcpo | Downloading tokenizers
mcpo | Downloading hf-xet
mcpo | Downloading networkx
mcpo | Downloading faiss-cpu
mcpo | Downloading lxml
mcpo | Downloading pillow
mcpo | Downloading sympy
mcpo | Downloading scikit-learn
mcpo | Downloading transformers
mcpo | Downloading numpy
mcpo | Downloading botocore
mcpo | Downloading scipy
mcpo | Downloading awscli
mcpo | Downloading awslabs-aws-api-mcp-server
mcpo | Downloading torch
mcpo | Installed 71 packages in 222ms
mcpo | ERROR: + Exception Group Traceback (most recent call last):
mcpo | | File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 692, in lifespan
mcpo | | async with self.lifespan_context(app) as maybe_state:
mcpo | | File "/usr/lib/python3.11/contextlib.py", line 204, in aenter
mcpo | | return await anext(self.gen)
mcpo | | ^^^^^^^^^^^^^^^^^^^^^
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/main.py", line 102, in lifespan
mcpo | | await stack.enter_async_context(
mcpo | | File "/usr/lib/python3.11/contextlib.py", line 638, in enter_async_context
mcpo | | result = await _enter(cm)
mcpo | | ^^^^^^^^^^^^^^^^
mcpo | | File "/usr/lib/python3.11/contextlib.py", line 204, in aenter
mcpo | | return await anext(self.gen)
mcpo | | ^^^^^^^^^^^^^^^^^^^^^
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/main.py", line 114, in lifespan
mcpo | | async with stdio_client(server_params) as (reader, writer):
mcpo | | File "/usr/lib/python3.11/contextlib.py", line 222, in aexit
mcpo | | await self.gen.athrow(typ, value, traceback)
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcp/client/stdio/init.py", line 172, in stdio_client
mcpo | | async with (
mcpo | | File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
mcpo | | raise BaseExceptionGroup(
mcpo | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
mcpo | +-+---------------- 1 ----------------
mcpo | | Exception Group Traceback (most recent call last):
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcp/client/stdio/init.py", line 179, in stdio_client
mcpo | | yield read_stream, write_stream
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/main.py", line 115, in lifespan
mcpo | | async with ClientSession(reader, writer) as session:
mcpo | | File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
mcpo | | raise BaseExceptionGroup(
mcpo | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
mcpo | +-+---------------- 1 ----------------
mcpo | | Traceback (most recent call last):
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/main.py", line 117, in lifespan
mcpo | | await create_dynamic_endpoints(app, api_dependency=api_dependency)
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/main.py", line 62, in create_dynamic_endpoints
mcpo | | response_model_fields = get_model_fields(
mcpo | | ^^^^^^^^^^^^^^^^^
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 236, in get_model_fields
mcpo | | python_type_hint, pydantic_field_info = _process_schema_property(
mcpo | | ^^^^^^^^^^^^^^^^^^^^^^^^^
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 126, in _process_schema_property
mcpo | | type_hint, _ = _process_schema_property(
mcpo | | ^^^^^^^^^^^^^^^^^^^^^^^^^
mcpo | | File "/app/.venv/lib/python3.11/site-packages/mcpo/utils/main.py", line 112, in _process_schema_property
mcpo | | assert ref in schema_defs, "Custom field not found"
mcpo | | ^^^^^^^^^^^^^^^^^^
mcpo | | TypeError: argument of type 'NoneType' is not iterable
mcpo | +------------------------------------
mcpo |
mcpo | ERROR: Application startup failed. Exiting.
mcpo | Starting MCP OpenAPI Proxy with config file: /app/config/config.json
Reproduction Steps
executing mcpo with this config:
{
"mcpServers": {
"awslabs.aws-api-mcp-server": {
"command": "uvx",
"args": [
"awslabs.aws-api-mcp-server@latest"
],
"env": {
"AWS_REGION": "us-east-1"
},
"disabled": false,
"autoApprove": []
},
"aws_knowledge": {
"type": "streamable_http",
"url": "https://knowledge-mcp.global.api.aws"
}
}
}
Possible Solution
No response
Additional Information/Context
No response
OS
macos but running within a container
Dockerfile:
FROM ghcr.io/open-webui/mcpo:main
update apt
RUN apt-get update
Install pip
RUN apt-get install -y python3-pip procps gh
Install aws-api-mcp-server
RUN pip install awslabs.aws-api-mcp-server awscli
Install Node.js + npx (per tool JS come @modelcontextprotocol/server-memory)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&
apt-get install -y nodejs
Just confirm versions
RUN node -v && npm -v && npx -v
Docker compose:
services:
mcpo:
build:
context: .
dockerfile: Dockerfile.mcpo
container_name: mcpo
ports:
- "8000:8000"
volumes:
- ./config.json:/app/config/config.json:ro
- ~/.aws:/root/.aws:ro
- ~/.ssh:/root/.ssh:ro
command:
- --host
- "0.0.0.0"
- --port
- "8000"
- --cors-allow-origins
- "*"
- --config
- "/app/config/config.json"
Server
aws-api-mcp-server
Server Version
latest
Region experiencing the issue
eu-central-1 (but is is indipendent)
Other information
No response
Service quota
- I have reviewed the service quotas for this construct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status