Streamable-HTTP MCP 서버를 통한 MCP 접근
Teleport는 streamable-HTTP 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다. 이 가이드에서 다음 방법을 보여드립니다: 사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다.
Teleport는 streamable-HTTP 전송 방식의 MCP 서버에 대한 보안 접근을 제공할 수 있습니다.
이 가이드에서 다음 방법을 보여드립니다:
- Teleport 클러스터에 streamable-HTTP 전송 방식의 MCP 서버 등록.
- Teleport를 통한 stdio MCP 서버 연결.
작동 방식#
사용자는 Claude Desktop과 같은 MCP 클라이언트를 tsh를 사용하여 MCP 서버를 시작하도록 구성할 수 있습니다. 성공적으로 인가되면 tsh는 애플리케이션 서비스와 세션을 설정합니다.
Teleport는 클라이언트와 원격 MCP 서버 사이에 MCP 프로토콜을 프록시하여 사용자에게 사용 가능한 도구를 필터링하는 등 추가적인 역할 기반 접근 제어를 적용합니다. 프록시 중에 Teleport는 MCP 프로토콜 요청을 감사 이벤트로 기록하여 사용자 활동에 대한 가시성을 제공합니다.
사전 요구사항#
-
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
tctlandtshclients.Installing `tctl` and `tsh` clients
-
Determine the version of your Teleport cluster. The
tctlandtshclients 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
tctlandtshclients:
-
- Teleport 애플리케이션 서비스를 실행할 호스트(예: EC2 인스턴스).
- streamable-HTTP MCP 서버의 엔드포인트 .
1/3단계. Teleport 애플리케이션 서비스 구성#
You can update an existing Application Service or create a new one to enable the the MCP server.
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 Streamable HTTP 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.
streamable-HTTP 클라이언트로 연결#
위에서 시연한 tsh mcp connect 명령은 모든 stdio MCP 클라이언트에서 MCP 세션을 시작하는 데 사용할 수 있으며, Teleport는 원격 MCP 서버로의 전송 변환을 자동으로 처리합니다.
그러나 streamable-HTTP 전송 방식으로 MCP 서버에 연결하려면 원격 MCP 서버에 대한 인증된 터널을 생성하는 로컬 프록시를 시작할 수 있습니다:
$ tsh proxy mcp everything -p 8888
Proxying connections to everything on 127.0.0.1:8888
그런 다음 streamable-HTTP를 지원하는 MCP 클라이언트로 MCP 서버에 로컬로 연결합니다. 예:
$ npx @modelcontextprotocol/inspector --transport http --cli --method tools/list http://127.0.0.1:8888
또는 tsh 대신 Teleport Connect를 사용하여 백그라운드에서 로컬 프록시를 유지할 수 있습니다.
다음 단계#
다음 주제에서 Teleport로 MCP 서버를 보호하는 방법에 대해 자세히 알아보세요:
- MCP 접근 제어.
- MCP 서버에 JWT 인증
- MCP 서버 동적 등록
- 구성 및 CLI 참조.
