InfoGrab Docs

GitHub MCP 서버를 Teleport에 연결

요약

Teleport can provide secure access to MCP servers via Teleport Application Service. In this guide, you will: GitHub MCP 서버는 서비스 계정의 개인 접근 토큰을 사용하여 GitHub에 접근하고 mcp-proxy는 원래 전송 방식을 변환하여 streamable-HTTP 엔드포인트를 통해 Teleport 애플리케이션 서비스에 노출합니다.

Teleport can provide secure access to MCP servers via Teleport Application Service.

In this guide, you will:

  1. Configure your GitHub service for access by the MCP server.
  2. Run the GitHub MCP Server.
  3. Enroll the MCP server into your Teleport cluster and connect to it.

작동 방식#

GitHub MCP 서버는 서비스 계정의 개인 접근 토큰을 사용하여 GitHub에 접근하고 mcp-proxy는 원래 전송 방식을 변환하여 streamable-HTTP 엔드포인트를 통해 Teleport 애플리케이션 서비스에 노출합니다. Teleport는 모든 클라이언트 요청을 서버로 프록시하며, 서버는 서비스 계정에 부여된 권한을 사용하여 GitHub와 상호작용합니다.

사전 요구사항#

  • 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
    1. 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/find and 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')"
      
    2. Follow the instructions for your platform to install `tsh` client:

  • GitHub 조직의 서비스 계정 접근 권한.
  • MCP 서버를 실행할 Teleport 애플리케이션 서비스가 접근할 수 있는 호스트.
  • 실행 중인 Teleport 애플리케이션 서비스. 아직 설정하지 않았다면 시작하기 가이드를 따르세요.
  • MCP 서버에 접근할 수 있는 충분한 권한을 가진 Teleport 사용자(예: mcp-user 역할).

1/3단계. 개인 접근 토큰 생성#

서비스 계정을 사용하여 GitHub에 로그인합니다. 설정 > 개발자 설정 > 개인 접근 토큰으로 이동한 다음 새 토큰 생성을 클릭합니다.

토큰을 생성할 때 최소한의 필요한 권한만 부여합니다. 절대적으로 필요하지 않는 한 쓰기 또는 관리자 접근과 같은 광범위한 범위를 피합니다.

토큰이 생성되면 다음 단계에서 사용하기 위해 저장합니다.

2/3단계. GitHub MCP 서버 실행#

먼저 MCP 서버를 실행할 호스트에 mcp-proxy를 설치합니다:

# 옵션 1: uv 사용 (권장)
$ uv tool install mcp-proxy

# 옵션 2: pipx 사용 (대안)
$ pipx install mcp-proxy

이제 개인 접근 토큰 을 사용하여 mcp-proxy 뒤에서 GitHub MCP 서버를 시작합니다:

$ mcp-proxy \
  --host   --port 8000 \
  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN= \
  ghcr.io/github/github-mcp-server

를 MCP 서버를 실행하는 호스트 머신의 호스트명으로 교체합니다. 해당 호스트는 Teleport 애플리케이션 서비스에서 접근할 수 있어야 합니다.

시작 후 mcp-proxyhttp://:8000/mcp에 streamable-HTTP 엔드포인트를 노출합니다.

3/3단계. Teleport를 통한 연결#

You can register an MCP application in Teleport by defining it in your Teleport Application Service configuration, or by using dynamic registration with tctl or Terraform:

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: github-mcp-readonly
spec:
  allow:
    app_labels:
      'service': 'github'
    mcp:
      tools:
      - ^(get|search|list)_.*$
      - ^.*_read$

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 github-mcp --client-config claude

After configuring your MCP client, you will find GitHub-related tools from teleport-mcp-github-mcp. You can now use these tools to interactive with GitHub via Teleport in your MCP clients:

Grafana Claude

서비스 계정 없이 GitHub에 연결#

서비스 계정의 개인 접근 토큰을 사용하는 대신 각 Teleport 사용자가 클라이언트 측에서 자체 토큰을 제공하도록 요구할 수 있습니다. 이렇게 하면 mcp-proxy를 실행할 필요가 없어 MCP 서버를 구성할 때 공식 MCP 서버를 직접 사용할 수 있습니다:

app_service:
  enabled: "yes"
  apps:
  - name: "github-mcp"
    uri: "mcp+https://api.githubcopilot.com/mcp/"
    labels:
      env: dev
      service: github

MCP 클라이언트를 구성할 때 Authorization 헤더의 bearer 토큰으로 자신의 개인 접근 토큰을 사용합니다:

$ tsh mcp config github-mcp --client-config claude --header "Authorization: Bearer "

다음 단계#

GitHub MCP 서버를 Teleport에 연결

원문 보기
요약

Teleport can provide secure access to MCP servers via Teleport Application Service. In this guide, you will: GitHub MCP 서버는 서비스 계정의 개인 접근 토큰을 사용하여 GitHub에 접근하고 mcp-proxy는 원래 전송 방식을 변환하여 streamable-HTTP 엔드포인트를 통해 Teleport 애플리케이션 서비스에 노출합니다.

Teleport can provide secure access to MCP servers via Teleport Application Service.

In this guide, you will:

  1. Configure your GitHub service for access by the MCP server.
  2. Run the GitHub MCP Server.
  3. Enroll the MCP server into your Teleport cluster and connect to it.

작동 방식#

GitHub MCP 서버는 서비스 계정의 개인 접근 토큰을 사용하여 GitHub에 접근하고 mcp-proxy는 원래 전송 방식을 변환하여 streamable-HTTP 엔드포인트를 통해 Teleport 애플리케이션 서비스에 노출합니다. Teleport는 모든 클라이언트 요청을 서버로 프록시하며, 서버는 서비스 계정에 부여된 권한을 사용하여 GitHub와 상호작용합니다.

사전 요구사항#

  • 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
    1. 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/find and 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')"
      
    2. Follow the instructions for your platform to install `tsh` client:

  • GitHub 조직의 서비스 계정 접근 권한.
  • MCP 서버를 실행할 Teleport 애플리케이션 서비스가 접근할 수 있는 호스트.
  • 실행 중인 Teleport 애플리케이션 서비스. 아직 설정하지 않았다면 시작하기 가이드를 따르세요.
  • MCP 서버에 접근할 수 있는 충분한 권한을 가진 Teleport 사용자(예: mcp-user 역할).

1/3단계. 개인 접근 토큰 생성#

서비스 계정을 사용하여 GitHub에 로그인합니다. 설정 > 개발자 설정 > 개인 접근 토큰으로 이동한 다음 새 토큰 생성을 클릭합니다.

토큰을 생성할 때 최소한의 필요한 권한만 부여합니다. 절대적으로 필요하지 않는 한 쓰기 또는 관리자 접근과 같은 광범위한 범위를 피합니다.

토큰이 생성되면 다음 단계에서 사용하기 위해 저장합니다.

2/3단계. GitHub MCP 서버 실행#

먼저 MCP 서버를 실행할 호스트에 mcp-proxy를 설치합니다:

# 옵션 1: uv 사용 (권장)
$ uv tool install mcp-proxy

# 옵션 2: pipx 사용 (대안)
$ pipx install mcp-proxy

이제 개인 접근 토큰 을 사용하여 mcp-proxy 뒤에서 GitHub MCP 서버를 시작합니다:

$ mcp-proxy \
  --host   --port 8000 \
  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN= \
  ghcr.io/github/github-mcp-server

를 MCP 서버를 실행하는 호스트 머신의 호스트명으로 교체합니다. 해당 호스트는 Teleport 애플리케이션 서비스에서 접근할 수 있어야 합니다.

시작 후 mcp-proxyhttp://:8000/mcp에 streamable-HTTP 엔드포인트를 노출합니다.

3/3단계. Teleport를 통한 연결#

You can register an MCP application in Teleport by defining it in your Teleport Application Service configuration, or by using dynamic registration with tctl or Terraform:

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: github-mcp-readonly
spec:
  allow:
    app_labels:
      'service': 'github'
    mcp:
      tools:
      - ^(get|search|list)_.*$
      - ^.*_read$

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 github-mcp --client-config claude

After configuring your MCP client, you will find GitHub-related tools from teleport-mcp-github-mcp. You can now use these tools to interactive with GitHub via Teleport in your MCP clients:

Grafana Claude

서비스 계정 없이 GitHub에 연결#

서비스 계정의 개인 접근 토큰을 사용하는 대신 각 Teleport 사용자가 클라이언트 측에서 자체 토큰을 제공하도록 요구할 수 있습니다. 이렇게 하면 mcp-proxy를 실행할 필요가 없어 MCP 서버를 구성할 때 공식 MCP 서버를 직접 사용할 수 있습니다:

app_service:
  enabled: "yes"
  apps:
  - name: "github-mcp"
    uri: "mcp+https://api.githubcopilot.com/mcp/"
    labels:
      env: dev
      service: github

MCP 클라이언트를 구성할 때 Authorization 헤더의 bearer 토큰으로 자신의 개인 접근 토큰을 사용합니다:

$ tsh mcp config github-mcp --client-config claude --header "Authorization: Bearer "

다음 단계#