Skip to content

Teleport MCP demo server#56637

Merged
greedy52 merged 5 commits intomasterfrom
STeve/56587_demo_server
Jul 15, 2025
Merged

Teleport MCP demo server#56637
greedy52 merged 5 commits intomasterfrom
STeve/56587_demo_server

Conversation

@greedy52
Copy link
Copy Markdown
Contributor

@greedy52 greedy52 commented Jul 9, 2025

implements #56587

Replaces the in-memory test server with a proper "Teleport Demo" server. This demo server can be started with teleport app start --mcp-demo-server or equivalent config app_service.mcp_demo_server: true.

The demo server allows user to test out MCP access without external MCP server setup.

sample prompts:

  • can you show my teleport user and session info
  • tell me more about the teleport demo

demo: https://goteleport.zoom.us/clips/share/PhJBPNVHR_Ke3IZP4CfvVw

@greedy52 greedy52 self-assigned this Jul 9, 2025
@greedy52 greedy52 added no-changelog Indicates that a PR does not require a changelog entry MCP MCP Server related backport/branch/v18 labels Jul 9, 2025
Comment thread lib/srv/mcp/demo.go
}
}

type inMemoryServerRunner struct {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from stdio_test.go with some minor modifications

@greedy52 greedy52 marked this pull request as ready for review July 9, 2025 19:38
@github-actions github-actions Bot requested review from eriktate and fspmarshall July 9, 2025 19:38
@github-actions github-actions Bot added application-access size/md tctl tctl - Teleport admin tool labels Jul 9, 2025
Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with a handful of mostly non-blocking comments.

Comment thread lib/config/configuration.go
Comment thread tool/tctl/common/app_command.go Outdated
Comment on lines +147 to +153
To run a Teleport demo MCP server for MCP access:

> teleport app start \
--token={{.token}} \{{range .ca_pins}}
--ca-pin={{.}} \{{end}}
--auth-server={{.auth_server}} \
--mcp-demo-server
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would probably not add this here tbh. I think this may confuse people who just want to start a regular app service, MCP seems to be a much more niche use-case for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped.

52507dc

(add added the flag to teleport configure, which should make the getting started guide super easy)

Comment thread tool/teleport/common/usage.go Outdated

> teleport app start --token=xyz --auth-server=proxy.example.com:3080 \
--mcp-demo-server
Runs a Teleport demo MCP server from the app server.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably give a very brief description of what the demo MCP server actually does (functions it provides).

Comment thread tool/teleport/common/teleport.go Outdated
Comment thread lib/srv/mcp/demo.go Outdated
Comment thread lib/srv/mcp/demo.go Outdated
Comment thread lib/srv/mcp/demo.go Outdated
Comment thread lib/srv/mcp/demo.go Outdated
Comment thread lib/srv/mcp/demo.go Outdated
}
}

