InfoGrab Docs

동적 MCP 서버 등록

요약

동적 MCP 서버 등록을 통해 Teleport 관리자는 Teleport 애플리케이션 서비스 인스턴스가 읽는 정적 구성 파일을 업데이트하지 않고도 새 MCP 서버를 등록하거나(또는 기존 서버를 업데이트/해제할 수 있습니다.

동적 MCP 서버 등록을 통해 Teleport 관리자는 Teleport 애플리케이션 서비스 인스턴스가 읽는 정적 구성 파일을 업데이트하지 않고도 새 MCP 서버를 등록하거나(또는 기존 서버를 업데이트/해제할 수 있습니다.

MCP 서버 리소스는 Teleport 백엔드에 app 리소스로 등록됩니다. 애플리케이션 서비스 인스턴스는 주기적으로 Teleport Auth 서비스에 app 리소스를 쿼리하며, 각 리소스에는 애플리케이션 서비스가 애플리케이션을 프록시하는 데 필요한 정보가 포함되어 있습니다.

필요한 권한#

In order to interact with dynamically registered applications, a user must have a Teleport role with permissions to manage app resources.

In the following example, a role allows a user to perform all possible operations against app resources:

allow:
  rules:
    - resources:
        - app
      verbs: [list, create, read, update, delete]

동적 등록 활성화#

To enable dynamic registration, include a resources section in your Application Service configuration with a list of resource label selectors you'd like this service to monitor for registering:

app_service:
  enabled: true
  resources:
  - labels:
      "*": "*"

You can use a wildcard selector to register all dynamic app resources in the cluster on the Application Service or provide a specific set of labels for a subset:

resources:
- labels:
    "env": "prod"
- labels:
    "env": "test"

MCP 서버 생성#

다음 예제는 docker를 통해 "Everything" MCP 서버를 실행하도록 Teleport를 구성합니다:

kind: app
version: v3
metadata:
  name: everything
  description: The Everything MCP server
  labels:
    env: dev
spec:
  mcp:
    # stdio 기반 MCP 서버를 실행하는 명령어.
    command: "docker"
    # 명령어와 함께 실행할 인수.
    args: ["run", "-i", "--rm", "mcp/everything"]
    # 명령어가 실행될 호스트 사용자 계정 이름.
    # stdio 기반 MCP 서버에는 필수입니다.
    run_as_host_user: "docker"

전체 리소스 스펙 참조를 확인하세요.

리소스를 생성하려면 다음을 실행합니다:

# 로컬 머신에서 tctl을 사용할 수 있도록 tsh로 클러스터에 로그인합니다.
# Auth 서비스 호스트에서 "tsh login"을 먼저 실행하지 않고
# tctl을 실행할 수도 있습니다.
$ tsh login --proxy=teleport.example.com --user=myuser
$ tctl create mcp_server.yaml

리소스가 생성된 후 적어도 하나의 애플리케이션 서비스 인스턴스가 레이블 선택자에 따라 이를 선택하는 한 사용 가능한 MCP 서버 목록(tsh mcp ls 또는 UI에서)에 나타납니다.

기존 애플리케이션 리소스를 업데이트하려면 다음을 실행합니다:

$ tctl create -f mcp_server.yaml

업데이트된 리소스의 레이블이 특정 앱 에이전트와 더 이상 일치하지 않으면, 해당 에이전트의 등록이 해제되고 프록시가 중지됩니다.

리소스를 삭제하려면 다음을 실행합니다:

$ tctl rm app/everything

동적 MCP 서버 등록

원문 보기
요약

동적 MCP 서버 등록을 통해 Teleport 관리자는 Teleport 애플리케이션 서비스 인스턴스가 읽는 정적 구성 파일을 업데이트하지 않고도 새 MCP 서버를 등록하거나(또는 기존 서버를 업데이트/해제할 수 있습니다.

동적 MCP 서버 등록을 통해 Teleport 관리자는 Teleport 애플리케이션 서비스 인스턴스가 읽는 정적 구성 파일을 업데이트하지 않고도 새 MCP 서버를 등록하거나(또는 기존 서버를 업데이트/해제할 수 있습니다.

MCP 서버 리소스는 Teleport 백엔드에 app 리소스로 등록됩니다. 애플리케이션 서비스 인스턴스는 주기적으로 Teleport Auth 서비스에 app 리소스를 쿼리하며, 각 리소스에는 애플리케이션 서비스가 애플리케이션을 프록시하는 데 필요한 정보가 포함되어 있습니다.

필요한 권한#

In order to interact with dynamically registered applications, a user must have a Teleport role with permissions to manage app resources.

In the following example, a role allows a user to perform all possible operations against app resources:

allow:
  rules:
    - resources:
        - app
      verbs: [list, create, read, update, delete]

동적 등록 활성화#

To enable dynamic registration, include a resources section in your Application Service configuration with a list of resource label selectors you'd like this service to monitor for registering:

app_service:
  enabled: true
  resources:
  - labels:
      "*": "*"

You can use a wildcard selector to register all dynamic app resources in the cluster on the Application Service or provide a specific set of labels for a subset:

resources:
- labels:
    "env": "prod"
- labels:
    "env": "test"

MCP 서버 생성#

다음 예제는 docker를 통해 "Everything" MCP 서버를 실행하도록 Teleport를 구성합니다:

kind: app
version: v3
metadata:
  name: everything
  description: The Everything MCP server
  labels:
    env: dev
spec:
  mcp:
    # stdio 기반 MCP 서버를 실행하는 명령어.
    command: "docker"
    # 명령어와 함께 실행할 인수.
    args: ["run", "-i", "--rm", "mcp/everything"]
    # 명령어가 실행될 호스트 사용자 계정 이름.
    # stdio 기반 MCP 서버에는 필수입니다.
    run_as_host_user: "docker"

전체 리소스 스펙 참조를 확인하세요.

리소스를 생성하려면 다음을 실행합니다:

# 로컬 머신에서 tctl을 사용할 수 있도록 tsh로 클러스터에 로그인합니다.
# Auth 서비스 호스트에서 "tsh login"을 먼저 실행하지 않고
# tctl을 실행할 수도 있습니다.
$ tsh login --proxy=teleport.example.com --user=myuser
$ tctl create mcp_server.yaml

리소스가 생성된 후 적어도 하나의 애플리케이션 서비스 인스턴스가 레이블 선택자에 따라 이를 선택하는 한 사용 가능한 MCP 서버 목록(tsh mcp ls 또는 UI에서)에 나타납니다.

기존 애플리케이션 리소스를 업데이트하려면 다음을 실행합니다:

$ tctl create -f mcp_server.yaml

업데이트된 리소스의 레이블이 특정 앱 에이전트와 더 이상 일치하지 않으면, 해당 에이전트의 등록이 해제되고 프록시가 중지됩니다.

리소스를 삭제하려면 다음을 실행합니다:

$ tctl rm app/everything