Files
Enterprise-Knowledge-Base/migrations/mysql/04-add-mcp-services.sql
T
wizardchen 77b6133e2a feat: Add MCP services support and enhance migration scripts
- Introduced new MCP services functionality, including management routes and integration with the agent service.
- Updated Docker Compose configuration to include a new SQL migration for MCP services.
- Enhanced Makefile with new migration commands for versioning and creating migrations.
- Improved chat component to handle selected MCP services in message processing.
- Updated migration documentation to reflect new strategies and added MCP services migration files.
2025-11-09 03:27:24 +08:00

25 lines
1.0 KiB
SQL

-- 04-add-mcp-services.sql
-- Create MCP services table for managing external MCP (Model Context Protocol) services
-- Create mcp_services table
CREATE TABLE IF NOT EXISTS mcp_services (
id VARCHAR(36) PRIMARY KEY,
tenant_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
description TEXT,
enabled BOOLEAN DEFAULT true,
transport_type VARCHAR(50) NOT NULL COMMENT 'Transport type: sse or http-streamable',
url VARCHAR(512) NOT NULL,
headers JSON COMMENT 'HTTP headers as JSON object',
auth_config JSON COMMENT 'Authentication configuration (API key, token, custom headers)',
advanced_config JSON COMMENT 'Advanced configuration (timeout, retry settings)',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL,
INDEX idx_tenant_id (tenant_id),
INDEX idx_enabled (enabled),
INDEX idx_deleted_at (deleted_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='MCP service configurations';