Replies: 2 comments
-
with: --api-key xxxxx for instance i have this Dockerfile for mcpo proxy: FROM python:3.11-slim
# Install uv globally
RUN pip install -U uv
# Install dependencies
RUN pip install mcpo mcp-server-time
# Set working directory and copy addon files
WORKDIR /app/mcp-addition
COPY mcp-addition/addition_server.py ./
COPY mcp-addition/pyproject.toml ./
# Install custom package in editable mode
RUN pip install .
# Set working directory and copy configuration files
WORKDIR /app
COPY mcpo_config.json ./
COPY .env ./
EXPOSE 8000
# Start the server with configuration and API key
CMD uvx mcpo --host 0.0.0.0 --port 8000 --config mcpo_config.json --api-key ${MCP_API_KEY} mcpo_config.json {
"mcpServers": {
"addition": {
"command": "python",
"args": ["/app/mcp-addition/addition_server.py"]
},
"time": {
"command": "uvx",
"args": ["mcp-server-time", "--local-timezone=America/New_York"]
}
}
} .env then in docker-compose.yml, you can link .env file: mcp-proxy-server:
build: ./mcp-proxy-server/
container_name: mcp-proxy-server
ports:
- "127.0.0.1:8000:8000"
env_file:
- ./mcp-proxy-server/.env
restart: unless-stopped I don't really know how to use the docker command directly, but i assume something similar would also be possible without using docker compose. |
Beta Was this translation helpful? Give feedback.
0 replies
-
oh i see you probable didn't mean an API key for MCPO itself.. but just some other environment variable.. well you can also put that in the .env file.. but its more a Docker thing, and has nothing to do with MCPO. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, how can I pass in the corresponding key through a command for something like this with env
{ "mcpServers": { "baidu-maps": { "command": "uvx", "args": [ "mcp-server-baidu-maps" ], "env": { "BAIDU_MAPS_API_KEY": "xxx" } } } }
Is that so?
Beta Was this translation helpful? Give feedback.
All reactions