mcp-for-spotlight
Provides tools for searching files via macOS Spotlight (mdfind) by full-text, filename, or raw Spotlight queries, and reading file metadata with mdls.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-for-spotlightfind all PDFs in my Downloads folder containing "invoice""
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-for-spotlight
Ein kleiner MCP-Server (Model Context Protocol), der die macOS-Spotlight-Suche
als Tools bereitstellt. Er kapselt mdfind (Volltext- und Metadaten-Suche über
den Spotlight-Index) und mdls (Metadaten einer Datei). Systemweite
Dateisuche, nicht auf eine App beschränkt.
Was ist ein MCP-Server?
MCP (Model Context Protocol) ist ein offener Standard, über den KI-Anwendungen (der Host, etwa Claude Desktop oder Claude Code) mit externen Werkzeugen und Daten sprechen. Ein Server stellt Fähigkeiten (Tools) bereit und weiß selbst nichts von KI. Kommunikation über JSON-RPC 2.0, hier per stdio.
Related MCP server: @codesift/mcp
Warum Spotlight statt locate oder AppleScript
Spotlight (
mdfind) indexiert Datei-Inhalt und Metadaten (Betreff, Autor, Typ, Datum) und wird live aktualisiert. Der richtige Index für Inhaltssuche.locatekennt nur Datei-Pfade/-Namen, keinen Inhalt, und ist oft veraltet oder inaktiv.AppleScript-
whose(etwa in Mail) ist ein linearer Scan ohne Index.
Tools
Tool | Zweck |
| Dateien per |
| Spotlight-Metadaten einer Datei per |
spotlight_search erwartet genau eine Suchart:
text— Freitext (Volltext + Metadaten), z. B."Quartalsbericht"name— Teilstring im Dateinamenquery— rohe Spotlight-Abfrage, z. B.kMDItemContentType == "com.adobe.pdf" && kMDItemFSName == "*Rechnung*"c
Optional onlyIn (auf ein Verzeichnis begrenzen) und limit (Vorgabe 50).
Installation
npm installKein Build-Schritt: reines ESM-JavaScript, läuft direkt mit Node (>= 18).
Full Disk Access
Geschützte Orte (z. B. ~/Library/Mail, ~/Library/Messages) liefern nur
Treffer, wenn der ausführende Prozess Full Disk Access hat
(Systemeinstellungen → Datenschutz & Sicherheit → Festplattenvollzugriff, dort
das Terminal bzw. den Node-Host freigeben). Ohne FDA sind normale
Nutzerdateien trotzdem durchsuchbar.
Lokal testen
npm run inspectRegistrieren
Claude Code:
claude mcp add spotlight -- node /absolute/path/to/mcp-for-spotlight/src/index.jsClaude Desktop, in ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"spotlight": {
"command": "node",
"args": ["/absolute/path/to/mcp-for-spotlight/src/index.js"]
}
}
}Beispiele
spotlight_search name="Rechnung" onlyIn="/Users/me/Documents"
spotlight_search query='kMDItemContentType == "com.adobe.pdf"' onlyIn="/Users/me/Downloads"
spotlight_metadata path="/Users/me/Downloads/x.pdf" attributes=["kMDItemContentCreationDate"]Lizenz
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA minimal and extensible local MCP server that provides core utilities like ping and echo alongside a file search tool integrated with the Everything CLI. It enables fast local file searching and service testing through a standardized stdio transport layer.Last updated
- Alicense-qualityBmaintenanceMCP server for local-first lexical code search, providing tools for searching code, finding symbols, and reading chunks from indexed repositories.Last updatedMIT
- Alicense-qualityDmaintenanceAn MCP server that wraps ripgrep to provide powerful text search, search-and-replace, file listing, and file type listing capabilities within a defined scope.Last updated29MIT
- Alicense-qualityCmaintenanceLocal-first macOS MCP server for searching files, running approved Shortcuts, managing Homebrew packages, and working with local models, with read-only defaults and optional gated mutations.Last updatedMIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shaack/mcp-for-spotlight'
If you have feedback or need assistance with the MCP directory API, please join our Discord server