InfoGrab Docs

Stdio MCP 서버를 통한 MCP 접근

요약

Teleport는 stdio 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다. 이 가이드에서 다음 방법을 보여드립니다: 사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다.

Teleport는 stdio 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다.

이 가이드에서 다음 방법을 보여드립니다:

  • Teleport 클러스터에 stdio 전송 방식의 MCP 서버 등록.
  • Teleport를 통한 stdio MCP 서버 연결.

작동 방식#

작동 방식

사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다. 성공적으로 인가되면 tsh는 애플리케이션 서비스와 세션을 설정합니다.

Teleport 애플리케이션 서비스는 Teleport 관리자가 앱 정의에서 정의한 명령어와 인수를 사용하여 MCP 서버를 시작합니다. 그런 다음 Teleport는 클라이언트와 원격 MCP 서버 사이의 연결을 프록시하여 사용자에게 사용 가능한 도구를 필터링하는 등 추가적인 역할 기반 접근 제어를 적용합니다. 프록시 중에 Teleport는 MCP 프로토콜 요청을 감사 이벤트로 기록하여 사용자 활동에 대한 가시성을 제공합니다.

사전 요구사항#

  • A running Teleport (v18.1.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 tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients 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 tctl and tsh clients:

  • Teleport 애플리케이션 서비스를 실행할 호스트(예: EC2 인스턴스).
  • npx 또는 docker와 같이 stdio 기반 MCP 서버를 시작할 수 있는 같은 호스트의 도구.

1/3단계. Teleport 애플리케이션 서비스 구성#

MCP 서버를 활성화하기 위해 기존 애플리케이션 서비스를 업데이트하거나 새로 생성할 수 있습니다.

이미 실행 중인 애플리케이션 서비스가 있다면 YAML 구성에 MCP 서버를 추가할 수 있습니다:

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

원하는 MCP 서버로 MCP 세부사항을 교체한 다음 애플리케이션 서비스를 재시작합니다.

조인 토큰 얻기#

The Application Service requires a valid join token to join your Teleport cluster. Run the following tctl command and save the token output in /tmp/token on the server that will run the Application Service:

$ tctl tokens add --type=app --format=text
(=presets.tokens.first=)
Alternative methods

For users with a lot of infrastructure in AWS, or who might create or recreate many instances, consider alternative methods for joining new EC2 instances running Teleport:

Teleport 애플리케이션 서비스 설치#

Teleport 애플리케이션 서비스를 실행할 호스트에 Teleport를 설치합니다:

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

Teleport 애플리케이션 서비스 구성#

Teleport 애플리케이션 서비스를 실행할 호스트에서 /etc/teleport.yaml에 다음 내용으로 파일을 생성합니다:

version: v3
teleport:
  join_params:
    token_name: "/tmp/token"
    method: token
  proxy_server: "


You can check the status of the Application Service with systemctl status teleport and view its logs with journalctl -fu teleport.

2/3단계. Teleport 사용자 구성#

In this step, you will grant your Teleport user access to all MCP servers and their MCP tools.

(!docs/pages/includes/create-role-using-web.mdx!)

3/3단계. 연결#

방금 생성한 사용자 로 Teleport에 로그인합니다:

$ tsh login --proxy= --user=

이제 사용 가능한 MCP 서버를 확인할 수 있습니다:

$ tsh mcp ls
Name       Description           Type  Labels
---------- --------------------- ----- ----------
everything everything MCP server stdio env=dev

To show configurations for your MCP client to connect:

$ tsh mcp config everything
Found MCP servers:
everything

Here is a sample JSON configuration for launching Teleport MCP servers:
{
  "mcpServers": {
    "teleport-mcp-everything": {
      "command": "/path/to/tsh",
      "args": ["mcp", "connect", "everything"]
    }
  }
}

Tip: You can use this command to update your MCP servers configuration file automatically.
- For Claude Desktop, use --client-config=claude to update the default configuration.
- For Cursor, use --client-config=cursor to update the global MCP servers configuration.
In addition, you can use --client-config=<path> to specify a config file location that is compatible with the "mcpServers" mapping.
For example, you can update a Cursor project using --client-config=<path-to-project>/.cursor/mcp.json

Once your MCP client configuration is updated, you will see teleport-mcp-everything MCP server with allowed tools appear in your MCP client.

다음 단계#

다음 주제에서 Teleport로 MCP 서버를 보호하는 방법에 대해 자세히 알아보세요:

Stdio MCP 서버를 통한 MCP 접근

원문 보기
요약

Teleport는 stdio 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다. 이 가이드에서 다음 방법을 보여드립니다: 사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다.

Teleport는 stdio 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다.

이 가이드에서 다음 방법을 보여드립니다:

  • Teleport 클러스터에 stdio 전송 방식의 MCP 서버 등록.
  • Teleport를 통한 stdio MCP 서버 연결.

작동 방식#

작동 방식

사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다. 성공적으로 인가되면 tsh는 애플리케이션 서비스와 세션을 설정합니다.

Teleport 애플리케이션 서비스는 Teleport 관리자가 앱 정의에서 정의한 명령어와 인수를 사용하여 MCP 서버를 시작합니다. 그런 다음 Teleport는 클라이언트와 원격 MCP 서버 사이의 연결을 프록시하여 사용자에게 사용 가능한 도구를 필터링하는 등 추가적인 역할 기반 접근 제어를 적용합니다. 프록시 중에 Teleport는 MCP 프로토콜 요청을 감사 이벤트로 기록하여 사용자 활동에 대한 가시성을 제공합니다.

사전 요구사항#

  • A running Teleport (v18.1.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 tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients 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 tctl and tsh clients:

  • Teleport 애플리케이션 서비스를 실행할 호스트(예: EC2 인스턴스).
  • npx 또는 docker와 같이 stdio 기반 MCP 서버를 시작할 수 있는 같은 호스트의 도구.

1/3단계. Teleport 애플리케이션 서비스 구성#

MCP 서버를 활성화하기 위해 기존 애플리케이션 서비스를 업데이트하거나 새로 생성할 수 있습니다.

이미 실행 중인 애플리케이션 서비스가 있다면 YAML 구성에 MCP 서버를 추가할 수 있습니다:

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

원하는 MCP 서버로 MCP 세부사항을 교체한 다음 애플리케이션 서비스를 재시작합니다.

조인 토큰 얻기#

The Application Service requires a valid join token to join your Teleport cluster. Run the following tctl command and save the token output in /tmp/token on the server that will run the Application Service:

$ tctl tokens add --type=app --format=text
(=presets.tokens.first=)
Alternative methods

For users with a lot of infrastructure in AWS, or who might create or recreate many instances, consider alternative methods for joining new EC2 instances running Teleport:

Teleport 애플리케이션 서비스 설치#

Teleport 애플리케이션 서비스를 실행할 호스트에 Teleport를 설치합니다:

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

Teleport 애플리케이션 서비스 구성#

Teleport 애플리케이션 서비스를 실행할 호스트에서 /etc/teleport.yaml에 다음 내용으로 파일을 생성합니다:

version: v3
teleport:
  join_params:
    token_name: "/tmp/token"
    method: token
  proxy_server: "


You can check the status of the Application Service with systemctl status teleport and view its logs with journalctl -fu teleport.

2/3단계. Teleport 사용자 구성#

In this step, you will grant your Teleport user access to all MCP servers and their MCP tools.

(!docs/pages/includes/create-role-using-web.mdx!)

3/3단계. 연결#

방금 생성한 사용자 로 Teleport에 로그인합니다:

$ tsh login --proxy= --user=

이제 사용 가능한 MCP 서버를 확인할 수 있습니다:

$ tsh mcp ls
Name       Description           Type  Labels
---------- --------------------- ----- ----------
everything everything MCP server stdio env=dev

To show configurations for your MCP client to connect:

$ tsh mcp config everything
Found MCP servers:
everything

Here is a sample JSON configuration for launching Teleport MCP servers:
{
  "mcpServers": {
    "teleport-mcp-everything": {
      "command": "/path/to/tsh",
      "args": ["mcp", "connect", "everything"]
    }
  }
}

Tip: You can use this command to update your MCP servers configuration file automatically.
- For Claude Desktop, use --client-config=claude to update the default configuration.
- For Cursor, use --client-config=cursor to update the global MCP servers configuration.
In addition, you can use --client-config=<path> to specify a config file location that is compatible with the "mcpServers" mapping.
For example, you can update a Cursor project using --client-config=<path-to-project>/.cursor/mcp.json

Once your MCP client configuration is updated, you will see teleport-mcp-everything MCP server with allowed tools appear in your MCP client.

다음 단계#

다음 주제에서 Teleport로 MCP 서버를 보호하는 방법에 대해 자세히 알아보세요: