Skip to main content
Glama
softerist
by softerist

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-mcp

Then enable it for your client:

heuristic-mcp --start

If your editor was already open, reload it once.

How It Works

  1. The server scans your workspace and builds a searchable index of your code.

  2. IDE AI models/MCP tools query that index using plain language so you can find relevant code quickly.

  3. Results improve as your index stays up to date with project changes.

Basic Commands

heuristic-mcp --status
heuristic-mcp --logs
heuristic-mcp --stop

Use 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 tools
b_index_codebaseA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoForce reindex even if files haven't changed

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_cacheA
DestructiveIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_configA
Idempotent

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
actionNoAction to perform. 'stats' shows current config, 'set_ef_search' changes the search parameter, 'rebuild' forces index rebuild.stats
efSearchNoNew efSearch value (only for set_ef_search action). Higher = more accurate but slower. Typical range: 16-512.

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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_codeA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet to find similar patterns for
maxResultsNoMaximum number of similar code chunks to return (default: 5)
minSimilarityNoMinimum similarity threshold 0-1 (default: 0.3 = 30%)

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_versionA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
packageYesPackage name, optionally prefixed with registry (e.g., "lodash", "pip:requests", "cargo:serde", "go:github.com/gin-gonic/gin")

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_workspaceA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
workspacePathYesAbsolute path to the new workspace directory
reindexNoWhether to trigger a full reindex after switching (default: true)

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 7 tool updatesv3.2.13
    • First observeda_semantic_search
    • First observedb_index_codebase
    • First observedc_clear_cache
    • First observedd_ann_config
    • First observedd_find_similar_code
    • First observede_check_package_version
    • First observedf_set_workspace

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count4/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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
  • A
    license
    A
    quality
    F
    maintenance
    Enables 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.
    1
    804
    Apache 2.0
  • A
    license
    A
    quality
    F
    maintenance
    Provides 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.
    6
    9 npm
    200
    MIT