Powered by Zoomin Software. For more details please contactZoomin

MarkLogic MCP Server

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.
  • Set to false for local http://localhost testing.
MRA_DEFINITION_CACHE_MAX_ENTRIES 256 RetrieveDefinition tool Maximum number of cached definition responses retained.
  • Entries are evicted least-recently-used first once the limit is reached.
  • The minimum effective value is 1.
  • Non-integer values fall back to the default.
MRA_DEFINITION_CACHE_TTL_SECONDS 300 RetrieveDefinition tool How long, in seconds, a /v1/retrieve/definition response is cached before it is fetched again.
  • Set to 0 to disable caching.
  • Non-integer values fall back to the default.
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.
  • Entries are evicted least-recently-used first once the limit is reached.
  • A negative integer is treated as 1.
  • Non-integer values fall back to default.
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.
  • Cache responses are organized by MarkLogic Server URL and principal.
  • Set to 0 to disable caching.
  • A negative integer is treated as 0.
  • Non-integer values fall back to default.
  • Restarting MarkLogic MCP Server clears the cache.
  • MarkLogic MCP Server does not cache SPARQL query results.
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.
  • Entries are evicted least-recently-used first once the limit is reached.
  • A negative integer is treated as 1.
  • Non-integer values fall back to the default.
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.
  • Cached responses are organized by MarkLogic Server URL and principal.
  • Set to 0 to disable caching.
  • A negative integer is treated as 0.
  • Non-integer values fall back to the default.
  • Restarting MarkLogic MCP Server clears the cache.
  • MarkLogic MCP Server does not cache SQL query results.

Standalone bootstrap settings

These settings are optional.

Variable Used by Notes
load_modules Standalone startup

Default: [] (empty list)

JSON array of additional modules loaded after Hyperforge core registrations.

  • The supplied docker-compose.yaml sets this to ["hyperforge_passthrough", "mra_agent"], which is required for the MarkLogic MCP tools to be registered.
standalone_application_class Standalone startup

Default: hyperforge.standalone.app.StandaloneApplication

Dotted Python path for the application class used by the standalone server.

  • MarkLogic MCP Server uses the default.

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

Alert