1. Packages
  2. Packages
  3. Grafana Cloud
  4. API Docs
  5. assistant
  6. McpServer
Viewing docs for Grafana v2.32.0
published on Saturday, Jun 13, 2026 by pulumiverse
grafana logo
Viewing docs for Grafana v2.32.0
published on Saturday, Jun 13, 2026 by pulumiverse

    Manages a Grafana Assistant MCP server integration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const config = new pulumi.Config();
    const mcpToken = config.require("mcpToken");
    const example = new grafana.assistant.McpServer("example", {
        name: "Example MCP server",
        scope: "tenant",
        applications: ["assistant"],
        configuration: {
            url: "https://example.com/mcp/",
        },
        customHeaders: {
            Authorization: `Bearer ${mcpToken}`,
        },
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    config = pulumi.Config()
    mcp_token = config.require("mcpToken")
    example = grafana.assistant.McpServer("example",
        name="Example MCP server",
        scope="tenant",
        applications=["assistant"],
        configuration={
            "url": "https://example.com/mcp/",
        },
        custom_headers={
            "Authorization": f"Bearer {mcp_token}",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/assistant"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		mcpToken := cfg.Require("mcpToken")
    		_, err := assistant.NewMcpServer(ctx, "example", &assistant.McpServerArgs{
    			Name:  pulumi.String("Example MCP server"),
    			Scope: pulumi.String("tenant"),
    			Applications: pulumi.StringArray{
    				pulumi.String("assistant"),
    			},
    			Configuration: &assistant.McpServerConfigurationArgs{
    				Url: pulumi.String("https://example.com/mcp/"),
    			},
    			CustomHeaders: pulumi.StringMap{
    				"Authorization": pulumi.Sprintf("Bearer %v", mcpToken),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var mcpToken = config.Require("mcpToken");
        var example = new Grafana.Assistant.McpServer("example", new()
        {
            Name = "Example MCP server",
            Scope = "tenant",
            Applications = new[]
            {
                "assistant",
            },
            Configuration = new Grafana.Assistant.Inputs.McpServerConfigurationArgs
            {
                Url = "https://example.com/mcp/",
            },
            CustomHeaders = 
            {
                { "Authorization", $"Bearer {mcpToken}" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.assistant.McpServer;
    import com.pulumi.grafana.assistant.McpServerArgs;
    import com.pulumi.grafana.assistant.inputs.McpServerConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var mcpToken = config.require("mcpToken");
            var example = new McpServer("example", McpServerArgs.builder()
                .name("Example MCP server")
                .scope("tenant")
                .applications("assistant")
                .configuration(McpServerConfigurationArgs.builder()
                    .url("https://example.com/mcp/")
                    .build())
                .customHeaders(Map.of("Authorization", String.format("Bearer %s", mcpToken)))
                .build());
    
        }
    }
    
    configuration:
      mcpToken:
        type: string
    resources:
      example:
        type: grafana:assistant:McpServer
        properties:
          name: Example MCP server
          scope: tenant
          applications:
            - assistant
          configuration:
            url: https://example.com/mcp/
          customHeaders:
            Authorization: Bearer ${mcpToken}
    
    Example coming soon!
    

    Create McpServer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new McpServer(name: string, args: McpServerArgs, opts?: CustomResourceOptions);
    @overload
    def McpServer(resource_name: str,
                  args: McpServerArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def McpServer(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  scope: Optional[str] = None,
                  applications: Optional[Sequence[str]] = None,
                  configuration: Optional[McpServerConfigurationArgs] = None,
                  custom_headers: Optional[Mapping[str, str]] = None,
                  description: Optional[str] = None,
                  enabled: Optional[bool] = None,
                  name: Optional[str] = None)
    func NewMcpServer(ctx *Context, name string, args McpServerArgs, opts ...ResourceOption) (*McpServer, error)
    public McpServer(string name, McpServerArgs args, CustomResourceOptions? opts = null)
    public McpServer(String name, McpServerArgs args)
    public McpServer(String name, McpServerArgs args, CustomResourceOptions options)
    
    type: grafana:assistant:McpServer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "grafana_assistant_mcpserver" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args McpServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args McpServerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args McpServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args McpServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args McpServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var mcpServerResource = new Grafana.Assistant.McpServer("mcpServerResource", new()
    {
        Scope = "string",
        Applications = new[]
        {
            "string",
        },
        Configuration = new Grafana.Assistant.Inputs.McpServerConfigurationArgs
        {
            BuiltinId = "string",
            ToolApprovalPolicies = 
            {
                { "string", "string" },
            },
            ToolPreferences = 
            {
                { "string", "string" },
            },
            Url = "string",
        },
        CustomHeaders = 
        {
            { "string", "string" },
        },
        Description = "string",
        Enabled = false,
        Name = "string",
    });
    
    example, err := assistant.NewMcpServer(ctx, "mcpServerResource", &assistant.McpServerArgs{
    	Scope: pulumi.String("string"),
    	Applications: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Configuration: &assistant.McpServerConfigurationArgs{
    		BuiltinId: pulumi.String("string"),
    		ToolApprovalPolicies: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		ToolPreferences: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		Url: pulumi.String("string"),
    	},
    	CustomHeaders: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    })
    
    resource "grafana_assistant_mcpserver" "mcpServerResource" {
      scope        = "string"
      applications = ["string"]
      configuration = {
        builtin_id = "string"
        tool_approval_policies = {
          "string" = "string"
        }
        tool_preferences = {
          "string" = "string"
        }
        url = "string"
      }
      custom_headers = {
        "string" = "string"
      }
      description = "string"
      enabled     = false
      name        = "string"
    }
    
    var mcpServerResource = new McpServer("mcpServerResource", McpServerArgs.builder()
        .scope("string")
        .applications("string")
        .configuration(McpServerConfigurationArgs.builder()
            .builtinId("string")
            .toolApprovalPolicies(Map.of("string", "string"))
            .toolPreferences(Map.of("string", "string"))
            .url("string")
            .build())
        .customHeaders(Map.of("string", "string"))
        .description("string")
        .enabled(false)
        .name("string")
        .build());
    
    mcp_server_resource = grafana.assistant.McpServer("mcpServerResource",
        scope="string",
        applications=["string"],
        configuration={
            "builtin_id": "string",
            "tool_approval_policies": {
                "string": "string",
            },
            "tool_preferences": {
                "string": "string",
            },
            "url": "string",
        },
        custom_headers={
            "string": "string",
        },
        description="string",
        enabled=False,
        name="string")
    
    const mcpServerResource = new grafana.assistant.McpServer("mcpServerResource", {
        scope: "string",
        applications: ["string"],
        configuration: {
            builtinId: "string",
            toolApprovalPolicies: {
                string: "string",
            },
            toolPreferences: {
                string: "string",
            },
            url: "string",
        },
        customHeaders: {
            string: "string",
        },
        description: "string",
        enabled: false,
        name: "string",
    });
    
    type: grafana:assistant:McpServer
    properties:
        applications:
            - string
        configuration:
            builtinId: string
            toolApprovalPolicies:
                string: string
            toolPreferences:
                string: string
            url: string
        customHeaders:
            string: string
        description: string
        enabled: false
        name: string
        scope: string
    

    McpServer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The McpServer resource accepts the following input properties:

    Scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    Applications List<string>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    Configuration Pulumiverse.Grafana.Assistant.Inputs.McpServerConfiguration
    MCP server configuration.
    CustomHeaders Dictionary<string, string>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    Description string
    Optional description.
    Enabled bool
    Whether the resource is enabled.
    Name string
    The MCP server integration name.
    Scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    Applications []string
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    Configuration McpServerConfigurationArgs
    MCP server configuration.
    CustomHeaders map[string]string
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    Description string
    Optional description.
    Enabled bool
    Whether the resource is enabled.
    Name string
    The MCP server integration name.
    scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications list(string)
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration object
    MCP server configuration.
    custom_headers map(string)
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description string
    Optional description.
    enabled bool
    Whether the resource is enabled.
    name string
    The MCP server integration name.
    scope String
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications List<String>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfiguration
    MCP server configuration.
    customHeaders Map<String,String>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description String
    Optional description.
    enabled Boolean
    Whether the resource is enabled.
    name String
    The MCP server integration name.
    scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications string[]
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfiguration
    MCP server configuration.
    customHeaders {[key: string]: string}
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description string
    Optional description.
    enabled boolean
    Whether the resource is enabled.
    name string
    The MCP server integration name.
    scope str
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications Sequence[str]
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfigurationArgs
    MCP server configuration.
    custom_headers Mapping[str, str]
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description str
    Optional description.
    enabled bool
    Whether the resource is enabled.
    name str
    The MCP server integration name.
    scope String
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications List<String>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration Property Map
    MCP server configuration.
    customHeaders Map<String>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description String
    Optional description.
    enabled Boolean
    Whether the resource is enabled.
    name String
    The MCP server integration name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the McpServer resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing McpServer Resource

    Get an existing McpServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: McpServerState, opts?: CustomResourceOptions): McpServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            applications: Optional[Sequence[str]] = None,
            configuration: Optional[McpServerConfigurationArgs] = None,
            custom_headers: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            scope: Optional[str] = None) -> McpServer
    func GetMcpServer(ctx *Context, name string, id IDInput, state *McpServerState, opts ...ResourceOption) (*McpServer, error)
    public static McpServer Get(string name, Input<string> id, McpServerState? state, CustomResourceOptions? opts = null)
    public static McpServer get(String name, Output<String> id, McpServerState state, CustomResourceOptions options)
    resources:  _:    type: grafana:assistant:McpServer    get:      id: ${id}
    import {
      to = grafana_assistant_mcpserver.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Applications List<string>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    Configuration Pulumiverse.Grafana.Assistant.Inputs.McpServerConfiguration
    MCP server configuration.
    CustomHeaders Dictionary<string, string>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    Description string
    Optional description.
    Enabled bool
    Whether the resource is enabled.
    Name string
    The MCP server integration name.
    Scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    Applications []string
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    Configuration McpServerConfigurationArgs
    MCP server configuration.
    CustomHeaders map[string]string
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    Description string
    Optional description.
    Enabled bool
    Whether the resource is enabled.
    Name string
    The MCP server integration name.
    Scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications list(string)
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration object
    MCP server configuration.
    custom_headers map(string)
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description string
    Optional description.
    enabled bool
    Whether the resource is enabled.
    name string
    The MCP server integration name.
    scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications List<String>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfiguration
    MCP server configuration.
    customHeaders Map<String,String>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description String
    Optional description.
    enabled Boolean
    Whether the resource is enabled.
    name String
    The MCP server integration name.
    scope String
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications string[]
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfiguration
    MCP server configuration.
    customHeaders {[key: string]: string}
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description string
    Optional description.
    enabled boolean
    Whether the resource is enabled.
    name string
    The MCP server integration name.
    scope string
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications Sequence[str]
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration McpServerConfigurationArgs
    MCP server configuration.
    custom_headers Mapping[str, str]
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description str
    Optional description.
    enabled bool
    Whether the resource is enabled.
    name str
    The MCP server integration name.
    scope str
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).
    applications List<String>
    Applications where this resource applies. Valid values: assistant, loop, all. Defaults to all applications when unset.
    configuration Property Map
    MCP server configuration.
    customHeaders Map<String>
    Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
    description String
    Optional description.
    enabled Boolean
    Whether the resource is enabled.
    name String
    The MCP server integration name.
    scope String
    Whether the resource is visible to the whole tenant (tenant) or only the creating user (user).

    Supporting Types

    McpServerConfiguration, McpServerConfigurationArgs

    BuiltinId string
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    ToolApprovalPolicies Dictionary<string, string>
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    ToolPreferences Dictionary<string, string>
    Tool preferences keyed by tool name (enabled or disabled).
    Url string
    MCP server URL.
    BuiltinId string
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    ToolApprovalPolicies map[string]string
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    ToolPreferences map[string]string
    Tool preferences keyed by tool name (enabled or disabled).
    Url string
    MCP server URL.
    builtin_id string
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    tool_approval_policies map(string)
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    tool_preferences map(string)
    Tool preferences keyed by tool name (enabled or disabled).
    url string
    MCP server URL.
    builtinId String
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    toolApprovalPolicies Map<String,String>
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    toolPreferences Map<String,String>
    Tool preferences keyed by tool name (enabled or disabled).
    url String
    MCP server URL.
    builtinId string
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    toolApprovalPolicies {[key: string]: string}
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    toolPreferences {[key: string]: string}
    Tool preferences keyed by tool name (enabled or disabled).
    url string
    MCP server URL.
    builtin_id str
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    tool_approval_policies Mapping[str, str]
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    tool_preferences Mapping[str, str]
    Tool preferences keyed by tool name (enabled or disabled).
    url str
    MCP server URL.
    builtinId String
    Built-in provider ID (e.g. cursor). When set, tools are provided locally.
    toolApprovalPolicies Map<String>
    Tool approval policies keyed by tool name (autoApprove, alwaysAsk, or empty for default).
    toolPreferences Map<String>
    Tool preferences keyed by tool name (enabled or disabled).
    url String
    MCP server URL.

    Import

    terraform import grafana_assistant_mcp_server.name "{{ id }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Viewing docs for Grafana v2.32.0
    published on Saturday, Jun 13, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial