Flashlight
Click on "Deploy 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., "@Flashlightfind the function that processes user login"
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.
Flashlight
MCP Server that uses DeepSeek's 1M context window for whole-codebase code search.
How it works
Flashlight loads your entire codebase into DeepSeek's context, then uses LLM understanding to find relevant code — no embeddings, no keyword matching, just brute-force full-context search.
It relies on DeepSeek's prefix caching for repeat queries: as long as the same prefix (system instructions + base code) is sent, tokens are served from cache (¥0.02/million tokens vs ¥1/million tokens for miss).
For large projects exceeding the 1M token limit, Flashlight automatically shards the codebase by directory, queries all shards in parallel, and merges results.
Related MCP server: Acemcp
Setup
1. Install
npm install -g @1percentsync/flashlight2. Get a DeepSeek API key
Get one at platform.deepseek.com.
3. Configure MCP
Add to your MCP client config:
Claude Code (~/.claude.json under mcpServers):
{
"flashlight": {
"command": "flashlight",
"env": {
"DEEPSEEK_API_KEY": "sk-..."
}
}
}Flashlight detects the workspace from MCP roots when the client provides them. If roots are unavailable, it falls back to the server process working directory.
Usage
The server exposes a single tool search with parameters:
Parameter | Required | Description |
| Yes | Natural language description of the code to find |
| No | Optional workspace-relative directory prefix (e.g. |
| No | File extensions to filter (e.g. |
Output
Results are returned as code snippets — the matched line ranges with line numbers.
Configuration
Environment variables
Variable | Default | Description |
| (required) | DeepSeek API key |
|
| DeepSeek API base URL |
|
| Model ( |
|
| Thinking effort ( |
|
| Ratio of changed tokens to trigger base rebuild |
|
| Max tokens per shard (triggers auto-sharding when exceeded) |
Project-level config
Create .flashlight/config.json in the workspace root to customize file extensions per project:
{
"ext_whitelist": [".mdx", ".astro"],
"ext_whitelist_override": false
}Field | Default | Description |
|
| File extensions to include |
|
|
|
Priority: project config > FLASHLIGHT_EXT_WHITELIST env var > built-in defaults.
The config is read once at process start. Changes require restarting the agent environment.
How caching works
Flashlight relies on DeepSeek's prefix caching. On first query, it sends all code and saves a base snapshot. On subsequent queries:
Detect file changes against the saved base
If changed tokens exceed
FLASHLIGHT_CHANGE_THRESHOLD(default 10%) — rebuild the base entirelyOtherwise — reuse the stored base text and append only changed files as incremental context
This ensures the prompt prefix stays stable across queries, maximizing cache hit rate.
Sharding (large projects)
When a project exceeds FLASHLIGHT_MAX_CONTEXT_TOKENS, Flashlight automatically:
Splits files by directory — tries the whole project first, then recursively splits by top-level directories until each group fits
Queries all shards in parallel
Merges and deduplicates results
Each shard maintains independent cache state. Shard boundaries only change when a shard overflows (split eagerly, merge lazily).
Logs
Logs are written to .flashlight/flashlight.log in the workspace root. Each query logs:
Snapshot size and shard plan
File change detection
Per-shard query cache hit ratio
Search results
Cost
With deepseek-v4-flash on a ~50K token codebase:
Operation | Cost |
First query (build cache) | ~¥0.05 |
Subsequent query (cache hit) | ~¥0.001 + output tokens |
License
ISC
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Project memory, semantic code search, and grounded agent context.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables semantic code search across codebases with automatic incremental indexing. Searches return relevant code snippets with file paths and line numbers based on natural language queries.1803Apache 2.0
- AlicenseAqualityDmaintenanceProvides code repository indexing and semantic search capabilities, allowing natural language queries to find relevant code snippets with automatic incremental indexing and multi-language support.14 npm359ISC
- AlicenseAqualityDmaintenanceEnables semantic search over codebases using natural language queries, returning relevant code snippets with source locations. Integrates with Claude Code for automatic codebase exploration.11MIT
- AlicenseBqualityCmaintenanceEnables token-efficient semantic search and analysis over any directory of files through hybrid search, directory overview, structural analysis, and dependency graphs.14MIT