heuristic-mcp
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., "@heuristic-mcpfind the function that handles 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.
Heuristic MCP Server
Heuristic MCP adds smart code search to your editor or MCP client.
Requirements
Node.js
18+npm (for global install)
Internet access at least once to download the embedding model (if install-time download is skipped, it downloads on first run)
64-bit Node.js recommended for native ONNX performance; on Windows, install Microsoft Visual C++ 2015-2022 Redistributable (x64) if native bindings fail
Related MCP server: Acemcp
Install
npm install -g @softerist/heuristic-mcpThen enable it for your client:
heuristic-mcp --startIf your editor was already open, reload it once.
How It Works
The server scans your workspace and builds a searchable index of your code.
IDE AI models/MCP tools query that index using plain language so you can find relevant code quickly.
Results improve as your index stays up to date with project changes.
Basic Commands
heuristic-mcp --status
heuristic-mcp --logs
heuristic-mcp --stopUse heuristic-mcp --status first if something looks off.
Use heuristic-mcp --cache to see the cache status or file index progress.
Advanced Docs
Detailed configuration, tool reference, troubleshooting, and release notes are in:
License: MIT
Available Tools
7 toolsa_semantic_searchARead-onlyIdempotent
Performs intelligent hybrid code search combining semantic understanding with exact text matching. Ideal for finding code by meaning (e.g., 'authentication logic', 'database queries') even with typos or variations. Returns the most relevant code snippets with file locations and line numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query - can be natural language (e.g., 'where do we handle user login') or specific terms | |
| maxResults | No | Maximum number of results to return (default: from config) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds meaningful behavioral context beyond annotations: hybrid matching, tolerance to typos/variations, and the return shape. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three concise sentences with no filler. The main action is front-loaded, the use case is stated in the second sentence, and the output behavior is summarized in the third. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description appropriately explains what the tool returns. It could have mentioned any dependency on a pre-built index or relationship to b_index_codebase, but that is inferable from the sibling set and is not a major gap for a two-parameter search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description does not need to re-document parameters. It adds value by explaining that the query can be natural language or specific terms and that semantic matching tolerates typos and variations, which directly informs how to set the query parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Performs intelligent hybrid code search' on code, and clarifies the distinguishing mechanism ('semantic understanding with exact text matching'). It is immediately distinguishable from siblings like b_index_codebase and f_get_status. It also tells the agent what the tool returns: relevant code snippets with locations and line numbers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage context: use for finding code by meaning, even with typos or variations, with relevant natural language examples. It does not explicitly name alternatives or state when not to use this tool, so it falls just short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
b_index_codebaseAIdempotent
Manually trigger a full reindex of the codebase. This will scan all files and update the embeddings cache. Useful after large code changes or if the index seems out of date.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Force reindex even if files haven't changed |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the tool non-read-only, idempotent, and non-destructive. The description adds behavioral context by explaining that a reindex scans all files and updates the embeddings cache, which tells the agent what side effects to expect beyond the annotation flags.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The primary action is front-loaded ('Manually trigger a full reindex'), followed by the mechanism and a practical use case. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, one-optional-parameter tool with strong annotations and no output schema, the description is complete. It states the action, the effect, and when it is useful, which is sufficient for an agent to decide to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully documents the single 'force' parameter with a clear description, so the description does not need to add much. The phrase 'full reindex' and 'even if files haven't changed' are consistent with the parameter, but the description itself does not add new semantic meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Manually trigger a full reindex of the codebase.' It further clarifies the action by stating it will 'scan all files and update the embeddings cache,' making it clearly distinct from sibling tools like a_semantic_search or c_clear_cache.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool: 'Useful after large code changes or if the index seems out of date.' It does not explicitly mention alternatives or when not to use it, but the guidance is specific enough to route an agent correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
c_clear_cacheADestructiveIdempotent
Clears the embeddings cache, forcing a complete reindex on next search or manual index operation. Useful when encountering cache corruption or after major codebase changes.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds behavioral detail beyond the annotations: clearing the cache 'forces a complete reindex on next search or manual index operation,' which helps the agent anticipate downstream effects. It does not contradict the destructiveHint or idempotentHint annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler: the action and consequence are front-loaded, and the usage context is given in one short clause. Every word contributes to understanding the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter destructive operation with clear annotations, the description covers what the tool does, what happens afterward, and when to use it. Nothing necessary for a correct invocation is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema description coverage is 100%, so there are no parameter details for the description to add. The baseline of 4 applies because there is nothing missing for an agent to invoke the tool correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action ('clears') and the specific resource ('embeddings cache'), and explains the immediate consequence ('forcing a complete reindex'). This makes the tool's purpose unambiguous and distinct from siblings like a_semantic_search and b_index_codebase.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance: 'when encountering cache corruption or after major codebase changes.' It does not explicitly state when not to use the tool or name alternatives, but the stated use cases are clear enough for an agent to decide appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
d_ann_configAIdempotent
Configure and monitor the ANN (Approximate Nearest Neighbor) search index. Actions: 'stats' (view current config), 'set_ef_search' (tune search accuracy/speed), 'rebuild' (force index rebuild).
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action to perform. 'stats' shows current config, 'set_ef_search' changes the search parameter, 'rebuild' forces index rebuild. | stats |
| efSearch | No | New efSearch value (only for set_ef_search action). Higher = more accurate but slower. Typical range: 16-512. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds context that 'stats' is a view action, 'set_ef_search' tunes a parameter, and 'rebuild' forces a rebuild. Annotations already indicate idempotentHint=true, and the description does not contradict any annotations. However, it does not disclose additional behaviors like whether actions are reversible or require permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the overall purpose and then lists actions with concise parenthetical explanations. Every word serves a purpose with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and an enum, the description covers all actions and hints at the efSearch parameter. It does not mention return values, but no output schema exists. It briefly touches on use cases ('tune search accuracy/speed'). A small gap is that it doesn't explicitly state that efSearch only applies to 'set_ef_search', though the schema clarifies this.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides detailed descriptions for both parameters (action enumeration and efSearch range). The main description repeats the action list but does not add new meaning or clarify parameter relationships beyond what the schema offers. With 100% schema coverage, the baseline is 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Configure and monitor the ANN (Approximate Nearest Neighbor) search index.' It then enumerates the specific actions ('stats', 'set_ef_search', 'rebuild') with brief explanations, making the tool's function unambiguous. While it doesn't explicitly distinguish from siblings, the unique action set is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide guidance on when to use this tool versus its siblings. It only describes what the tool does, leaving the agent to infer usage context. No explicit when-to-use, when-not-to-use, or alternative tools are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
d_find_similar_codeARead-onlyIdempotent
Find similar code patterns in the codebase. Given a code snippet, returns other code chunks that are semantically similar. Useful for finding duplicate code, understanding patterns, and refactoring opportunities.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code snippet to find similar patterns for | |
| maxResults | No | Maximum number of similar code chunks to return (default: 5) | |
| minSimilarity | No | Minimum similarity threshold 0-1 (default: 0.3 = 30%) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, making safety traits clear. Description adds that it returns semantically similar code chunks but does not disclose performance, size limits, or other behavioral traits beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: two sentences total, no filler. First sentence states purpose, second gives use cases. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and rich annotations, the description covers purpose and typical use cases. Could mention return format (code chunks) but the description already implies that. Mostly complete for a simple search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% description coverage for all three parameters, so the schema already clarifies parameter meaning. Description reiterates 'Given a code snippet' but does not add new semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'find', resource 'similar code patterns', and outcome 'returns other code chunks that are semantically similar'. Distinguishes from sibling tools like a_semantic_search (general search) and b_index_codebase (indexing) by focusing on code pattern similarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit use cases: 'finding duplicate code, understanding patterns, and refactoring opportunities'. However, lacks explicit when-not-to-use guidance or comparison with siblings (e.g., a_semantic_search for non-code text).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
e_check_package_versionARead-onlyIdempotent
Fetches the latest version of a package from its official registry. Supports npm, PyPI, crates.io, Maven, Go, RubyGems, NuGet, Packagist, Hex, pub.dev, Homebrew, and Conda. Use prefix like "pip:requests" for non-npm packages.
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | Package name, optionally prefixed with registry (e.g., "lodash", "pip:requests", "cargo:serde", "go:github.com/gin-gonic/gin") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true, indicating a safe, read-only, idempotent operation. The description adds behavioral context by stating it fetches from 'official registry' and listing supported registries. No contradictions exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first states purpose, second explains usage with registry list and example. No filler; every sentence is essential. Front-loaded with primary action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one parameter, no output schema) and the description covers input semantics well. However, it does not describe the return value format (e.g., version string or object). For a tool that fetches version info, specifying the output structure would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter, 'package', which already describes the prefix pattern. The description expands on this by listing all supported registries and providing multiple concrete examples, adding value beyond the schema by clarifying the range of acceptable prefixes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it fetches the latest version of a package from an official registry. It lists 14 supported registries, making the resource and action unambiguous. Sibling tools are unrelated (e.g., semantic search, index codebase), so there is no confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains how to use prefixes for different registries with examples like 'pip:requests'. It implicitly covers when to use this tool (checking latest version from official registry) and provides context for correct invocation. However, it does not explicitly state when not to use it or mention alternatives, but the tool is distinct among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
f_set_workspaceAIdempotent
Changes the current workspace path at runtime. This updates the search directory and cache, and optionally triggers a full reindex. Useful for multi-project workflows.
| Name | Required | Description | Default |
|---|---|---|---|
| workspacePath | Yes | Absolute path to the new workspace directory | |
| reindex | No | Whether to trigger a full reindex after switching (default: true) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate idempotent=true and destructive=false. The description adds context about cache updates and reindex but does not detail potential side effects like cache invalidation or file system changes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the verb, no fluff. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with 2 params and no output schema, the description covers purpose, directory/cache effect, and reindex option. Could mention path validation but it's sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% so baseline is 3. The description mentions 'optionally triggers a full reindex' for the reindex parameter but adds no new meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Changes the current workspace path at runtime'), specifies the resource ('workspace path'), and explains the effects ('updates search directory and cache, optionally triggers reindex'). It is distinct from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes 'Useful for multi-project workflows,' providing some context but no explicit when-to-use or when-not-to-use guidance, nor comparison to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v3.2.13- First observed
a_semantic_search - First observed
b_index_codebase - First observed
c_clear_cache - First observed
d_ann_config - First observed
d_find_similar_code - First observed
e_check_package_version - First observed
f_set_workspace
TDQS
Scored across 7 tools
Most tools have distinct purposes, but a_semantic_search and d_find_similar_code both deal with semantic code search, potentially causing confusion. However, descriptions clarify different use cases (query vs. snippet input). The two d-prefixed tools are clearly different.
All tool names follow a consistent pattern of a letter prefix followed by an underscore and a descriptive name (e.g., a_semantic_search, b_index_codebase). The pattern is uniform, though the letters themselves have no semantic meaning.
7 tools is a reasonable number for a code search server. The count feels appropriate, covering core functionality without being overly sparse or bloated. The inclusion of e_check_package_version seems slightly out of scope but doesn't harm coherence.
The tool set covers essential operations: search, indexing, cache management, configuration, similarity search, and workspace switching. A minor gap is the lack of a tool to inspect or delete specific indexed files, but overall the surface is sufficient for the domain.
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.MIT
- 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.1804Apache 2.0
- AlicenseAqualityFmaintenanceProvides intelligent semantic code search using local AI embeddings, enabling natural language queries to find relevant code by meaning rather than exact keywords. Indexes codebases in the background with smart project detection and privacy-first local processing.69 npm200MIT
- AlicenseAqualityDmaintenanceIndexes codebases using semantic embeddings for natural language search, enabling developers to find code with queries like 'how does authentication work'.81MIT