[GH-ISSUE #66] issue: Environment variable configuration is not taking effect. #31

Open
opened 2026-10-18 21:10:38 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @cvporter on GitHub (Apr 11, 2025).
Original GitHub issue: https://github.com/open-webui/mcpo/issues/66

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of mcpo.

mcpo Version

v0.0.10

Open WebUI Version (if applicable)

No response

Operating System

Windows 10

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both MCPO and Open WebUI.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Using configuration files or --env parameters to set environment variables

Actual Behavior

Using configuration files or --env parameters to set environment variables does not take effect.

Steps to Reproduce

  1. config tavily.json
{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp"
      ],
      "env": {
        "TAVILY_API_KEY": "tvly-dev-pkqxxxxxxxxxxxxxxxxxxxxxkj"
      }
    }
  }
}
  1. start cmpo
mcpo --config tavily.json
Starting MCP OpenAPI Proxy with config file: tavily.json
INFO:     Started server process [6736]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  1. access the API using the docs webpage
{
  "detail": {
    "message": "Unexpected error",
    "error": "500: {'message': 'Tavily API error: Request failed with status code 400'}"
  }
}

Logs & Screenshots

Image

Image

Image

Additional Information

No response

Originally created by @cvporter on GitHub (Apr 11, 2025). Original GitHub issue: https://github.com/open-webui/mcpo/issues/66 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of mcpo. ### mcpo Version v0.0.10 ### Open WebUI Version (if applicable) _No response_ ### Operating System Windows 10 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** MCPO and Open WebUI. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Using configuration files or --env parameters to set environment variables ### Actual Behavior Using configuration files or --env parameters to set environment variables does not take effect. ### Steps to Reproduce 1. config tavily.json ``` { "mcpServers": { "tavily": { "command": "npx", "args": [ "-y", "tavily-mcp" ], "env": { "TAVILY_API_KEY": "tvly-dev-pkqxxxxxxxxxxxxxxxxxxxxxkj" } } } } ``` 2. start cmpo ``` mcpo --config tavily.json Starting MCP OpenAPI Proxy with config file: tavily.json INFO: Started server process [6736] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) ``` 3. access the API using the docs webpage ``` { "detail": { "message": "Unexpected error", "error": "500: {'message': 'Tavily API error: Request failed with status code 400'}" } } ``` ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/325bb1ab-bd60-407b-800f-16261f39b6f5) ![Image](https://github.com/user-attachments/assets/aec48178-71f1-4da0-8e83-b1de644a1a3b) ![Image](https://github.com/user-attachments/assets/a34fe529-f60e-49c6-b739-cb71c4f70337) ### Additional Information _No response_
Author
Owner

@tjbck commented on GitHub (Apr 11, 2025):

Unable to reproduce, envs don't seem to be the main cause of the issue here. PR welcome!

<!-- gh-comment-id:2797134251 --> @tjbck commented on GitHub (Apr 11, 2025): Unable to reproduce, envs don't seem to be the main cause of the issue here. PR welcome!
Author
Owner

@alexhilgart commented on GitHub (Apr 11, 2025):

You need to remove the env entry from your config file. Instead, pass the environment variable via the command line when running mcpo.

{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp"
      ]
    }
  }
}
mcpo --env "TAVILY_API_KEY=tvly-dev-pkqxxxxxxxxxxxxxxxxxxxxxkj" --config tavily.json

This works for me using the Perplexity MCP Server.

<!-- gh-comment-id:2797191169 --> @alexhilgart commented on GitHub (Apr 11, 2025): You need to remove the env entry from your config file. Instead, pass the environment variable via the command line when running mcpo. ```json { "mcpServers": { "tavily": { "command": "npx", "args": [ "-y", "tavily-mcp" ] } } } ``` ```bash mcpo --env "TAVILY_API_KEY=tvly-dev-pkqxxxxxxxxxxxxxxxxxxxxxkj" --config tavily.json ``` This works for me using the Perplexity MCP Server.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/mcpo#31
No description provided.