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:
1 parent
4739a13458
commit
f96d4ed696
34 files changed
+260
-3775
No files matched your search
@@ -3,8 +3,6 @@ import { MCPRepository } from "@/database/repositories/mcp";
|
||||
import { MCPInstallerService } from "@/lib/services/mcp-installer";
|
||||
import { MCPValidatorService } from "@/lib/services/mcp-validator";
|
||||
import { DeepNLPService } from "@/lib/services/deepnlp";
|
||||
import { PulseMCPService } from "@/lib/services/pulsemcp";
|
||||
import { MCPCacheRepository } from "@/database/repositories/mcp-cache";
|
||||
import type {
|
||||
InstallationConfig,
|
||||
InstallationProgress,
|
||||
@@ -71,17 +69,6 @@ export async function POST(request: Request) {
|
||||
console.log(`DeepNLP config not found, trying cache...`);
|
||||
}
|
||||
|
||||
// Se não encontrou, tentar cache PulseMCP
|
||||
if (!serverConfig) {
|
||||
const cachedMCP = MCPCacheRepository.findById(mcpId);
|
||||
if (cachedMCP) {
|
||||
serverConfig = PulseMCPService.transformToMCPProvider(cachedMCP);
|
||||
packageName = cachedMCP.package_name || mcpId;
|
||||
packageRegistry = cachedMCP.package_registry;
|
||||
repositoryUrl = cachedMCP.source_code_url;
|
||||
}
|
||||
}
|
||||
|
||||
if (!serverConfig) {
|
||||
throw new Error(`No configuration found for MCP ${mcpId}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user