MCP 접근 시작하기 가이드
Teleport v18.9Teleport는 MCP(Model Context Protocol) 서버에 대한 보안 연결을 제공하면서 접근 제어와 가시성을 모두 향상시킬 수 있습니다. 이 가이드에서 다음 방법을 보여드립니다: Teleport 애플리케이션 서비스에는 MCP 접근 작동 방식을 보여주도록 설계된 내장 데모 MCP 서버가 포함되어 있습니다.
Teleport는 MCP(Model Context Protocol) 서버에 대한 보안 연결을 제공하면서 접근 제어와 가시성을 모두 향상시킬 수 있습니다.
이 가이드에서 다음 방법을 보여드립니다:
- Teleport 클러스터에 Teleport 데모 MCP 서버 등록.
- Teleport를 통한 MCP 서버 연결.
작동 방식#
Teleport 애플리케이션 서비스에는 MCP 접근 작동 방식을 보여주도록 설계된 내장 데모 MCP 서버가 포함되어 있습니다.
사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다. 성공적으로 인가되면 tsh는 애플리케이션 서비스와 세션을 설정합니다.
세션이 설정되면 애플리케이션 서비스가 인메모리 데모 MCP 서버를 시작합니다. 그런 다음 Teleport는 클라이언트와 원격 MCP 서버 사이의 연결을 프록시하여 사용자에게 사용 가능한 도구를 필터링하는 등 추가적인 역할 기반 접근 제어를 적용합니다. 프록시 중에 Teleport는 MCP 프로토콜 요청을 감사 이벤트로 기록하여 사용자 활동에 대한 가시성을 제공합니다.
사전 요구사항#
-
실행 중인 Teleport (v18.1.0 or higher) 클러스터. Teleport를 시작하려면 무료 체험판에 가입하거나 데모 환경을 구성하세요.
-
tctlandtshclients.Installing `tctl` and `tsh` clients
-
Teleport 클러스터의 버전을 확인합니다.
tctlandtshclients는 Teleport 클러스터 버전보다 최대 한 개의 메이저 버전까지만 뒤처질 수 있습니다. Proxy Service의/v1/webapi/find로 GET 요청을 보내고 JSON 쿼리 도구를 사용하여 클러스터 버전을 확인합니다.teleport.example.com:443를 Teleport Proxy Service의 웹 주소로 바꿉니다:$ TELEPORT_DOMAIN=teleport.example.com:443 $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')" -
사용 중인 플랫폼에 대한 지침에 따라
tctlandtshclients를 설치합니다:
-
Mac
`tctl` and `tsh` clients가 포함된, 서명된 Teleport macOS .pkg 설치 프로그램을 다운로드합니다:
```code
$ curl -O https://cdn.teleport.dev/teleport-${TELEPORT_VERSION?}.pkg
```
Finder에서 `pkg` 파일을 더블 클릭하여 설치를 시작합니다.
Homebrew를 사용하여 Teleport를 설치하는 것은 지원되지 않습니다. Homebrew의
Teleport 패키지는 Teleport에서 유지 관리하지 않으므로 신뢰성이나 보안을
보장할 수 없습니다.
Windows - Powershell
```code
$ curl.exe -O https://cdn.teleport.dev/teleport-v${TELEPORT_VERSION?}-windows-amd64-bin.zip
# Unzip the archive and move the `tctl` and `tsh` clients to your %PATH%
# NOTE: Do not place the `tctl` and `tsh` clients in the System32 directory, as this can cause issues when using WinSCP.
# Use %SystemRoot% (C:\Windows) or %USERPROFILE% (C:\Users\<username>) instead.
```
Linux
Linux 설치판의 모든 Teleport 바이너리에는 `tctl` and `tsh` clients가 포함되어 있습니다. RPM/DEB
패키지 및 i386/ARM/ARM64용 다운로드를 포함한 더 많은 옵션은
[설치 페이지](../installation/installation.mdx)를 참조하세요.
```code
$ curl -O https://cdn.teleport.dev/teleport-v${TELEPORT_VERSION?}-linux-amd64-bin.tar.gz
$ tar -xzf teleport-v${TELEPORT_VERSION?}-linux-amd64-bin.tar.gz
$ cd teleport
$ sudo ./install
# Teleport binaries have been copied to /usr/local/bin
```
- Teleport 애플리케이션 서비스를 실행할 호스트(예: EC2 인스턴스).
1/3단계. Teleport 애플리케이션 서비스 구성#
데모 MCP 서버를 활성화하기 위해 기존 애플리케이션 서비스를 업데이트하거나 새로 생성할 수 있습니다.
이미 실행 중인 애플리케이션 서비스가 있다면 YAML 구성에 다음을 추가하여 데모 MCP 서버를 활성화할 수 있습니다:
app_service:
enabled: true
+ mcp_demo_server: true
...
이제 애플리케이션 서비스를 재시작합니다.
조인 토큰 얻기#
Application Service가 Teleport 클러스터에 조인하려면 유효한 조인 토큰이 필요합니다.
다음 tctl 명령을 실행하고 Application Service를 실행할 서버에서
토큰 출력을 /tmp/token에 저장합니다:
$ tctl tokens add --type=app --format=text
(=presets.tokens.first=)
대체 방법
AWS에 많은 인프라를 보유하고 있거나 많은 인스턴스를 생성 또는 재생성할 수 있는 사용자의 경우, Teleport를 실행하는 새 EC2 인스턴스를 조인하는 대체 방법을 고려하십시오:
Teleport 애플리케이션 서비스 설치#
Teleport 애플리케이션 서비스를 실행할 호스트에 Teleport를 설치합니다:
Linux 서버에 Teleport Agent를 설치하려면:
권장 설치 방법은 클러스터 설치 스크립트입니다. 이 스크립트는 클러스터에 맞는 올바른 버전, 에디션, 설치 모드를 선택합니다.
-
teleport.example.com:443에 Teleport 클러스터의 호스트명과 포트를 할당하되, 스킴(https://)은 포함하지 마십시오. -
클러스터의 설치 스크립트를 실행하십시오:
$ curl "https://teleport.example.com:443/scripts/install.sh" | sudo bash
Teleport 애플리케이션 서비스 구성#
Teleport 애플리케이션 서비스를 실행할 호스트에서 구성 파일을 생성합니다:
$ sudo teleport configure \
-o file \
--roles=app \
--proxy=teleport.example.com:443 \
--token=/tmp/token \
--mcp-demo-server
이 명령은 데모 MCP 서버를 프록시하기 위한 애플리케이션 서비스 구성을 생성하고 구성을 /etc/teleport.yaml에 저장합니다.
Teleport 애플리케이션 서비스 시작#
systemd 서비스를 생성하여 호스트가 부팅될 때 the Application Service이 자동으로 시작되도록 구성합니다. 지침은 the Application Service을 어떻게 설치했는지에 따라 다릅니다.
Package Manager
the Application Service을 실행할 호스트에서 Teleport를 활성화하고 시작합니다:
$ sudo systemctl enable teleport
$ sudo systemctl start teleport
TAR Archive
the Application Service을 실행할 호스트에서 Teleport용 systemd 서비스 구성을 생성하고, Teleport 서비스를 활성화한 후 Teleport를 시작합니다:
$ sudo teleport install systemd -o /etc/systemd/system/teleport.service
$ sudo systemctl enable teleport
$ sudo systemctl start teleport
systemctl status teleport로 the Application Service의 상태를 확인하고 journalctl -fu teleport로
로그를 볼 수 있습니다.
2/3단계. Teleport 사용자 구성#
이 단계에서는 Teleport 사용자에게 모든 MCP 서버와 그 MCP 도구에 대한 액세스 권한을 부여합니다.
Configure an existing user
기존 Teleport 사용자가 있다면 해당 사용자에게 사전 설정 role인 mcp-user를
할당합니다. mcp-user role은 모든 MCP 서버와 그 도구에 대한 액세스를 허용합니다:
kind: role
version: v8
metadata:
description: Access to MCP servers
labels:
teleport.internal/resource-type: preset
name: mcp-user
spec:
allow:
app_labels:
'teleport.internal/app-sub-kind': 'mcp'
mcp:
tools:
- '*'
또는 위의 allow 권한을 기존 Teleport role에 추가할 수도 있습니다.
Create a new user
MCP 액세스 권한을 가진 my_user라는 새 로컬 사용자를 생성합니다:
$ tctl users add my_user --roles=mcp-user
Web UI를 사용하여 역할을 생성하고 편집할 수도 있습니다. Access -> Roles로 이동하여 Create New Role을 클릭하거나 편집할 기존 역할을 선택하십시오.
3/3단계. 연결#
방금 생성한 사용자 my_user로 Teleport에 로그인합니다:
$ tsh login --proxy=teleport.example.com:443 --user=my_user
이제 사용 가능한 MCP 서버를 확인할 수 있습니다:
$ tsh mcp ls
Name Description Type Labels
----------------- ----------------------------------------------------------------- ----- ------
teleport-mcp-demo A demo MCP server that shows current user and session information stdio
MCP 클라이언트가 연결할 수 있도록 구성을 표시하려면 다음을 실행합니다.
$ tsh mcp config teleport-mcp-demo
Found MCP servers:
everything
Here is a sample JSON configuration for launching Teleport MCP servers:
{
"mcpServers": {
"teleport-mcp-teleport-mcp-demo": {
"command": "/path/to/tsh",
"args": ["mcp", "connect", "teleport-mcp-demo"]
}
}
}
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
MCP 클라이언트 구성이 업데이트되면, MCP 클라이언트에 허용된 도구와 함께
teleport-mcp-teleport-mcp-demo MCP 서버가 나타나는 것을 확인할 수 있습니다.
데모 MCP 서버는 여러 도구로 구성되어 있습니다:
teleport_user_info: Teleport 사용자에 대한 기본 정보를 표시합니다.teleport_session_info: 이 MCP 세션에 대한 정보를 표시합니다.teleport_demo_info: 이 Teleport 데모 MCP 서버에 대한 정보를 표시합니다.
"이 Teleport 데모에 대한 세부사항을 보여줄 수 있나요?"와 같은 샘플 질문으로 상호작용할 수 있습니다:

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