``` "growthbook": { "command": "cmd", ...
# give-feedback
n
Copy code
"growthbook": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@growthbook/mcp@latest"
      ],
      "env": {
        "GB_API_KEY": "secret_MI_SECRET_KEY",
        "GB_API_URL": "DDD",
        "GB_APP_ORIGIN": "CCC",
        "GB_EMAIL": "BBB",
        "GB_USER": "AAA"
      }
    },
👀 1
s
Looks like this is on Windows?
n
Yes!!! Windows 11
Is any other feature or config I need to add in Windows or in mcp.json???
s
Do you use WSL by any chance? It's easiest to work there. Are you using other MCP servers in Windows?
n
Yes, I am using other mcp
and they working, example mcp for atlassian
and slack too
s
Thanks for the follow up. Are you self-hosted or on cloud? What if you try this for the config?
Copy code
"growthbook": {
      "command": "npx",
      "args": [
        "-y",
        "@growthbook/mcp@latest"
      ],
      "env": {
        "GB_API_KEY": "secret_MI_SECRET_KEY",
        "GB_API_URL": "DDD",
        "GB_APP_ORIGIN": "CCC",
        "GB_EMAIL": "BBB"
      }
    },
n
I will try this config and I give you feedback
Ryan sorry for this question: but how I know if I have a cloud or self-hosted in my profile??
s
Cloud is just using app.growthbook.io. Self-hosted would using our Docker on your infrastructure or using a local instance. If you're self-hosting, you don't need the API_URL or APP_ORIGIN values.
n
So in my case it is self-hosted, so I will try the config without those env and I give you feedback right now
No luck yet, this is the message:
Copy code
I'm encountering an authentication issue when trying to connect to GrowthBook. The system is returning a 401 (Unauthorized) error, indicating that the API key is either not configured correctly or is invalid.
I created a new key
in my case begin with "secret_........
image.png
Copy code
growthbook": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@growthbook/mcp@latest"
      ],
      "env": {
        "GB_API_KEY": "secret_........",
        "GB_EMAIL": "AAA",
        "GB_USER": "BBB"
      }
s
so, it's working now? It looks like it's connected with the tools?
n
yes but even that I get the same response 401 no authorize
in afternoon I wil try with other teammate with other operating system
Maybe changing the operating system will work. I'll give you feedback on what I manage to do. Thank you for your attention.
s
ok. that's a good sign. for me, it was working on Windows with the command I shared earlier. It does require Node to be installed on your system. Additionally, you only should use GB_EMAIL, not GB_USER.
n
Helow @strong-mouse-55694, I hope you are fine today.
I tried to replicate the same configuration on a Mac, and it keeps returning the same 401 Unauthorized message.
Perhaps the problem is that there are several users accessing the same account, but with different email addresses.
Initially, when the MCP was launched, using the GB_USER variable, it worked for me, but when I removed that variable and changed it to GB_EMAIL, that's when the 401 started returning.
s
Are you on the latest version? There was an earlier version where that would happen. And, are you using a PAT or an API key.
n
Good morning @strong-mouse-55694
s
Mornin' Juan
n
Fortunately, I was able to connect to the MCP yesterday. The difference was that I had to add the other two environment variables, and once they were set up, everything worked perfectly.
s
Beautiful. You mean the app and API URLs?
n
Yes it is!!!
After investigating and rereading what you had told me at the beginning, I realized that the GB_API_URL variable was necessary because it differs from what the documentation for Cloud users says.
s
What did that value end up being?
n
The documentation shows the following value: https://api.growthbook.io
in my case is different
From what I understand, Cloud users are those under that domain. When that domain changes, as was my case, the MCP must be configured with the four environment variables.
s
Yeah, that's right. Glad you got it figured out. Keep updated on how you use the server, if you run into any other issues, or if there are any things you wish it could do.
n
Thank you very much @strong-mouse-55694 for your time; it was very helpful. MCPs are a great step forward, and I think they bring many improvements to developers.
🙌 1