feat: add built-in MCP service support

This commit is contained in:
AndyYang
2026-03-05 20:31:29 +08:00
committed by lyingbug
parent ead6712955
commit 6dde1330c2
14 changed files with 257 additions and 9 deletions
+2
View File
@@ -250,6 +250,7 @@ CREATE TABLE IF NOT EXISTS mcp_services (
advanced_config TEXT,
stdio_config TEXT,
env_vars TEXT,
is_builtin BOOLEAN NOT NULL DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
deleted_at DATETIME
@@ -257,6 +258,7 @@ CREATE TABLE IF NOT EXISTS mcp_services (
CREATE INDEX IF NOT EXISTS idx_mcp_services_tenant_id ON mcp_services(tenant_id);
CREATE INDEX IF NOT EXISTS idx_mcp_services_enabled ON mcp_services(enabled);
CREATE INDEX IF NOT EXISTS idx_mcp_services_is_builtin ON mcp_services(is_builtin);
CREATE INDEX IF NOT EXISTS idx_mcp_services_deleted_at ON mcp_services(deleted_at);
CREATE TABLE IF NOT EXISTS custom_agents (
@@ -0,0 +1,14 @@
-- ============================================================================
-- Migration 000017 DOWN: Remove is_builtin from mcp_services
-- ============================================================================
DO $ BEGIN RAISE NOTICE '[Migration 000017 DOWN] Removing is_builtin column from mcp_services...'; END $;
-- Drop index
DROP INDEX IF EXISTS idx_mcp_services_is_builtin;
-- Remove is_builtin column
ALTER TABLE mcp_services
DROP COLUMN IF EXISTS is_builtin;
DO $ BEGIN RAISE NOTICE '[Migration 000017 DOWN] is_builtin column removed from mcp_services'; END $;
@@ -0,0 +1,11 @@
-- ============================================================================
-- Migration 000017: Add is_builtin support for MCP services
-- ============================================================================
DO $ BEGIN RAISE NOTICE '[Migration 000017] Adding is_builtin column to mcp_services...'; END $;
-- Add is_builtin column to mcp_services
ALTER TABLE mcp_services ADD COLUMN IF NOT EXISTS is_builtin BOOLEAN NOT NULL DEFAULT false;
CREATE INDEX IF NOT EXISTS idx_mcp_services_is_builtin ON mcp_services(is_builtin);
DO $ BEGIN RAISE NOTICE '[Migration 000017] is_builtin column added to mcp_services'; END $;