From 588d81e8f19047110a87196259df9fc2e8dbc0ce Mon Sep 17 00:00:00 2001 From: Kadxy <2230318258@qq.com> Date: Thu, 16 Jan 2025 09:17:08 +0800 Subject: [PATCH] feat: remove unused files --- app/components/mcp-market.tsx | 6 - app/mcp/example.ts | 27 ----- app/mcp/preset-server.json | 203 ---------------------------------- 3 files changed, 236 deletions(-) delete mode 100644 app/mcp/example.ts delete mode 100644 app/mcp/preset-server.json diff --git a/app/components/mcp-market.tsx b/app/components/mcp-market.tsx index 0bd4a7dd6..9aff190b8 100644 --- a/app/components/mcp-market.tsx +++ b/app/components/mcp-market.tsx @@ -102,12 +102,6 @@ export function McpMarketPage() { loadInitialState(); }, []); - // Debug: 监控状态变化 - useEffect(() => { - console.log("MCP Market - Current config:", config); - console.log("MCP Market - Current clientStatuses:", clientStatuses); - }, [config, clientStatuses]); - // 加载当前编辑服务器的配置 useEffect(() => { if (editingServerId && config) { diff --git a/app/mcp/example.ts b/app/mcp/example.ts deleted file mode 100644 index 986196d63..000000000 --- a/app/mcp/example.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { createClient, listTools } from "@/app/mcp/client"; -import { MCPClientLogger } from "@/app/mcp/logger"; -import conf from "./mcp_config.json"; - -const logger = new MCPClientLogger("MCP Server Example", true); - -const TEST_SERVER = "filesystem"; - -async function main() { - logger.info(`All MCP servers: ${Object.keys(conf.mcpServers).join(", ")}`); - - logger.info(`Connecting to server ${TEST_SERVER}...`); - - const client = await createClient(TEST_SERVER, conf.mcpServers[TEST_SERVER]); - const tools = await listTools(client); - - logger.success(`Connected to server ${TEST_SERVER}`); - - logger.info( - `${TEST_SERVER} supported primitives:\n${JSON.stringify(tools, null, 2)}`, - ); -} - -main().catch((error) => { - logger.error(error); - process.exit(1); -}); diff --git a/app/mcp/preset-server.json b/app/mcp/preset-server.json deleted file mode 100644 index 84fe234bd..000000000 --- a/app/mcp/preset-server.json +++ /dev/null @@ -1,203 +0,0 @@ -[ - { - "id": "filesystem", - "name": "Filesystem", - "description": "Secure file operations with configurable access controlsSecure file operations with configurable access controlsSecure file operations with configurable access controlsSecure file operations with configurable access controls", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem", - "tags": ["filesystem", "storage", "local"], - "command": "npx", - "baseArgs": ["-y", "@modelcontextprotocol/server-filesystem"], - "configurable": true, - "configSchema": { - "properties": { - "paths": { - "type": "array", - "description": "Allowed file system paths", - "required": true, - "minItems": 1, - "itemLabel": "Path", - "addButtonText": "Add Path" - } - } - }, - "argsMapping": { - "paths": { - "type": "spread", - "position": 2 - } - } - }, - { - "id": "github", - "name": "GitHub", - "description": "Repository management, file operations, and GitHub API integration", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/github", - "tags": ["github", "git", "api", "vcs"], - "command": "npx", - "baseArgs": ["-y", "@modelcontextprotocol/server-github"], - "configurable": true, - "configSchema": { - "properties": { - "token": { - "type": "string", - "description": "GitHub Personal Access Token", - "required": true - } - } - }, - "argsMapping": { - "token": { - "type": "env", - "key": "GITHUB_PERSONAL_ACCESS_TOKEN" - } - } - }, - { - "id": "gdrive", - "name": "Google Drive", - "description": "File access and search capabilities for Google Drive", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/gdrive", - "tags": ["google", "drive", "storage", "cloud"], - "command": "npx", - "baseArgs": ["-y", "@modelcontextprotocol/server-gdrive"], - "configurable": false - }, - { - "id": "playwright", - "name": "Playwright", - "description": "Browser automation and webscrapping with Playwright", - "repo": "https://github.com/executeautomation/mcp-playwright", - "tags": ["browser", "automation", "scraping"], - "command": "npx", - "baseArgs": ["-y", "@executeautomation/playwright-mcp-server"], - "configurable": false - }, - { - "id": "difyworkflow", - "name": "Dify Workflow", - "description": "Tools to query and execute Dify workflows", - "repo": "https://github.com/gotoolkits/mcp-difyworkflow-server", - "tags": ["workflow", "automation", "dify"], - "command": "mcp-difyworkflow-server", - "baseArgs": ["-base-url"], - "configurable": true, - "configSchema": { - "properties": { - "baseUrl": { - "type": "string", - "description": "Dify API base URL", - "required": true - }, - "workflowName": { - "type": "string", - "description": "Dify workflow name", - "required": true - }, - "apiKeys": { - "type": "string", - "description": "Comma-separated Dify API keys", - "required": true - } - } - }, - "argsMapping": { - "baseUrl": { - "type": "single", - "position": 1 - }, - "workflowName": { - "type": "env", - "key": "DIFY_WORKFLOW_NAME" - }, - "apiKeys": { - "type": "env", - "key": "DIFY_API_KEYS" - } - } - }, - { - "id": "postgres", - "name": "PostgreSQL", - "description": "Read-only database access with schema inspection", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/postgres", - "tags": ["database", "postgresql", "sql"], - "command": "docker", - "baseArgs": ["run", "-i", "--rm", "mcp/postgres"], - "configurable": true, - "configSchema": { - "properties": { - "connectionString": { - "type": "string", - "description": "PostgreSQL connection string", - "required": true - } - } - }, - "argsMapping": { - "connectionString": { - "type": "single", - "position": 4 - } - } - }, - { - "id": "brave-search", - "name": "Brave Search", - "description": "Web and local search using Brave's Search API", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search", - "tags": ["search", "brave", "api"], - "command": "npx", - "baseArgs": ["-y", "@modelcontextprotocol/server-brave-search"], - "configurable": true, - "configSchema": { - "properties": { - "apiKey": { - "type": "string", - "description": "Brave Search API Key", - "required": true - } - } - }, - "argsMapping": { - "apiKey": { - "type": "env", - "key": "BRAVE_API_KEY" - } - } - }, - { - "id": "google-maps", - "name": "Google Maps", - "description": "Location services, directions, and place details", - "repo": "https://github.com/modelcontextprotocol/servers/tree/main/src/google-maps", - "tags": ["maps", "google", "location", "api"], - "command": "npx", - "baseArgs": ["-y", "@modelcontextprotocol/server-google-maps"], - "configurable": true, - "configSchema": { - "properties": { - "apiKey": { - "type": "string", - "description": "Google Maps API Key", - "required": true - } - } - }, - "argsMapping": { - "apiKey": { - "type": "env", - "key": "GOOGLE_MAPS_API_KEY" - } - } - }, - { - "id": "docker-mcp", - "name": "Docker", - "description": "Run and manage docker containers, docker compose, and logs", - "repo": "https://github.com/QuantGeekDev/docker-mcp", - "tags": ["docker", "container", "devops"], - "command": "uvx", - "baseArgs": ["docker-mcp"], - "configurable": false - } -]