# Run with Community Edition

{% stepper %}
{% step %}

### Download and run Lenses Community Edition

To set up and run, follow the instructions [here](https://docs.lenses.io/latest/getting-started/quickstart).

Lenses MCP Server will be running on <http://localhost:8000/> with `OAUTH_ENABLED` parameter set to `True` so OAuth will be enabled by default.
{% endstep %}

{% step %}

### Configure in your AI tool

To run in Cursor, Claude, Codex, etc. use the following `mcp.json` configuration to configure the client to connect using HTTP transport.

```json
{
  "mcpServers": {
    "Lenses": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
}
```

{% endstep %}

{% step %}

### Authenticate using OAuth

Navigate to your AI tool's MCP server settings and connect to authenticate with the Lenses OAuth authorization server (visible to your AI tool's client, configured with `LENSES_ADVERTISED_URL` with value <http://localhost:9991/>). Here is an example using Cursor.

<figure><img src="https://3513156164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOPahZVG0l6oMQ9aqD8Vq%2Fuploads%2F6ZSMkkooB2UtwXAP5t2v%2Fimage.png?alt=media&#x26;token=f105dc45-1e0f-48d1-a744-66ecc14d415b" alt=""><figcaption></figcaption></figure>

This opens a web browser at <http://localhost:9991/oauth2/authorize> and passes OAuth parameters. Log in with your username/password. The default credentials are `admin`:`admin`.

<figure><img src="https://3513156164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOPahZVG0l6oMQ9aqD8Vq%2Fuploads%2FL0yKwmCNZbN7NZ6pb0ZG%2Fimage.png?alt=media&#x26;token=05a495e4-ac2d-467e-8fdc-5341b881c4b3" alt=""><figcaption></figcaption></figure>

You will be presented with an OAuth authorization consent screen where you can set read, write and delete scopes.

<figure><img src="https://3513156164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOPahZVG0l6oMQ9aqD8Vq%2Fuploads%2FsAMZ543R6OZwfNJlESmZ%2Fimage.png?alt=media&#x26;token=f9eaf6b1-803a-45a5-9c69-59600b19d100" alt=""><figcaption></figcaption></figure>

Completing this flow should take you back to your AI tool, authenticated and ready to use Lenses MCP Server with the granted authorization scopes.

<figure><img src="https://3513156164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOPahZVG0l6oMQ9aqD8Vq%2Fuploads%2FJDnYTokeSeOLcNnA86oD%2Fimage.png?alt=media&#x26;token=68035247-5684-4721-a753-f8943fc54a5a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Lenses documentation is available on [Context7](https://context7.com/websites/lenses_io). Use the [Context7 MCP Server](https://github.com/upstash/context7) and adjust your prompts with `use context7` to ensure the documentation available to your AI tool is up to date
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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/run-with-community-edition.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.
