> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect the Grafana Cloud MCP server

> Connect the Grafana Cloud MCP server to Spojit with OAuth 2.1 to query metrics, logs, and other observability data, plus the role your user needs.

The **Grafana Cloud MCP server** is a hosted MCP server that lets AI agents query metrics, logs, and other observability data in your Grafana Cloud stack. Connect it to Spojit to pull dashboards and alerts into an incident workflow or report on service health.

<Note>
  Spojit connects to this server through a [custom MCP server](/connectors/remote-mcp-servers/custom) connection, so you add it with **Add custom server** rather than from the connector catalog. Grafana Labs maintains it and decides which tools it offers; see [Grafana's Cloud MCP server documentation](https://grafana.com/docs/grafana-cloud/ai-tools/mcp-servers/cloud-mcp/) for the current list.
</Note>

## Before you start

* A **Grafana Cloud** stack. Self-hosted Grafana needs the [open source MCP server](https://grafana.com/docs/grafana/latest/developer-resources/mcp/) instead, which is not a hosted endpoint.
* The **Assistant terms** accepted for your stack.
* The **Assistant Cloud MCP User** role or the `grafana-assistant-app.cloud-mcp:access` permission. Editors and above have it by default.

## Server URL

```
https://mcp.grafana.com/mcp
```

## Connect in Spojit

<Steps>
  <Step title="Add a custom server">
    Go to **Connections** and click **Add custom server**. Enter a **Name** such as `Grafana Cloud` and paste the **Server URL**.
  </Step>

  <Step title="Keep Auto authentication">
    Leave **Authentication** on **Auto**, choose a visibility, and click **Save & connect**.
  </Step>

  <Step title="Pick your stack and approve">
    Grafana opens its authorization page. Enter your stack URL (`https://<your-stack>.grafana.net`) and approve. Spojit marks the connection **Connected**.
  </Step>
</Steps>

Access tokens last one hour and refresh automatically for 30 days, after which Grafana asks you to authorize again. Click **Reconnect** on the connection when that happens.

## Use it in a workflow

Add a **Connector** node, pick your Grafana server under **Custom Servers**, and choose **Agent Mode** or **Direct Mode**. See [Use a custom server in a workflow](/connectors/remote-mcp-servers/custom#use-a-custom-server-in-a-workflow).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authorization is denied">
    Your user lacks the **Assistant Cloud MCP User** role, or the Assistant terms have not been accepted for the stack.
  </Accordion>

  <Accordion title="The connection stops after a month">
    Grafana's refresh window is 30 days. Click **Reconnect** to authorize again.
  </Accordion>
</AccordionGroup>

## Learn more

* [Grafana Cloud MCP server](https://grafana.com/docs/grafana-cloud/ai-tools/mcp-servers/cloud-mcp/)

<Snippet file="start-free.mdx" />
