feat(mcp): enhance MCP installation with status tracking and custom configs
- Add /mcp-servers/ to .gitignore for MCP server installations - Extend mcp_installations table with status, logs, and validation fields - Refactor MCP install route to support custom configs, enable logs, and async installation - Improve MCPSyncService with promise-based syncing to prevent concurrent operations This update improves MCP management by adding robust installation tracking, custom configuration support, and better error handling for a more reliable user experience.
This commit is contained in:
1 parent
1042f2136b
commit
f19bf10ef3
35 files changed
+4743
-429
No files matched your search
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Tipos e interfaces para o sistema de instalação MCP
|
||||
*/
|
||||
|
||||
export type PackageRegistry = "npm" | "pypi" | "cargo" | "other" | null;
|
||||
|
||||
export enum MCPInstallationStatus {
|
||||
PENDING = "pending",
|
||||
CHECKING_DEPENDENCIES = "checking_dependencies",
|
||||
DOWNLOADING = "downloading",
|
||||
INSTALLING = "installing",
|
||||
TESTING = "testing",
|
||||
READY = "ready",
|
||||
FAILED = "failed",
|
||||
}
|
||||
|
||||
export interface InstallationProgress {
|
||||
status: MCPInstallationStatus;
|
||||
message: string;
|
||||
percentage: number;
|
||||
logs?: string[];
|
||||
}
|
||||
|
||||
export interface MCPEnvironment {
|
||||
type: "npm" | "python" | "rust";
|
||||
path: string;
|
||||
executable: string;
|
||||
args?: string[];
|
||||
env?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ValidationResult {
|
||||
success: boolean;
|
||||
protocol: "mcp" | "unknown";
|
||||
tools: Array<{
|
||||
name: string;
|
||||
description?: string;
|
||||
inputSchema?: any;
|
||||
}>;
|
||||
resources?: Array<{
|
||||
uri: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
}>;
|
||||
error?: string;
|
||||
capabilities?: any;
|
||||
}
|
||||
|
||||
export interface SystemDependencies {
|
||||
node: boolean;
|
||||
npm: boolean;
|
||||
python: boolean;
|
||||
pip: boolean;
|
||||
cargo: boolean;
|
||||
git: boolean;
|
||||
}
|
||||
|
||||
export interface InstallationConfig {
|
||||
mcpId: string;
|
||||
packageName: string;
|
||||
packageRegistry: PackageRegistry;
|
||||
repositoryUrl?: string;
|
||||
config: any;
|
||||
enableLogs: boolean;
|
||||
}
|
||||
Reference in new issue
Block a user