Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/platform/grafana-assistant/reference/http-apis/mcp-servers.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/platform/grafana-assistant/reference/http-apis/mcp-servers/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
MCP servers API
Use MCP server integrations to connect external Model Context Protocol servers to Assistant. MCP servers provide tools that Assistant can use during conversations, such as querying external APIs, searching documentation, or performing actions in third-party systems.
MCP server integrations have two scopes:
- Tenant integrations are available to all users in the organization. Use tenant integrations when you manage MCP servers through the HTTP API, because they apply for all users across the organization.
- User integrations are available only to the identity that created them. You can’t create user integrations on behalf of other users.
The API path for MCP servers is /integrations.
Examples use the base URL and service account token described in Grafana Assistant HTTP API reference.
Create an MCP server
Register a new MCP server integration.
Endpoint
POST /integrations
Permissions
| Integration scope | Required permission |
|---|---|
user | grafana-assistant-app.mcps.user:create |
tenant | grafana-assistant-app.mcps.tenant:create |
Request
Send a JSON request body.
| Field | Required | Description |
|---|---|---|
name | Yes | Display name for the integration. |
scope | Yes | Integration scope: user or tenant. |
type | Yes | Integration type. Use mcp. |
enabled | Yes | Whether the integration is active. |
applications | Yes | Applications the integration applies to. Valid values: assistant, loop, all. Defaults to ["all"] when empty. |
configuration | No | MCP server configuration. |
customHeaders | No | Custom HTTP headers sent to the MCP server. Each entry requires key and value. Values are encrypted and redacted in responses. |
description | No | A short description of the integration. |
Configuration
The configuration field contains MCP server settings.
| Field | Description |
|---|---|
url | The MCP server URL. |
toolPreferences | A map of tool names to enabled or disabled. Controls whether each tool is available to Assistant. Tools not listed default to enabled. |
toolApprovalPolicies | A map of tool names to auto_approve or always_ask. Controls whether Assistant can run the tool without user confirmation. Tools not listed use the default policy, which auto-approves read-only tools and asks for others. |
Tool names are defined by the MCP server. You can discover available tool names by connecting the server through the Grafana UI or by calling the server’s MCP tools/list method directly.
{
"name": "Internal docs server",
"scope": "tenant",
"type": "mcp",
"enabled": true,
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/",
"toolPreferences": {
"delete_records": "disabled"
},
"toolApprovalPolicies": {
"update_record": "always_ask",
"search_docs": "auto_approve"
}
},
"customHeaders": [
{"key": "Authorization", "value": "Bearer your-token-here"}
]
}Response
{
"status": "success",
"data": {
"id": "d6e4f5a7-8901-2345-bdef-167890123456",
"created": "2025-11-15T11:00:00Z",
"modified": "2025-11-15T11:00:00Z",
"createdBy": "sa-5594@serviceaccount.grafana",
"updatedBy": "sa-5594@serviceaccount.grafana",
"name": "Internal docs server",
"type": "mcp",
"enabled": true,
"scope": "tenant",
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/",
"toolPreferences": {
"delete_records": "disabled"
},
"toolApprovalPolicies": {
"update_record": "always_ask",
"search_docs": "auto_approve"
}
},
"customHeaders": [
{"key": "Authorization", "value": "**********"}
]
}
}Header values are redacted in responses.
Examples
curl -X POST "${ASSISTANT_API_URL}/integrations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${SERVICE_ACCOUNT_TOKEN}" \
-d '{
"name": "Internal docs server",
"scope": "tenant",
"type": "mcp",
"enabled": true,
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/"
},
"customHeaders": [
{"key": "Authorization", "value": "Bearer your-token-here"}
]
}'List MCP servers
Retrieve integrations with optional filtering and pagination.
Endpoint
GET /integrations
Permissions
| Integration scope | Required permission |
|---|---|
user | grafana-assistant-app.mcps.user:read |
tenant | grafana-assistant-app.mcps.tenant:read |
Request
| Parameter | Required | Description |
|---|---|---|
scope | No | Filter by scope: user or tenant. |
enabled_only | No | When true, return only enabled integrations. |
limit | No | Maximum number of integrations to return. Range: 1-100. Default: 20. |
offset | No | Pagination offset. Default: 0. |
Response
{
"status": "success",
"data": {
"integrations": [
{
"id": "d6e4f5a7-8901-2345-bdef-167890123456",
"created": "2025-11-15T11:00:00Z",
"modified": "2025-11-15T11:00:00Z",
"createdBy": "sa-5594@serviceaccount.grafana",
"updatedBy": "sa-5594@serviceaccount.grafana",
"name": "Internal docs server",
"type": "mcp",
"enabled": true,
"scope": "tenant",
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/"
},
"customHeaders": [
{"key": "Authorization", "value": "**********"}
]
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0
}
}
}Examples
curl -X GET "${ASSISTANT_API_URL}/integrations?scope=tenant&enabled_only=true" \
-H "Authorization: Bearer ${SERVICE_ACCOUNT_TOKEN}"Get an MCP server
Retrieve a single integration by ID.
Endpoint
GET /integrations/{id}
Permissions
| Integration scope | Required permission |
|---|---|
user | grafana-assistant-app.mcps.user:read |
tenant | grafana-assistant-app.mcps.tenant:read |
Request
| Parameter | Required | Description |
|---|---|---|
id | Yes | The integration ID returned when you create an integration. |
Response
{
"status": "success",
"data": {
"id": "d6e4f5a7-8901-2345-bdef-167890123456",
"created": "2025-11-15T11:00:00Z",
"modified": "2025-11-15T11:00:00Z",
"createdBy": "sa-5594@serviceaccount.grafana",
"updatedBy": "sa-5594@serviceaccount.grafana",
"name": "Internal docs server",
"type": "mcp",
"enabled": true,
"scope": "tenant",
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/"
},
"customHeaders": [
{"key": "Authorization", "value": "**********"}
]
}
}Examples
INTEGRATION_ID="d6e4f5a7-8901-2345-bdef-167890123456"
curl -X GET "${ASSISTANT_API_URL}/integrations/${INTEGRATION_ID}" \
-H "Authorization: Bearer ${SERVICE_ACCOUNT_TOKEN}"Update an MCP server
Update an existing integration. Only the fields you include in the request body are changed, except scope which is always required.
Endpoint
PUT /integrations/{id}
Permissions
| Integration scope | Required permission |
|---|---|
user | grafana-assistant-app.mcps.user:write |
tenant | grafana-assistant-app.mcps.tenant:write |
Request
| Parameter | Required | Description |
|---|---|---|
id | Yes | The integration ID. |
Send a JSON request body with the fields to update.
| Field | Required | Description |
|---|---|---|
scope | Yes | The current scope of the integration: user or tenant. |
name | No | Updated display name. |
description | No | Updated description. |
enabled | No | Whether the integration is active. |
applications | No | Updated application list. |
configuration | No | Updated MCP server configuration. See Configuration. |
customHeaders | No | Updated custom HTTP headers. |
Response
The response contains the full updated integration.
{
"status": "success",
"data": {
"id": "d6e4f5a7-8901-2345-bdef-167890123456",
"created": "2025-11-15T11:00:00Z",
"modified": "2025-11-20T14:15:00Z",
"createdBy": "sa-5594@serviceaccount.grafana",
"updatedBy": "sa-5594@serviceaccount.grafana",
"name": "Internal docs server",
"type": "mcp",
"enabled": false,
"scope": "tenant",
"applications": ["assistant"],
"configuration": {
"url": "https://docs-mcp.internal.example.com/mcp/"
},
"customHeaders": [
{"key": "Authorization", "value": "**********"}
]
}
}Examples
Disable an integration:
INTEGRATION_ID="d6e4f5a7-8901-2345-bdef-167890123456"
curl -X PUT "${ASSISTANT_API_URL}/integrations/${INTEGRATION_ID}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${SERVICE_ACCOUNT_TOKEN}" \
-d '{
"scope": "tenant",
"enabled": false
}'Delete an MCP server
Permanently delete an integration.
Endpoint
DELETE /integrations/{id}
Permissions
| Integration scope | Required permission |
|---|---|
user | grafana-assistant-app.mcps.user:delete |
tenant | grafana-assistant-app.mcps.tenant:delete |
Request
| Parameter | Required | Description |
|---|---|---|
id | Yes | The integration ID. |
Response
A successful deletion returns HTTP 204 with no response body.
Examples
INTEGRATION_ID="d6e4f5a7-8901-2345-bdef-167890123456"
curl -X DELETE "${ASSISTANT_API_URL}/integrations/${INTEGRATION_ID}" \
-H "Authorization: Bearer ${SERVICE_ACCOUNT_TOKEN}"Was this page helpful?
Related resources from Grafana Labs


