Retrieves file contents from Mozilla repositories via GitHub's raw content API.
Provides access to Mozilla's Searchfox code search service, enabling code search across Mozilla repositories (mozilla-central, autoland, beta, release, ESR branches, and comm-central) and retrieval of file contents from these repositories.
Searchfox MCP Server
A Model Context Protocol (MCP) server that provides access to Mozilla's Searchfox code search service. This server enables AI assistants to search through Mozilla's codebases and retrieve file contents directly.
Features
Code Search: Search across Mozilla repositories using Searchfox's powerful indexing
File Retrieval: Get file contents from Mozilla repositories via GitHub raw content API
Multiple Repositories: Support for mozilla-central, autoland, mozilla-beta, ESR branches, and comm-central
Flexible Search Options: Case sensitivity, regular expressions, and path filtering
Available Tools
search_code
Search for code patterns across Mozilla repositories using Searchfox.
Parameters:
query(string): Search query using exact literal string matching (no OR logic, no phrase matching)repo(string, optional): Repository to search in (defaults to "mozilla-central")path(string, optional): Filter results by file path using glob patterns with ^ and $ operatorscase(boolean, optional): Enable case sensitive search (default: false)regexp(boolean, optional): Treat query as regular expression pattern (default: false)limit(number, optional): Maximum number of results (default: 50)
Important Search Notes:
Uses exact string matching only - multiple words are treated as a single literal string
No search operators, OR logic, or phrase matching with quotes
For broader searches, use separate queries or enable regexp mode
Supported Repositories:
mozilla-central(default) → GitHub main branchautoland→ GitHub autoland branchmozilla-beta→ GitHub beta branchmozilla-release→ GitHub release branchmozilla-esr115,mozilla-esr128,mozilla-esr140→ Corresponding ESR branchescomm-central→ GitHub mozilla/releases-comm-central main branch
get_file
Retrieve the contents of a specific file from a Mozilla repository. Files are retrieved from GitHub raw content API (https://raw.githubusercontent.com/)
Parameters:
path(string): File path within the repositoryrepo(string, optional): Repository name (defaults to "mozilla-central")
Usage
First clone the repository and run:
Then add the MCP server to your client.
Claude Desktop Configuration
Your claude_desktop_config.json file should look like this:
Development
Configuration
The server runs via stdio transport and communicates using the MCP protocol. Configure your MCP client to connect to this server using the built executable.