{
  "manifest_version": "1.0.0",
  "template": {
    "id": "70054380-e2b3-4b55-8d63-1e901e5dd8a8",
    "slug": "grafana-mcp",
    "name": "Grafana MCP",
    "description": "Deploy and Host Grafana MCP with Railway",
    "url": "https://railway.com/deploy/grafana-mcp",
    "upstream": {
      "repo_url": "https://github.com/FournyP/grafana-mcp-railway-template"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Grafana MCP",
      "source": {
        "repo": "https://github.com/FournyP/grafana-mcp-railway-template"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Grafana MCP Gateway",
      "source": {
        "repo": "https://github.com/FournyP/grafana-mcp-railway-template"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Grafana MCP",
      "description": "Port the MCP HTTP server binds to inside the container. Fixed at 3000 to match what the gateway proxies to. Should match 'MCP_PORT' on the gateway.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Grafana MCP",
      "description": "debug | info | warn | error",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "ACCESS_MODE",
      "service": "Grafana MCP",
      "description": "Restricted forces read-only transactions and rejects write — safe default. Set to unrestricted only for dev/throwaway databases where writes are acceptable.",
      "secret": false,
      "strategy": "default",
      "default": "restricted"
    },
    {
      "key": "GRAFANA_URL",
      "service": "Grafana MCP",
      "description": "Required. Base URL of your Grafana instance. On Railway, use the private network: http://<grafana-service>.railway.internal:<port>",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MCP_GRAFANA_SERVER_TOKEN",
      "service": "Grafana MCP",
      "description": "Second auth layer — mcp-grafana requires this bearer token from callers. Must equal the gateway's MCP_SERVER_TOKEN.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PORT",
      "service": "Grafana MCP Gateway",
      "description": "Port the Gateway server listens on. Railway injects PORT.",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "API_KEYS",
      "service": "Grafana MCP Gateway",
      "description": "Comma-separated list of bearer tokens allowed to call the MCP.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MCP_HOST",
      "service": "Grafana MCP Gateway",
      "description": "Hostname of the MCP service on Railway's private network. Defaults to mcp.railway.internal. Only override if you rename the MCP service — then set it to .railway.internal.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MCP_PORT",
      "service": "Grafana MCP Gateway",
      "description": "Port the MCP service listens on. Defaults to 3000, which matches the MCP service's fixed PORT. Don't change unless you also change PORT on the MCP service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PATH_KEY_AUTH",
      "service": "Grafana MCP Gateway",
      "description": "`true` also accepts the key as a path segment: /k/<key>/mcp # MCP clients that cannot send an Authorization header need this.",
      "secret": true,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MCP_SERVER_TOKEN",
      "service": "Grafana MCP Gateway",
      "description": "Credential the gateway presents to the mcp service. Must equal the mcp service's MCP_GRAFANA_SERVER_TOKEN. Required if you enable PATH_KEY_AUTH alongside MCP_GRAFANA_SERVER_TOKEN.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "grafana-mcp"
      }
    },
    "cli": "railway deploy --template grafana-mcp",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "70054380-e2b3-4b55-8d63-1e901e5dd8a8",
            "serializedConfig": {
              "services": {
                "153e3a77-02c8-43e8-b570-42bfe1841229": {
                  "icon": "https://api.iconify.design/simple-icons:modelcontextprotocol.svg",
                  "name": "Grafana MCP",
                  "source": {
                    "repo": "FournyP/grafana-mcp-railway-template",
                    "rootDirectory": "mcp"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port the MCP HTTP server binds to inside the container. Fixed at 3000 to match what the gateway proxies to. Should match 'MCP_PORT' on the gateway.",
                      "defaultValue": "8000"
                    },
                    "LOG_LEVEL": {
                      "isOptional": true,
                      "description": "debug | info | warn | error",
                      "defaultValue": "info"
                    },
                    "ACCESS_MODE": {
                      "isOptional": true,
                      "description": "Restricted forces read-only transactions and rejects write — safe default. Set to unrestricted only for dev/throwaway databases where writes are acceptable.",
                      "defaultValue": "restricted"
                    },
                    "GRAFANA_URL": {
                      "isOptional": false,
                      "description": "Required. Base URL of your Grafana instance. On Railway, use the private network: http://<grafana-service>.railway.internal:<port>",
                      "defaultValue": "{{GRAFANA_URL}}"
                    },
                    "ENABLED_TOOLS": {
                      "isOptional": true,
                      "description": "Comma-separated allowlist of tool categories, e.g. loki,prometheus.",
                      "defaultValue": ""
                    },
                    "GRAFANA_PASSWORD": {
                      "isOptional": true,
                      "description": "Grafana auth — set EITHER the service account token (recommended) OR both GRAFANA_USERNAME and GRAFANA_PASSWORD.",
                      "defaultValue": ""
                    },
                    "GRAFANA_USERNAME": {
                      "isOptional": true,
                      "description": "Grafana auth — set EITHER the service account token (recommended) OR both GRAFANA_USERNAME and GRAFANA_PASSWORD.",
                      "defaultValue": ""
                    },
                    "MCP_GRAFANA_SERVER_TOKEN": {
                      "isOptional": true,
                      "description": "Second auth layer — mcp-grafana requires this bearer token from callers. Must equal the gateway's MCP_SERVER_TOKEN.",
                      "defaultValue": "{{MCP_GRAFANA_SERVER_TOKEN}}"
                    },
                    "GRAFANA_SERVICE_ACCOUNT_TOKEN": {
                      "isOptional": true,
                      "description": "Grafana auth — set EITHER the service account token (recommended) OR both GRAFANA_USERNAME and GRAFANA_PASSWORD.",
                      "defaultValue": ""
                    }
                  }
                },
                "4c1d5c30-8355-4e2b-b91a-ad4dada23e6d": {
                  "icon": "https://cdn.simpleicons.org/nginx",
                  "name": "Grafana MCP Gateway",
                  "deploy": {
                    "healthcheckPath": "/healthz"
                  },
                  "source": {
                    "repo": "FournyP/grafana-mcp-railway-template",
                    "rootDirectory": "gateway"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port the Gateway server listens on. Railway injects PORT.",
                      "defaultValue": "80"
                    },
                    "API_KEYS": {
                      "isOptional": false,
                      "description": "Comma-separated list of bearer tokens allowed to call the MCP.",
                      "defaultValue": "{{API_KEYS}}"
                    },
                    "MCP_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the MCP service on Railway's private network. Defaults to mcp.railway.internal. Only override if you rename the MCP service — then set it to .railway.internal.",
                      "defaultValue": "${{Grafana MCP.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MCP_PORT": {
                      "isOptional": false,
                      "description": "Port the MCP service listens on. Defaults to 3000, which matches the MCP service's fixed PORT. Don't change unless you also change PORT on the MCP service.",
                      "defaultValue": "${{\"Grafana MCP\".PORT}}"
                    },
                    "PATH_KEY_AUTH": {
                      "isOptional": true,
                      "description": "`true` also accepts the key as a path segment: /k/<key>/mcp # MCP clients that cannot send an Authorization header need this.",
                      "defaultValue": "false"
                    },
                    "MCP_SERVER_TOKEN": {
                      "isOptional": true,
                      "description": "Credential the gateway presents to the mcp service. Must equal the mcp service's MCP_GRAFANA_SERVER_TOKEN. Required if you enable PATH_KEY_AUTH alongside MCP_GRAFANA_SERVER_TOKEN.",
                      "defaultValue": "${{\"Grafana MCP\".MCP_GRAFANA_SERVER_TOKEN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Grafana MCP Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-04T13:32:45.587Z",
  "generator_version": "0.1.0"
}
