Grafana MCP 서버를 Teleport에 연결
Teleport can provide secure access to MCP servers via Teleport Application Service. In this guide, you will: Grafana MCP 서버는 Teleport가 서명한 JWT 토큰을 전달하여 Grafana에 접근하고 Teleport 애플리케이션 서비스가 접근할 수 있는 로컬 엔드포인트에서 실행됩니다.
Teleport can provide secure access to MCP servers via Teleport Application Service.
In this guide, you will:
- Configure your Grafana service for access by the MCP server.
- Run the Grafana MCP Server.
- Enroll the MCP server into your Teleport cluster and connect to it.
작동 방식#
Grafana MCP 서버는 Teleport가 서명한 JWT 토큰을 전달하여 Grafana에 접근하고 Teleport 애플리케이션 서비스가 접근할 수 있는 로컬 엔드포인트에서 실행됩니다. Teleport는 모든 클라이언트 요청을 서버로 프록시하며, 서버는 JWT 인증으로 매핑된 권한을 사용하여 Grafana와 상호작용합니다.
사전 요구사항#
-
A running Teleport (v18.3.0 or higher) cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.
-
The `tsh` client.
Installing \`tsh\` client
-
Determine the version of your Teleport cluster. The `tsh` client must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at
/v1/webapi/findand use a JSON query tool to obtain your cluster version. Replace with the web address of your Teleport Proxy Service:$ TELEPORT_DOMAIN= $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')" -
Follow the instructions for your platform to install `tsh` client:
-
- Grafana 인스턴스를 구성할 수 있는 권한.
- MCP 서버를 실행할 Teleport 애플리케이션 서비스가 접근할 수 있는 호스트.
- 실행 중인 Teleport 애플리케이션 서비스. 아직 설정하지 않았다면 시작하기 가이드를 따르세요.
- MCP 서버에 접근할 수 있는 충분한 권한을 가진 Teleport 사용자(예:
mcp-user역할).
1/3단계. Grafana에서 JWT 인증 구성#
Add an auth.jwt section in Grafana’s main configuration file. Replace
위의 헤더 재작성 구성은 각 요청에서 {{internal.jwt}} 템플릿 변수를 Teleport가 서명한 JWT 토큰으로 교체합니다. Grafana MCP 서버는 이 토큰을 Grafana에 연결할 때 "Authorization" 헤더의 bearer 토큰으로 사용합니다.
To grant access to the MCP server and all its tools, assign the preset
mcp-user role to your Teleport user.
Optionally, you can limit which MCP tools the user can access by adjusting the
mcp.tools list in their role. For example:
kind: role
version: v8
metadata:
name: grafana-mcp-readonly
spec:
allow:
app_labels:
'service': 'grafana'
mcp:
tools:
- ^(get|query|list|search|find)_.*$
Now wait until the application appears in tsh mcp ls, then configure your MCP
clients to access the MCP server, for example:
$ tsh mcp config grafana-mcp --client-config claude
After configuring your MCP client, you will find Grafana-related tools from
teleport-mcp-grafana-mcp. You can now use these tools to interactive with
Grafana via Teleport in your MCP clients:

서비스 계정을 사용하여 Grafana에 연결#
JWT 인증으로 Grafana에 접근하는 대신 서비스 계정을 사용할 수도 있습니다.
관리자 > 사용자 및 계정 > 서비스 계정으로 이동한 다음 서비스 계정 생성을 클릭합니다:

서비스 계정을 읽기 전용 접근으로 제한하기 위해 Viewer 역할을 할당합니다.
서비스 계정이 생성된 후 서비스 계정 토큰 추가를 클릭하여 새 토큰을 생성합니다. Grafana MCP 서버를 시작할 때 이 토큰 을 사용합니다:
$ docker run -d -p 8000:8000 \
-e GRAFANA_URL= \
-e GRAFANA_SERVICE_ACCOUNT_TOKEN= \
mcp/grafana --transport streamable-http
마지막으로 Teleport 애플리케이션에서 헤더 재작성을 구성할 필요가 없습니다:
app_service:
enabled: "yes"
apps:
- name: "grafana-mcp"
uri: "mcp+http://MCP_HOST"/>:8000/mcp"
labels:
env: dev
service: grafana
다음 단계#
- JWT 인증으로 Teleport를 통해 Grafana에 접근하는 방법 자세히 읽기.
- Streamable-HTTP MCP 서버 등록 검토.
- 동적 등록 가이드 참조.
- mcp-grafana에 대해 자세히 알아보기.
- MCP 클라이언트 연결.
