Skip to main content
Version: Next

Basic API Key Authorization

It is possible to enforce basic authentication via an API key, to be defined by users, for new connections to MCPX. Add the following to config.app.yaml:

auth:
enabled: true

Upon boot, MCPX will attempt to read the API_KEY environment variable in order to set up the expected API key value. Pass the x-lunar-api-key header from the connecting client to pass that API key.

Environment Variables

Many MCP servers expect credentials and other configuration values to be passed via environment variables. You can supply it globally - that is, to have the variable set in the environment where MCPX is running. Alternatively, you may supply it to a specific target MCP server by mentioning it in the env field, available for definition per target MCP server, as in the example JSON above.