Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a6164a0
Initial PostgreSQL MCP support (#54431)
gabrielcorado Jun 4, 2025
8592610
fix(tsh): update InitLogger return type (#55479)
gabrielcorado Jun 6, 2025
b837ad7
MCP access part 1: update app definition and config (#54706)
greedy52 May 29, 2025
f14f324
MCP access part 2: new role options, access checker, role editor (#54…
greedy52 May 29, 2025
b3f09c4
MCP access part 3: audit events and reporting (#54779)
greedy52 May 29, 2025
cf1143e
MCP access part 4: mcputils (#54880)
greedy52 May 29, 2025
0449df4
MCP access part 5: Claude desktop config parser (#55179)
greedy52 May 29, 2025
49f64c4
MCP access part 6: "tsh mcp ls" (#55292)
greedy52 Jun 5, 2025
0322154
MCP access part 7: MCP app in Web UI (#55306)
greedy52 Jun 6, 2025
1af182e
MCP access part 8: tsh mcp config (#55370)
greedy52 Jun 12, 2025
b47d3f7
MCP access part 9: tsh mcp connect, stub server, integration test (#5…
greedy52 Jun 13, 2025
121a5c3
MCP access part 10: server handler (#55644)
greedy52 Jun 23, 2025
e06776b
Implement `tsh mcp db config` (#55781)
gabrielcorado Jun 25, 2025
1d1b7ca
Refactor MCP database access to dial ALPN proxy directly (#55836)
gabrielcorado Jun 26, 2025
bf1ee99
manual fixes
greedy52 Jun 26, 2025
0141c46
tctl users add/update to support mcp tools trait (#56771)
greedy52 Jul 15, 2025
4465e71
Enhances MCP servers usage with Cursor (#56474)
gabrielcorado Jul 9, 2025
a0b3af2
mcputils refactor and new mcptest package (#56010)
greedy52 Jun 25, 2025
d001231
Teleport MCP demo server (#56637)
greedy52 Jul 15, 2025
8946901
Merge branch 'branch/v18' of github.com:gravitational/teleport into S…
greedy52 Jul 18, 2025
02b010f
feat(gomod): update mcp-go to v0.32.0
gabrielcorado Jul 21, 2025
8918618
Merge branch 'branch/v18' of github.com:gravitational/teleport into S…
greedy52 Jul 21, 2025
7b76cc5
eslint-disable-next-line (same in master)
greedy52 Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ linters:
deny:
- pkg: github.com/gravitational/teleport/integration
desc: integration test should not be imported outside of intergation tests
- pkg: github.com/gravitational/teleport/lib/utils/mcptest
desc: testing packages should not be imported outside of _test.go files
logging:
deny:
- pkg: github.com/sirupsen/logrus
Expand Down Expand Up @@ -213,6 +215,7 @@ linters:
- '!**/lib/services/suite/**'
- '!**/lib/tbot/workloadidentity/workloadattest/sigstore/sigstoretest/sigstoretest.go'
- '!**/lib/teleterm/gatewaytest/**'
- '!**/lib/utils/mcptest/**'
- '!**/lib/utils/testutils/**'
- '!**/integration/appaccess/fixtures.go'
- '!**/integration/appaccess/jwt.go'
Expand Down Expand Up @@ -272,6 +275,7 @@ linters:
- '!**/lib/tbot/workloadidentity/workloadattest/sigstore/sigstoretest/sigstoretest.go'
- '!**/lib/teleterm/gatewaytest/**'
- '!**/lib/utils/cli.go'
- '!**/lib/utils/mcptest/**'
- '!**/lib/utils/testutils/**'
- '!**/tool/teleport/testenv/**'
deny:
Expand Down
3 changes: 3 additions & 0 deletions api/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ const (
// TraitGitHubOrgs is the name of the variable to specify the GitHub
// organizations for GitHub integration.
TraitGitHubOrgs = "github_orgs"
// TraitMCPTools is the name of the variable to specify the MCP tools for
// MCP servers.
TraitMCPTools = "mcp_tools"
)

const (
Expand Down
173 changes: 173 additions & 0 deletions api/proto/teleport/legacy/types/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4809,6 +4809,10 @@ message OneOf {
events.AutoUpdateAgentRolloutTrigger AutoUpdateAgentRolloutTrigger = 213;
events.AutoUpdateAgentRolloutForceDone AutoUpdateAgentRolloutForceDone = 214;
events.AutoUpdateAgentRolloutRollback AutoUpdateAgentRolloutRollback = 215;
events.MCPSessionStart MCPSessionStart = 216;
events.MCPSessionEnd MCPSessionEnd = 217;
events.MCPSessionRequest MCPSessionRequest = 218;
events.MCPSessionNotification MCPSessionNotification = 219;
}
}

Expand Down Expand Up @@ -8518,3 +8522,172 @@ message SigstorePolicyDelete {
(gogoproto.jsontag) = ""
];
}

// MCPSessionStart is emitted when a user starts a MCP session.
message MCPSessionStart {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// App is a common application resource metadata.
AppMetadata App = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// MCPSessionEnd is emitted when an MCP session ends.
message MCPSessionEnd {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// App is a common application resource metadata.
AppMetadata App = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}

// MCPJSONRPCMessage includes details of a MCP request or notification.
// https://modelcontextprotocol.io/docs/concepts/transports#requests
message MCPJSONRPCMessage {
// JSONRPC specifies the version of the protocol.
string JSONRPC = 1 [(gogoproto.jsontag) = "jsonrpc"];
// ID is the ID of a request. Notifications have no IDs.
string ID = 2 [(gogoproto.jsontag) = "id,omitempty"];
// Method is the method of this message.
string method = 3 [(gogoproto.jsontag) = "method"];
// Params is the optional parameters.
google.protobuf.Struct params = 5 [
(gogoproto.jsontag) = "params,omitempty",
(gogoproto.casttype) = "Struct"
];
}

// MCPSessionRequest is emitted when a request is sent by client during a MCP session.
message MCPSessionRequest {
// Metadata is a common event metadata
Metadata metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata user = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// App is a common application resource metadata.
AppMetadata App = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Status contains information whether the request is successful or not.
Status status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Message contains details of the message.
MCPJSONRPCMessage message = 6 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "message,omitempty"
];
}

// MCPSessionNotification is emitted when a notification is sent by client
// during a MCP session.
message MCPSessionNotification {
// Metadata is a common event metadata
Metadata metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata user = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// App is a common application resource metadata.
AppMetadata App = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Message contains details of the message.
MCPJSONRPCMessage message = 5 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "message,omitempty"
];
}
25 changes: 25 additions & 0 deletions api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,19 @@ message AppSpecV3 {
// want the app to be accessible from any of them. If `public_addr` is explicitly set in the app spec,
// setting this value to true will overwrite that public address in the web UI.
bool UseAnyProxyPublicAddr = 14 [(gogoproto.jsontag) = "use_any_proxy_public_addr,omitempty"];
// MCP contains MCP server related configurations.
MCP MCP = 15 [(gogoproto.jsontag) = "mcp,omitempty"];
}

// MCP contains MCP server-related configurations.
message MCP {
// Command to launch stdio-based MCP servers.
string command = 1;
// Args to execute with the command.
repeated string args = 2;
// RunAsHostUser is the host user account under which the command will be
// executed. Required for stdio-based MCP servers.
string run_as_host_user = 3;
}

// Rewrite is a list of rewriting rules to apply to requests and responses.
Expand Down Expand Up @@ -3800,6 +3813,9 @@ message RoleConditions {
// WorkloadIdentityLabelsExpression is a predicate expression used to
// allow/deny access to issuing a WorkloadIdentity.
string WorkloadIdentityLabelsExpression = 45 [(gogoproto.jsontag) = "workload_identity_labels_expression,omitempty"];

// MCPPermissions defines MCP servers related permissions.
MCPPermissions MCP = 46 [(gogoproto.jsontag) = "mcp,omitempty"];
}

// IdentityCenterAccountAssignment captures an AWS Identity Center account
Expand All @@ -3814,6 +3830,15 @@ message GitHubPermission {
repeated string organizations = 1 [(gogoproto.jsontag) = "orgs,omitempty"];
}

// MCPPermissions defines MCP servers related permissions.
message MCPPermissions {
// Tools defines the list of tools allowed or denied for this role. Each entry
// can be a literal string, a glob pattern (e.g. "prefix_*"), or a regular
// expression (must start with '^' and end with '$'). If the list is empty, no
// tools are allowed.
repeated string tools = 1;
}

// SPIFFERoleCondition sets out which SPIFFE identities this role is allowed or
// denied to generate. The Path matcher is required, and is evaluated first. If,
// the Path does not match then the other matcher fields are not evaluated.
Expand Down
Loading
Loading