---
title: "Provision a generic OAuth-gated MCP server"
method: POST
path: "/api/mcp/provisioner/generic"
tags: ["MCP Provisioner"]
---

# Provision a generic OAuth-gated MCP server

`POST /api/mcp/provisioner/generic`

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/mcp/provisioner/generic`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

Admin-only. Attaches any MCP server that authenticates users via OAuth 2.0 authorization-code. With discover=true the OAuth endpoints (and client registration when clientId is empty) are resolved automatically from the server's advertised metadata.

## Request body

- object
  - `serverId` string, required
  - `displayName` string
  - `mcpUrl` string, uri, required
  - `transport` 'streamable-http' | 'sse', required
  - `authorizationUrl` string, uri
  - `tokenUrl` string, uri
  - `clientId` string
  - `clientSecret` string
  - `scopes` string[]
  - `pkce` boolean
  - `discover` boolean: Resolve OAuth endpoints (and register a client when clientId is empty) from the server's advertised metadata

## Response `200`

Server provisioned

- object
  - `serverId` string

## Other responses

- `400`: Missing or invalid fields
- `403`: Caller is not a Grafana Admin
- `502`: OAuth discovery or dynamic client registration against the provider failed

## Changes

- **2026-08-25** `336f05fb2b50`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/changes/api/mcp/provisioner/generic/post.md)

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
