Skip to content

Commit c7941f5

Browse files
authored
feat(mcp): implement real Apple Maps search using URL scheme (#1289)
1 parent 63a8f82 commit c7941f5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/presenter/mcpPresenter/inMemoryServers/appleServer.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,11 +1569,16 @@ export class AppleServer {
15691569
if (!parsedArgs.query) {
15701570
throw new Error('Query is required for search operation')
15711571
}
1572+
await runAppleScript(`
1573+
open location "maps://?q=${encodeURIComponent(parsedArgs.query)}"
1574+
delay 0.3
1575+
tell application "Maps" to activate
1576+
`)
15721577
return {
15731578
content: [
15741579
{
15751580
type: 'text' as const,
1576-
text: `Found locations for "${parsedArgs.query}":\n\n• Location 1: ${parsedArgs.query} Restaurant\n• Location 2: ${parsedArgs.query} Store\n• Location 3: ${parsedArgs.query} Center`
1581+
text: `Search for "${parsedArgs.query}" has been launched in Apple Maps app. Please check the Maps window for results.`
15771582
}
15781583
]
15791584
}

0 commit comments

Comments
 (0)