func makeEnrollMCPGuideToolHandler() mcpserver.ToolHandlerFunc {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an interesting idea to have LLM explain to you how to setup its own integration but I'm worried that a) this is basically a less comprehensive copy of the documentation guide and b) it will deviate from the docs very quickly and/or we'd have to remember to keep this updated. In general, keeping the docs in the code I think should be avoided.

I think instead of this we should have:

  • Clear and easy to follow documentation guide (which we do / will have).
  • A guided and easily discoverable MCP enrollment flow in Discover similar to those we built for other resources.

That would help most users get started quickly, and for those who want to use LLM to help with configuration, I'm pretty sure LLM will already be able to do that once we have the docs up via web search.

So WDYT about removing this particular tool to simplify things for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mini guide in the binary would match what the current binary supports. but i totally agree this is a gimmick and needs to be maintained.

i have tried to give the AI the web link for it to figure out but it doesn't do a good job atm. well, that will improve eventually and it is not the task for this demo.

i've removed this tool and added a teleport_session_info instead.

7bf4ad3

@greedy52 greedy52 requested a review from r0mant July 11, 2025 13:51
@greedy52 greedy52 force-pushed the STeve/56587_demo_server branch from 52507dc to 005e390 Compare July 11, 2025 13:55
Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with one comment

Comment thread lib/srv/mcp/demo.go Outdated
@greedy52 greedy52 enabled auto-merge July 14, 2025 19:18
@greedy52 greedy52 added this pull request to the merge queue Jul 15, 2025
Merged via the queue into master with commit 1a9f35e Jul 15, 2025
42 of 44 checks passed
@greedy52 greedy52 deleted the STeve/56587_demo_server branch July 15, 2025 13:38
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@greedy52 See the table below for backport results.

Branch Result
branch/v18 Failed

@greedy52 greedy52 mentioned this pull request Jul 15, 2025
greedy52 added a commit that referenced this pull request Jul 18, 2025
* Teleport MCP demo server

* replace guide tool with session tool, and switch to resource label

* add new flag to teleport configure

* replace teleport_session_id with mcp_transport_type
github-merge-queue Bot pushed a commit that referenced this pull request Jul 21, 2025
* Initial PostgreSQL MCP support (#54431)

* feat(mcp): initial postgres mcp

* test(postgres): fix missing mock function

* fix(gomod): go mod tidy all

* refactor: code review suggestions

* fix(tsh): mcp init missing logger

* chore(tsh): missing other route to database field

* refactor: use in-memory net listener

* test(tsh): add mcp db command test

* chore: fix license

* refactor(tsh): move logger init

* test(mcp): sort slices to avoid flakiness

* chore: fix lint

* test(mcp): sort the resources before assertion

* fix(mcp): update error handler for better message

* refactor: code review suggestions

* feat: add external error retriever for more accurate error messages

* refactor: use the same logger init for mcp purposes

* refactor: code review suggestions

* refactor(tsh): rename command to `tsh mcp db start`

* refactor(mcp): protect database resources with rw mutex

* chore: update server godocs

* chore: go mod tidy

* refactor: update command to take list of databases

* chore(mcp): license

* chore(tsh): remove unused function

* refactor: code review suggestions

* refactor(tsh): validate duplicated databases in MCP configuration

* refactor(tsh): rename files to mcp_db

* feat(mcp): add cluster name to the database resource

* fix(tsh): update InitLogger return type (#55479)

* MCP access part 1: update app definition and config (#54706)

* MCP access part 1: update app definition and config

* address feedback

* make -C integrations/operator crd

* MCP access part 2: new role options, access checker, role editor (#54734)

* MCP access part 2: new role options, access checker, role editor

* catch unsupported mcp fields

* simplify mcpToolsToModel

* MCP access part 3: audit events and reporting (#54779)

* MCP access part 3: audit events and reporting

* add new icon, storybook, format

* MCP access part 4: mcputils (#54880)

* MCP access part 4: mcp helpers

* address feedback

* address comment, minor edits

* update mcp-go

* MCP access part 5: Claude desktop config parser (#55179)

* claude desktop config

* rework

* split Config to Config and FileConfig

* add a comment on unofficial linux

* MCP access part 6: "tsh mcp ls" (#55292)

* MCP access part 6: "tsh mcp ls"

* address feedback

* MCP access part 7: MCP app in Web UI (#55306)

* MCP access part 7: MCP app in Web UI

* Make spacing in modal closer to what's in database modal

* add mcp app to ResourceActionButton.story.tsx

* move AppSubKind to shared/services/types.

* remove --format claude (not needed see part 8)

* add jsdoc

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* MCP access part 8: tsh mcp config (#55370)

* MCP access part 8: tsh mcp login/logout

* change to --format and --config-file

* switch to config and drop logout

* enable debug by default

* remove unused ut functions

* MCP access part 9: tsh mcp connect, stub server, integration test (#55547)

* MCP access part 9: tsh mcp connect, stub server, integration test

* fix tests and lint

* MCP access part 10: server handler (#55644)

* MCP access part 10: server handler

* address feedback and fix docker tests

* add more comments

* minor lint fix

* move set logger default after other checks

* Implement `tsh mcp db config` (#55781)

* feat(tsh): add `tsh mcp db config` subcommand

* chore(claude): fix lint

* refactor: code review suggestions

* refactor: code review suggestions

* test(tsh): add missing option on test case

* chore(tsh): add message on manually adding database URI

* Refactor MCP database access to dial ALPN proxy directly (#55836)

* refactor: dial database instead of using local proxy for MCP servers

* refactor: review suggestions

* manual fixes

* tctl users add/update to support mcp tools trait (#56771)

* tctl users add/update to support mcp tools trait

* revert empty slice capability

* Enhances MCP servers usage with Cursor (#56474)

* feat(mcp): enhances MCP servers usage with Cursor

* refactor: code review suggestions

* mcputils refactor and new mcptest package (#56010)

* mcp server and mcputils refactor

* mcptest package

* allow testing in mcptest

* Teleport MCP demo server (#56637)

* Teleport MCP demo server

* replace guide tool with session tool, and switch to resource label

* add new flag to teleport configure

* replace teleport_session_id with mcp_transport_type

* feat(gomod): update mcp-go to v0.32.0

* eslint-disable-next-line (same in master)

---------

Co-authored-by: Gabriel Corado <gabriel.oliveira@goteleport.com>
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application-access backport/branch/v18 MCP MCP Server related no-changelog Indicates that a PR does not require a changelog entry size/md tctl tctl - Teleport admin tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants