Environment variables
- Last Updated: December 3, 2026
- 2 minute read
- Documentation
MarkLogic MCP Server uses a .env file in the MarkLogic MCP Server deployment to contain environment variables for runtime overrides and optional feature switches.
Note: Core connection settings (such as MarkLogic REST app server URL and authentication method) and OAuth server metadata reside in config.yaml. See the config.yaml for core configuration settings.
Runtime and container settings
These settings are optional.
| Variable | Default | Used by | Notes |
|---|---|---|---|
MARKLOGIC_MCP_IMAGE |
marklogic/marklogic-mcp:local |
Docker Compose | Specifies the Docker image tag for MarkLogic MCP Server container in docker-compose.yaml. |
MCP_FORCE_HTTPS_METADATA |
true |
Hyperforge auth middleware | Controls whether Hyperforge forces HTTPS in OAuth metadata URLs.
|
MRA_DEFINITION_CACHE_MAX_ENTRIES |
256 |
RetrieveDefinition tool | Maximum number of cached definition responses retained.
|
MRA_DEFINITION_CACHE_TTL_SECONDS |
300 |
RetrieveDefinition tool | How long, in seconds, a /v1/retrieve/definition response is cached before it is fetched again.
|
MRA_SPARQL_METADATA_CACHE_MAX_ENTRIES |
256 |
RetrieveSparqlMetadata tool | Maximum number of cached SPARQL metadata responses retained, one for each MarkLogic Server URL and principal.
|
MRA_SPARQL_METADATA_CACHE_TTL_SECONDS |
300 |
RetrieveSparqlMetadata tool | Maximum age, in seconds, that a /v1/retrieve/sparql/metadata response is cached before it is fetched again.
|
MRA_SQL_METADATA_CACHE_MAX_ENTRIES |
256 |
RetrieveSQLMetadata tool | Maximum number of cached SQL metadata responses retained, one for each MarkLogic Server URL and principal.
|
MRA_SQL_METADATA_CACHE_TTL_SECONDS |
300 |
RetrieveSQLMetadata tool | Maximum age, in seconds, that a /v1/retrieve/sql/metadata response is cached before it is fetched again.
|
Standalone bootstrap settings
These settings are optional.
| Variable | Used by | Notes |
|---|---|---|
load_modules |
Standalone startup | Default: JSON array of additional modules loaded after Hyperforge core registrations.
|
standalone_application_class |
Standalone startup | Default: Dotted Python path for the application class used by the standalone server.
|
Sample .env file
# Optional runtime overrides for Hyperforge standalone. # Most server and OAuth/MarkLogic settings now live in config.yaml.Controls whether Hyperforge forces https in OAuth metadata URLs.
Set false for local http://localhost MCP testing.
MCP_FORCE_HTTPS_METADATA=true