Per-Server Variables & Credentials
By default a variable applies to every MCP server you own. With per-server variables, you can also give a variable a value for one server only. A server uses its own value first and falls back to the shared one. This lets several servers built on the same provider use different credentials:- A
github-personalserver and agithub-workserver, both on the GitHub provider, each connected to a different GitHub account. - A
stripe-testserver that uses a test-mode key whilestripe-liveuses the live key. - One customer’s server using that customer’s API key, while every other server keeps the shared default.
How Resolution Works
A variable has an optional scope:
When a server needs
${API_GITHUB_COM_ACCESS_TOKEN}, HasMCP looks for:
- The variable with that name for this server, then
- The variable with that name for all servers.
Managing Variables on a Server
Open an MCP server and go to the Configuration tab. The Variables table lists every variable the server’s enabled tools need, with the value the server will use and its Scope.- Add a missing variable. Variables the server needs but doesn’t have are listed for you to fill in. The This server only switch is on by default. Turn it off to create the variable for all servers.
- Override a shared value. Next to a variable whose scope is All servers, click Override to set a different value for this server only. The other servers keep using the shared value.
- Edit. Editing a variable with the All servers scope changes it for every server. The form warns you about this and points you to Override.
- Delete. Deleting a server’s own variable makes the server fall back to the shared value, if one exists. Deleting a shared variable removes it from every server.
Deleting an MCP server also deletes the variables scoped to it.
Per-Server Remote MCP Accounts
For servers that use remote MCP providers, the Configuration tab has a Remote MCP Credentials section. It lists each remote MCP provider of the server and the account the server uses:
For each provider you can:
- Connect Account (or Reconnect): sign in on the remote MCP server for this server only. The access and refresh tokens are saved for this server and renewed automatically there.
- Add Token: paste an access token, such as an API key or personal access token, and click Save for this server. It is sent as a
Bearertoken. - Remove: delete this server’s access and refresh tokens. The server goes back to the shared account.
API
SetserverID when creating a variable to scope it to a server. Leave it out (or empty) for all servers.
serverID on every server-scoped variable.
To connect a provider account for a single server, pass the serverID query parameter to Connect Provider Account:
authorizationURL is where the user signs in.