mcp-core configuration
Your service's config class extends MCPCoreConfig with its own variables and loads it once at startup. Loading fails and names the variable when a required one is missing. A secret is removed from process.env once it is read.
import { type EnviConfig, envfield } from "@evolve-framework/config";import { MCPCoreConfig } from "@evolve-framework/mcp-core";
class Config extends MCPCoreConfig { readonly HTTP_PORT = 8080;
config(): EnviConfig { return { ...super.config(), HTTP_PORT: envfield.number() }; }}
export const config = new Config();await config.load();MCPCoreConfig
Base configuration class for MCP services. Services should extend this class and override COMPONENT_NAME (and HTTP_PORT if needed).
import { MCPCoreConfig } from "@evolve-framework/mcp-core";| Variable | Description |
|---|---|
COMPONENT_NAMEoptional | The service's name, which a service overrides. Defaults to mcp-server.Default mcp-server |
COMPONENT_VERSIONoptional | The service's version, for the service to report. Unset by default. |
HTTP_HOSToptional | The address the HTTP server binds to. Defaults to 0.0.0.0.Default 0.0.0.0 |
HTTP_PORToptional · number | The port the HTTP server listens on. Defaults to 6000.Default 6000 |
MCP_ENDPOINT_PATHoptional | The path MCP clients post to. Defaults to /mcp.Default /mcp |
GATEWAY_ENDPOINToptional | The GraphQL gateway the tools call, as the storefront does.Default http://localhost:4000/graphql |
ACCOUNT_SERVICE_ENDPOINToptional | The account service's URL, for a service that calls it directly.Default http://localhost:4001 |
DEFAULT_STORE_KEYoptional | The store a request is scoped to when it names none.Default evolve |
DEFAULT_LOCALEoptional | The locale a request uses when it names none.Default nl-NL |
DEFAULT_CURRENCYoptional | The currency a request uses when it names none.Default EUR |
JWT_ISSUERoptional · list, "," | The issuers a bearer token may come from; comma-separated for several.Default http://localhost:4000 |
JWT_AUDIENCEoptional · list, "," | The audiences a bearer token may be for; comma-separated for several.Default http://localhost:4000 |
PROXY_AUTH_ENABLEDoptional · boolean | When true, a trusted proxy may forward a pre-authenticated session via
the X-Access-Token / X-Data-Token / X-Refresh-Token headers. These take
precedence over Authorization: Bearer and skip JWT pre-validation —
token validity is enforced by the downstream gateway. Leave disabled
unless this service sits behind a trusted proxy (e.g. the chat backend).Default false |
MCP_PUBLIC_URLoptional | The canonical address clients connect to, which tokens are bound to.Default http://localhost:6000/mcp |
MCP_LOGIN_URLoptional | The storefront's login page, for customers connecting a client.Default http://localhost:3000/account/login |
MCP_OAUTH_SECRETSoptional · secret | Comma-separated secrets of at least 32 bytes, which seal every token. Stays
with this service. OAuth is off while this is unset.Default |
MCP_INTERACTION_SECREToptional · secret | What the login page authenticates with on the interaction routes. At least 32 bytes.Default |
TOKEN_REFRESH_THRESHOLD_SECONDSoptional · number | A token with less than this many seconds left is refreshed. Defaults to 300.Default 300 |
RATE_LIMIT_MAXoptional · number | The requests a client may make per rate-limit window. Defaults to 100.Default 100 |
RATE_LIMIT_ADDRESS_MAXoptional · number | With OAuth, the requests per IP address per window, for those without a
valid token. Clients in the cloud share addresses. Defaults to 1000.Default 1000 |
RATE_LIMIT_WINDOW_SECONDSoptional · number | The rate-limit window, in seconds. Defaults to 60.Default 60 |
Every service's variables on one page: Configuration.

