diff --git a/src/main/mcp/settings.ts b/src/main/mcp/settings.ts index c20ee64d1..d9c59ab05 100644 --- a/src/main/mcp/settings.ts +++ b/src/main/mcp/settings.ts @@ -292,6 +292,20 @@ const DEFAULT_MCP_SERVERS = { disable: false, type: 'http' as MCPServerType, baseUrl: 'https://api.you.com/mcp?profile=free' + }, + 'serply-search': { + command: '', + args: [], + env: {}, + descriptions: + 'Serply web search MCP (Google, Bing, News, Scholar, Jobs, Maps, Videos, Amazon Shopping, and page scraping). Requires an API key from https://serply.io, set in the X-Api-Key header. Tool reference: https://serply.io/docs.', + icons: '🔍', + disable: false, + type: 'http' as MCPServerType, + baseUrl: 'https://api.serply.io/mcp', + customHeaders: { + 'X-Api-Key': 'YOUR_SERPLY_API_KEY' + } } } satisfies Record>, mcpEnabled: false // MCP functionality is disabled by default diff --git a/test/main/mcp/settings.test.ts b/test/main/mcp/settings.test.ts index 7468e6bd3..ac473849e 100644 --- a/test/main/mcp/settings.test.ts +++ b/test/main/mcp/settings.test.ts @@ -169,6 +169,25 @@ describe('McpSettings', () => { }) }) + it('adds the disabled Serply search MCP server with a key placeholder for existing users', async () => { + const { McpSettings } = await loadHelper('darwin') + const helper = new McpSettings() + const mcpStore = (helper as any).mcpStore + + mcpStore.set('mcpServers', {}) + + const servers = await helper.getMcpServers() + + expect(servers['serply-search']).toMatchObject({ + type: 'http', + baseUrl: 'https://api.serply.io/mcp', + customHeaders: { + 'X-Api-Key': 'YOUR_SERPLY_API_KEY' + }, + enabled: false + }) + }) + it('does not recreate the Apple built-in server after the user removed it', async () => { const { McpSettings } = await loadHelper('darwin') const helper = new McpSettings()