Semantic Cache MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Logging verbosity (DEBUG, INFO, WARNING, ERROR) | INFO |
| EMBEDDING_MODEL | No | FastEmbed model for search/similarity | BAAI/bge-small-en-v1.5 |
| EMBEDDING_DEVICE | No | Embedding hardware: cpu, cuda (GPU), or auto (detect) | cpu |
| MAX_CONTENT_SIZE | No | Max bytes returned by read operations | 100000 |
| TOOL_OUTPUT_MODE | No | Response detail (compact, normal, debug) | compact |
| MAX_CACHE_ENTRIES | No | Max cache entries before LRU-K eviction | 10000 |
| SEMANTIC_CACHE_DIR | No | Override cache/database directory path | |
| TOOL_MAX_RESPONSE_TOKENS | No | Global response token cap (0 = disabled) | 0 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read | Read a file. Automatically returns the most token-efficient response. Use this for a single file. For 2+ files, prefer Behavior (automatic — no configuration needed):
If response contains Args:
path: File path (absolute or relative to project root). Use absolute
paths for files outside the current project root.
max_size: Maximum content size to return before summarization.
offset: 1-based starting line number for targeted reads.
limit: Number of lines to return from |
| stats | Inspect cache health, token savings, and runtime diagnostics. Use this for debugging or measurement, not as a normal step in routine read/edit loops. Returns cache occupancy, hit rates, token savings, tool-call counts, embedding model info, and process memory usage. |
| clear | Clear the semantic cache only; does not modify project files. Use this rarely, mainly to recover from stale cache state or to force cold
re-seeding. Prefer normal Returns the number of cached entries removed. |
| delete | Delete one file or one symlink path and evict cache entries for that path. Use this for explicit single-path removal instead of shelling out. Normal statuses:
Constraints:
Args: path: File or symlink path (absolute or relative to project root). dry_run: Preview without deleting or evicting cache. |
| write | Create or replace a file, with cache refresh and overwrite diffs. Use this when you already know the full new file content. For targeted
changes inside an existing file, prefer Routing rules:
Behavior:
Args:
path: File path to create or replace.
content: Full content to write, or appended content when
|
| edit | Edit one file using cache-aware exact replacement. Prefer this over Modes:
Routing rules:
Precision rules:
Args: path: File path to modify. old_string: Exact text to find. Omit only for line-range replacement. new_string: Replacement text. replace_all: Replace all matches instead of requiring uniqueness. dry_run: Preview without writing. auto_format: Run formatter after editing. start_line: 1-based inclusive start line for scoped or line-range edit. end_line: 1-based inclusive end line for scoped or line-range edit. |
| batch_edit | Apply multiple exact edits to one file in a single call. Use this when several independent edits belong in the same file. For one
change, prefer Supported entry forms:
Behavior:
Args: path: File path to modify. edits: JSON array of edit entries for that file. dry_run: Preview without writing. auto_format: Run formatter after edits. |
| search | Search cached files by meaning or mixed keyword intent. This is a cache-only semantic search. If results are empty, the likely
cause is that the relevant files were never seeded with Routing rules:
Usage guidance:
Args: query: Natural-language query, keywords, or a mixture of both. k: Maximum number of matches to return. directory: Optional directory filter applied after retrieval. |
| diff | Compare two files side by side and return a unified diff. Use this for explicit file-to-file comparison. For "what changed since I
last read this file?", use Behavior:
Args: path1: First file path. path2: Second file path. context_lines: Number of context lines to include around changes. |
| batch_read | Read multiple files under a token budget. Automatically cache-aware. Use this to seed the cache, gather several files at once, or expand globs
before Behavior (automatic — no configuration needed):
If a file is skipped for budget, use Args: paths: Comma-separated paths, JSON array, or glob patterns. max_total_tokens: Token budget across the batch. priority: Optional paths to read first before the remaining files. |
| similar | Find cached files semantically similar to one source file. Use this to discover related implementations, tests, or configs after the surrounding code has already been seeded into the cache. Important constraint:
Usage guidance:
Args: path: Source file path. k: Maximum number of similar files to return. |
| glob | Discover files by glob and show whether each one is already cached. Use this before Routing rules:
Usage guidance:
Args: pattern: Glob pattern to expand. directory: Base directory for the glob. cached_only: Restrict results to already cached files. |
| grep | Search cached files for an exact string or regex, with line numbers. This is the cache-only exact-search tool. It is intentionally closer to "ripgrep on cached content" than to live filesystem search. Routing rules:
Usage guidance:
Args:
pattern: Regex pattern, or a literal if |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
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/CoderDayton/semantic-cache-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server