> For the complete documentation index, see [llms.txt](https://docs.onelens.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onelens.cloud/solutions/mcp.md).

# MCP

Connect OneLens to Claude, Cursor, or any MCP-compatible AI assistant and ask your cloud-cost questions in plain English — no dashboards, no field names, no API keys.

## TL;DR

* **What:** A published Claude connector (Model Context Protocol) that lets your AI assistant **read** your OneLens cost analytics on your behalf.
* **Auth:** Your normal OneLens login (OAuth). No tokens or keys to manage.
* **Scope:** **Read-only**, scoped to your OneLens **tenant**. The assistant can query costs; it can never change anything.
* **Enablement:** Your OneLens admin turns MCP on per tenant. Not enabled? Contact <support@astuto.ai>.
* **Server URL (for manual setup):** `https://mcp.onelens.cloud/mcp`

## What You'll Get Once Connected

| Capability               | Description                                                                                                 |
| ------------------------ | ----------------------------------------------------------------------------------------------------------- |
| **Ask in plain English** | "Top 5 AWS services by spend last month", "MTD spend vs previous month", "EC2 cost by region".              |
| **Auto-discovery**       | The assistant finds your clouds, dimensions, and values automatically — you don't need to know field names. |
| **Multi-cloud**          | AWS, GCP, Azure, OCI, and SaaS sources you've configured in OneLens.                                        |
| **Cost allocation**      | Squad / cost-center / tag breakdowns, using your org's own labels.                                          |
| **Drill-downs**          | Multi-dimension breakdowns (e.g. service → region → usage type).                                            |
| **Guided clarification** | Ambiguous question? It asks which metric (unblended / amortized) or currency before answering.              |

## Security at a Glance

| Question                           | Answer                                                                          |
| ---------------------------------- | ------------------------------------------------------------------------------- |
| Does it store my cost data?        | **No.** Stateless proxy — nothing is persisted.                                 |
| Are cost values logged?            | **No.** Query parameters may be logged for debugging; cost figures never are.   |
| Can it change anything in OneLens? | **No.** Every tool is read-only.                                                |
| Who can use it?                    | Only users in a tenant your admin has enabled, authenticated via OneLens login. |
| How is access scoped?              | To your OneLens **tenant** — you see only what your OneLens account can see.    |
| Can access be revoked?             | **Yes, instantly** — your admin disables MCP for the tenant.                    |

## Cost of the Integration

**None.** The MCP connector is included with OneLens. It adds no cloud cost — it only reads cost data OneLens already has. You just need MCP enabled for your tenant.

## How It Works

{% stepper %}
{% step %}

### Add and sign in

You add the OneLens connector in your AI assistant and sign in with your OneLens credentials (OAuth).
{% endstep %}

{% step %}

### Ask a cost question

When you ask a cost question, the assistant calls OneLens' read-only tools (`list_sources`, `list_dimensions`, `query_costs`, `get_cost_summary`, `list_dimension_values`).
{% endstep %}

{% step %}

### Get your answer

OneLens returns the cost analytics scoped to your tenant; the assistant explains the answer in natural language.
{% endstep %}
{% endstepper %}

The connector is a thin, stateless proxy in front of the same OneLens cost APIs the web app uses — so what you see in chat matches the OneLens dashboard.

## Prerequisites

* An active **OneLens account**.
* **MCP enabled for your tenant** (ask your OneLens admin or <support@astuto.ai>).
* An MCP-compatible assistant: **Claude** (Desktop or web — Pro / Team / Enterprise) or **Cursor**.

## What OneLens Will Access

* Your OneLens **cost analytics** (spend, dimensions, allocation) for the tenant you log in to — read-only.
* Your **identity** from login (name, email) to scope the session.

## What OneLens Will NOT Access

* No write access — it cannot modify budgets, sources, allocations, or any setting.
* No data outside your tenant.
* No credentials or keys from your side — auth is your standard OneLens login.

## Connect to OneLens

### Claude (Desktop & Web)

OneLens is a **published connector in Claude's directory** — add it by name, no URL to paste.

{% stepper %}
{% step %}

### Open the connector directory

**Settings → Connectors → Browse connectors**.

<figure><img src="/files/pFCcBNcLXFAOTulRm5hF" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Find OneLens

Search **OneLens** and open it.

<figure><img src="/files/xtBQtot0LqYOgb9iTLEF" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Review and add

The connector page shows what it does, that it's developed by **Astuto AI**, its 5 read-only tools, and the server URL. Add it to your team.

<figure><img src="/files/ghK1xsQj4ZMoeIeWAay2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Connect and sign in

Click **Connect** — a browser tab opens the OneLens login. Sign in with your OneLens credentials.

<figure><img src="/files/vUQ1GS0N4CztrfQRHwpZ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Select your organization and authorize

Approve the requested scopes (OpenID / Profile / Email + Read Costs).

<figure><img src="/files/6RokcjZqmikclaLsKMmh" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Done

**OneLens** shows as connected with its tools listed.

<figure><img src="/files/EwFzNQcjaYnVuFOneB9R" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Can't find it in the directory, or on a plan without it?** Add it as a **custom connector** with the URL `https://mcp.onelens.cloud/mcp`, or manually in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "onelens": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.onelens.cloud/mcp"]
    }
  }
}
```

Restart Claude Desktop → the login opens in your browser → tools appear.
{% endhint %}

## Chat GPT

{% stepper %}
{% step %}

#### Turn on Developer Mode

**Settings → Connectors** (or **Plugins**) **→ Advanced settings**, then toggle **Developer Mode** on.&#x20;
{% endstep %}

{% step %}

### Add the custom connector

Back on the **Connectors / Plugins** tab, click **Add custom connector** (now visible) and enter:\\

* **Name:** `OneLens`
* **MCP Server URL:** `https://mcp.onelens.cloud/mcp`
* **Authentication:** **OAuth**&#x20;
  {% endstep %}

