# Configuration

The MCP server will load the configuration from a `.env` file.

<table><thead><tr><th width="232.21484375">VARIABLE NAME</th><th width="267.40625">DESCRIPTION</th><th width="281.38671875">DEFAULT</th><th width="122.1015625">REQUIRED</th></tr></thead><tbody><tr><td>TRANSPORT</td><td>MCP server transport</td><td>http (if <code>OAUTH_ENABLED</code> is <code>True</code>)<br>stdio (if <code>OAUTH_ENABLED</code> is <code>False</code>)</td><td>No</td></tr><tr><td>HOST</td><td>MCP server host address</td><td>0.0.0.0</td><td>No</td></tr><tr><td>PORT</td><td>MCP server port</td><td>8000</td><td>No</td></tr><tr><td>OAUTH_ENABLED</td><td>Switch to enable/disable OAuth</td><td>False</td><td>No</td></tr><tr><td>LENSES_URL</td><td>Lenses HTTP Endpoint</td><td>http://localhost:9991</td><td>Yes</td></tr><tr><td>LENSES_ADVERTISED_URL</td><td>The publicly available Lenses HTTP endpoint (needs to be accessibly by MCP clients for OAuth)</td><td><code>LENSES_URL</code> value</td><td>No</td></tr><tr><td>MCP_ADVERTISED_URL</td><td>The publicly available URL for this MCP server (needs to be accessible to MCP clients)</td><td></td><td>Yes if <code>OAUTH_ENABLED</code> is <code>True</code></td></tr><tr><td>MCP_SCOPES</td><td>OAuth scopes required by Lenses resources. Published in protected-resource metadata so compliant clients include them in their /authorize request</td><td>read,write,delete</td><td>No</td></tr><tr><td>LENSES_API_KEY</td><td>Alternative authentication using a Lenses Service Account API key</td><td></td><td>Yes if <code>OAUTH_ENABLED</code> is <code>False</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/mcp/lenses-mcp-server/getting-started/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
