McpServerRegistryService — DDL appendix¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
Dialect shown: SQL Server (nvarchar, uniqueidentifier, datetimeoffset). Migrations are authored as FluentMigrator classes in the service's DatabaseModel.Migrations project; the TenantId column and the NHibernate tenant filter follow canonical ADR-0100 in SharedDb mode.
dbo.McpServers¶
Owner: McpServer
CREATE TABLE [dbo].[McpServers] (
[ServerId] nvarchar(128) NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[Name] nvarchar(256) NOT NULL,
[Direction] int NOT NULL,
[Transport] int NOT NULL,
[EndpointRef] nvarchar(512) NULL,
[CommandRef] nvarchar(512) NULL,
[Authentication] int NOT NULL,
[GovernancePolicyRef] nvarchar(256) NOT NULL,
[ProtocolVersion] nvarchar(32) NOT NULL,
[State] int NOT NULL,
[ReleaseId] nvarchar(256) NULL,
[LastHandshakeAt] datetimeoffset NULL,
[Version] rowversion NOT NULL,
CONSTRAINT [PK_McpServers] PRIMARY KEY ([ServerId])
);
CREATE INDEX [IX_McpServers_Tenant_State] ON [dbo].[McpServers] ([TenantId], [State], [Direction]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
ServerId |
nvarchar(128) |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
Name |
nvarchar(256) |
no | ||
Direction |
int |
no | ||
Transport |
int |
no | ||
EndpointRef |
nvarchar(512) |
yes | ||
CommandRef |
nvarchar(512) |
yes | ||
Authentication |
int |
no | ||
GovernancePolicyRef |
nvarchar(256) |
no | ||
ProtocolVersion |
nvarchar(32) |
no | ||
State |
int |
no | ||
ReleaseId |
nvarchar(256) |
yes | ||
LastHandshakeAt |
datetimeoffset |
yes | ||
Version |
rowversion |
no |
dbo.McpToolBindings¶
Owner: McpToolBinding
CREATE TABLE [dbo].[McpToolBindings] (
[ServerId] nvarchar(128) NOT NULL,
[ToolName] nvarchar(256) NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[SchemaHash] nvarchar(128) NOT NULL,
[ToolId] nvarchar(128) NULL,
[ToolVersion] nvarchar(32) NULL,
[DeclaredClass] nvarchar(16) NULL,
[Bound] bit NOT NULL DEFAULT (0),
CONSTRAINT [PK_McpToolBindings] PRIMARY KEY ([ServerId], [ToolName])
);
ALTER TABLE [dbo].[McpToolBindings] ADD CONSTRAINT [FK_McpToolBindings_McpServers_ServerId] FOREIGN KEY ([ServerId]) REFERENCES [dbo].[McpServers] ([ServerId]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
ServerId |
nvarchar(128) |
no | PK FK → McpServers.ServerId | |
ToolName |
nvarchar(256) |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
SchemaHash |
nvarchar(128) |
no | ||
ToolId |
nvarchar(128) |
yes | ||
ToolVersion |
nvarchar(32) |
yes | ||
DeclaredClass |
nvarchar(16) |
yes | ||
Bound |
bit |
no |
dbo.McpResourceBindings¶
Owner: McpResourceBinding
CREATE TABLE [dbo].[McpResourceBindings] (
[ServerId] nvarchar(128) NOT NULL,
[ResourceUri] nvarchar(1024) NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[SourceId] uniqueidentifier NULL,
[Classification] nvarchar(16) NOT NULL,
CONSTRAINT [PK_McpResourceBindings] PRIMARY KEY ([ServerId], [ResourceUri])
);
ALTER TABLE [dbo].[McpResourceBindings] ADD CONSTRAINT [FK_McpResourceBindings_McpServers_ServerId] FOREIGN KEY ([ServerId]) REFERENCES [dbo].[McpServers] ([ServerId]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
ServerId |
nvarchar(128) |
no | PK FK → McpServers.ServerId | |
ResourceUri |
nvarchar(1024) |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
SourceId |
uniqueidentifier |
yes | ||
Classification |
nvarchar(16) |
no |
dbo.McpPromptBindings¶
Owner: McpPromptBinding
CREATE TABLE [dbo].[McpPromptBindings] (
[ServerId] nvarchar(128) NOT NULL,
[PromptName] nvarchar(256) NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[SkillId] nvarchar(128) NULL,
[WorkflowStepRef] nvarchar(256) NULL,
CONSTRAINT [PK_McpPromptBindings] PRIMARY KEY ([ServerId], [PromptName])
);
ALTER TABLE [dbo].[McpPromptBindings] ADD CONSTRAINT [FK_McpPromptBindings_McpServers_ServerId] FOREIGN KEY ([ServerId]) REFERENCES [dbo].[McpServers] ([ServerId]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
ServerId |
nvarchar(128) |
no | PK FK → McpServers.ServerId | |
PromptName |
nvarchar(256) |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
SkillId |
nvarchar(128) |
yes | ||
WorkflowStepRef |
nvarchar(256) |
yes |