Skip to content

public.mcp_server_connection

Columns

Name Type Default Nullable Children Parents Comment
clientName varchar(255) false Name from the OAuth client registration, e.g. "Claude Code"
firstUsedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
lastUsedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false Updated at most one time each minute
oauthClientId varchar false public.oauth_clients
serverId uuid false public.mcp_server
userId uuid false public.user

Constraints

Name Type Definition
FK_285ef9ea4a8408da7a473bd8add FOREIGN KEY FOREIGN KEY ("oauthClientId") REFERENCES oauth_clients(id) ON DELETE CASCADE
FK_44cbc3141b2934c93bf2e5192b7 FOREIGN KEY FOREIGN KEY ("serverId") REFERENCES mcp_server(id) ON DELETE CASCADE
FK_d0ffd17b8b5e4ad17f21d8414b0 FOREIGN KEY FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE
PK_4f814cb136c3380893f1a417ed3 PRIMARY KEY PRIMARY KEY ("serverId", "userId", "oauthClientId")
mcp_server_connection_clientName_not_null n NOT NULL "clientName"
mcp_server_connection_firstUsedAt_not_null n NOT NULL "firstUsedAt"
mcp_server_connection_lastUsedAt_not_null n NOT NULL "lastUsedAt"
mcp_server_connection_oauthClientId_not_null n NOT NULL "oauthClientId"
mcp_server_connection_serverId_not_null n NOT NULL "serverId"
mcp_server_connection_userId_not_null n NOT NULL "userId"

Indexes

Name Definition
IDX_285ef9ea4a8408da7a473bd8ad CREATE INDEX "IDX_285ef9ea4a8408da7a473bd8ad" ON public.mcp_server_connection USING btree ("oauthClientId")
IDX_d0ffd17b8b5e4ad17f21d8414b CREATE INDEX "IDX_d0ffd17b8b5e4ad17f21d8414b" ON public.mcp_server_connection USING btree ("userId")
PK_4f814cb136c3380893f1a417ed3 CREATE UNIQUE INDEX "PK_4f814cb136c3380893f1a417ed3" ON public.mcp_server_connection USING btree ("serverId", "userId", "oauthClientId")

Relations

erDiagram

"public.mcp_server_connection" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;oauthClientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.mcp_server_connection" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server_connection" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"

"public.mcp_server_connection" {
  varchar_255_ clientName
  timestamp_3__with_time_zone firstUsedAt
  timestamp_3__with_time_zone lastUsedAt
  varchar oauthClientId FK
  uuid serverId FK
  uuid userId FK
}
"public.oauth_clients" {
  varchar_255_ clientSecret
  bigint clientSecretExpiresAt
  timestamp_3__with_time_zone createdAt
  json grantTypes
  varchar id
  boolean isFirstParty
  varchar_255_ name
  json redirectUris
  varchar_255_ tokenEndpointAuthMethod
  timestamp_3__with_time_zone updatedAt
}
"public.mcp_server" {
  timestamp_3__with_time_zone createdAt
  uuid createdById FK
  timestamp_3__with_time_zone deletedAt
  text description
  uuid id
  varchar_128_ name
  varchar_36_ projectId FK
  varchar_128_ slug
  timestamp_3__with_time_zone updatedAt
}
"public.user" {
  timestamp_3__with_time_zone createdAt
  boolean disabled
  varchar_255_ email
  varchar_32_ firstName
  uuid id
  varchar_16_ kind
  date lastActiveAt
  varchar_32_ lastName
  boolean mfaEnabled
  text mfaRecoveryCodes
  text mfaSecret
  varchar_255_ password
  json personalizationAnswers
  varchar_128_ roleSlug FK
  json settings
  timestamp_3__with_time_zone updatedAt
}

Generated by tbls

Markdown source: View on AtomGit·Content from the open-source project n8/n8n