{% step %}

### Sign in and authorize

A browser opens the OneLens sign-in. Sign in, **select your organization**, review the scopes (Read Costs + OpenID / Profile / Email), and **Authorize**&#x20;
{% endstep %}

{% step %}

### Use it

OneLens appears as a connected connector with its 5 read-only tools. Ask your cost questions in chat.

{% hint style="info" %}
Custom connectors aren't verified by OpenAI — this is expected for any third-party MCP server.&#x20;

OneLens is read-only, tenant-scoped, and authenticated with your own OneLens login. If tools don't appear, check that **Developer Mode is on**, the **URL is exactly** `https://mcp.onelens.cloud/mcp`, and that you **saved** the connector.&#x20;
{% endhint %}
{% endstep %}
{% endstepper %}

## Cursor & other MCP hosts

Any MCP-compatible host works. In **Cursor**: **Settings → MCP → Add new MCP server** → **HTTP/SSE** → URL `https://mcp.onelens.cloud/mcp` → complete the OneLens login when prompted.

## Try It

Once connected, just ask:

* "List my cost sources."
* "Top 5 AWS services by spend last month."
* "Month-to-date spend vs the previous month."
* "Break down EC2 cost by region for the last 30 days."
* "Show squad-wise cost last month."

## Session & Data Refresh

* **Sign in once:** your session lasts \~14 days and refreshes silently — no hourly re-login.
* **Live data:** every question queries OneLens fresh; results match the OneLens dashboard (short-lived caching only).

## Data Privacy & Security

* **Stateless:** stores no cost data.
* **No cost values in logs:** query parameters may be logged for support; cost figures are never logged.
* **Tenant-scoped:** you can only reach data your OneLens account is authorized for.
* See the full [Privacy & Data Handling](https://assets.onelens.cloud/mcp/privacy.html) and [Terms](https://assets.onelens.cloud/mcp/terms.html).

## Troubleshooting

| Symptom                                                             | Fix                                                                                |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Login page errors on connect                                        | Confirm the connector URL is exactly `https://mcp.onelens.cloud/mcp`; retry.       |
| **"MCP access is not enabled for your organization"** after a query | Your tenant isn't enabled yet — contact your OneLens admin or <support@astuto.ai>. |
| "Couldn't verify MCP access right now"                              | Temporary hiccup — retry in a moment.                                              |
| Tools list is empty                                                 | Disconnect, remove the connector, reconnect to re-run login.                       |
| Connected but no data                                               | Ensure your tenant has cost sources configured in OneLens.                         |
| Answer looks off / wrong currency                                   | Ask it to confirm the metric and currency; it will re-query.                       |

Still stuck? Contact OneLens support with the **time of the attempt** — every request carries a trace id we can look up.

## FAQ

<details>

<summary>Is it safe to give an AI assistant access to my cost data?</summary>

The connector is read-only and tenant-scoped, stores nothing, and never logs cost values. It uses your standard OneLens login — the assistant only sees what you can already see in OneLens.

</details>

<details>

<summary>Do I need an API key or token?</summary>

No. Authentication is your normal OneLens login via OAuth. Nothing to copy or rotate.

</details>

<details>

<summary>Who controls whether MCP is available?</summary>

Your OneLens admin enables or disables MCP per tenant. Changes take effect quickly and can be reversed instantly.

</details>

<details>

<summary>Can the assistant change anything in OneLens?</summary>

No. Every tool is read-only — it can query cost data but cannot modify budgets, sources, allocations, or settings.

</details>

<details>

<summary>Which assistants are supported?</summary>

Claude (Desktop and web — Pro / Team / Enterprise) and Cursor today. Any MCP-compatible host can connect using the server URL.

</details>

<details>

<summary>How often do I have to log in?</summary>

Once. Your session lasts about 14 days and refreshes silently.

</details>

## Need Help?

Email <support@astuto.ai> with the approximate time of your attempt — every request has a trace id we can use to investigate.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.onelens.cloud/solutions/mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
