refactor(api): remove MCP marketplace cache integration

Removed dependencies on MCPCacheRepository and PulseMCPService from MCP routes to simplify installation and listing logic, avoiding reliance on potentially stale cached data and streamlining the codebase. Updated available-for-chat filter to include MCPs without explicit status.
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-29 15:35:15 -03:00
1 parent 4739a13458
commit f96d4ed696
34 files changed
+260 -3775

No files matched your search

+2 -33
View File
@@ -44,34 +44,7 @@ CREATE TABLE IF NOT EXISTS mcp_installations (
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Cache de todos os servidores MCP do marketplace
CREATE TABLE IF NOT EXISTS mcp_marketplace_cache (
id TEXT PRIMARY KEY,
owner TEXT NOT NULL,
repo TEXT NOT NULL,
content_name TEXT NOT NULL,
publisher_id TEXT NOT NULL,
description TEXT,
category TEXT,
subfield TEXT,
field TEXT,
rating REAL DEFAULT 0,
review_cnt INTEGER DEFAULT 0,
content_tag_list TEXT,
thumbnail_picture TEXT,
website TEXT,
detail_url TEXT,
ext_info JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Metadados do cache (última sincronização, total de registros)
CREATE TABLE IF NOT EXISTS mcp_cache_metadata (
key TEXT PRIMARY KEY,
value TEXT NOT NULL,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Marketplace removido: tabelas e índices relacionados ao cache do marketplace foram descontinuados
-- Tabela para rastrear MCPs ativos por conversa
CREATE TABLE IF NOT EXISTS active_mcps (
@@ -93,8 +66,4 @@ CREATE INDEX idx_conversations_updated ON conversations(updated_at DESC);
CREATE INDEX idx_embeddings_message ON embeddings(message_id);
CREATE INDEX idx_mcp_owner_repo ON mcp_installations(owner, repo);
CREATE INDEX idx_mcp_installed_at ON mcp_installations(installed_at DESC);
CREATE INDEX idx_mcp_cache_category ON mcp_marketplace_cache(category);
CREATE INDEX idx_mcp_cache_subfield ON mcp_marketplace_cache(subfield);
CREATE INDEX idx_mcp_cache_rating ON mcp_marketplace_cache(rating DESC);
CREATE INDEX idx_mcp_cache_owner_repo ON mcp_marketplace_cache(owner, repo);
CREATE INDEX idx_mcp_cache_search ON mcp_marketplace_cache(content_name, description);
-- Índices do marketplace removidos