mcp-semantic-search
Click on "Install 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., "@mcp-semantic-searchsearch for rate limiting strategies in the gateway specs"
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.
π mcp-semantic-search
Ask your specs a question instead of grepping them.
An MCP server & CLI that gives AI agents local semantic search over markdown docs β running 100% on your machine by default.
Why use this?
Traditional grep misses ideas that don't match exact keywords.
mcp-semantic-search understands intent across your local specs, RFCs, and internal docs.
$ mcp-semantic-search search "how do we stop repeated failed logins"
--- Result 1 [0.688] content ---
file: auth.md
section: Sessions > Credential attempts
After five consecutive bad passwords the account enters a 15-minute
cooling-off period. The counter resets on any successful sign-in.
--- Result 2 [0.541] content ---
file: gateway.md
section: Rate limits > Edge throttling
A single IP address is capped at 20 requests per minute against
/session endpoints. Anything beyond that receives a 429 before it
ever reaches the application.Notice: Neither chunk contains the words "failed" or "login" β
grep -ri "failed login"returns nothing at all. Semantic search finds both halves of the answer: the account lockout in the auth spec, and the network throttle that backs it up in a different file with entirely different vocabulary.
Related MCP server: Personal Semantic Search MCP
Key Features
π§± Structure-Aware Chunking β Splits markdown on heading boundaries (
H1βH4) without breaking code blocks or tables.π Local & Private β Runs via LanceDB & Ollama. Zero docs leave your machine.
πΊοΈ Document Maps β Generates outline (
toc) chunks so agents can scan doc structures before reading details.β‘ Zero-Overhead Indexing β File hashes ensure re-indexing only happens when files actually change.
π― Targeted Filtering β Filter search by filename, heading, or chunk type (
content,code,table,toc).
Quick Start
1. Requirements & Build
Requires Node.js 22+ and Ollama (or a Gemini API key).
# Pull default model
ollama pull qwen3-embedding:0.6b
# Clone & Build
git clone <repo-url> mcp-semantic-search
cd mcp-semantic-search
npm install && npm run build2. Run locally (CLI)
Inside the target repository you want to index:
cd ~/projects/my-app
echo '.mcp-search/' >> .gitignore
/path/to/mcp-semantic-search index
/path/to/mcp-semantic-search search "how are expired sessions cleaned up"Setup as an MCP Server
Add to your project's .mcp.json:
{
"mcpServers": {
"specs": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/mcp-semantic-search/dist/index.js"]
}
}
}MCP Tools Exposed
indexβ Indexes your markdown specs directory (setreindex: trueto force rebuild).searchβ Queries indexed documents (query,file,section,chunk_type,limit,min_score).statusβ Checks index health, chunk counts, and staleness.
Agent Prompting Tip (
CLAUDE.md): Add this to your project'sCLAUDE.md: "Search specs using thespecsMCP server. Runindexfirst ifstatusshows the index as missing or stale."
Configuration
Set environment variables in your shell or directly inside .mcp.json under the "env" block.
Global Settings
Variable | Default | Purpose |
|
| Vector provider: |
|
| Absolute path to markdown specs |
|
| Where LanceDB index is stored |
|
| Default similarity threshold |
Ollama Backend (Default)
Variable | Default | Purpose |
|
| Endpoint for Ollama daemon |
|
| Embedding model to use |
Gemini Backend (Cloud Option)
Variable | Default | Purpose |
| (Required) | Required when |
|
| Embedding model to use |
|
| Vector width (128β3072) |
Note: Changing backends automatically triggers a clean index rebuild on the next run.
Example .mcp.json with Custom Config
{
"mcpServers": {
"specs": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/mcp-semantic-search/dist/index.js"],
"env": {
"SPECS_DIR": "/absolute/path/to/my-app/docs",
"EMBEDDING_BACKEND": "gemini",
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}CLI Options
mcp-semantic-search search <query> [options]Flag | Description | Default |
| Filter by matching filename | β |
| Filter by matching section heading | β |
|
| All |
| Max results to return |
|
| Similarity floor (0.0β1.0) |
|
| Output raw JSON instead of plain text |
|
License
MIT
Available Tools
3 toolsindexA
Index the specs/ directory in the current project (app). Automatically skips if content hasn't changed since last index.
| Name | Required | Description | Default |
|---|---|---|---|
| reindex | No | Force re-index even if content unchanged (default false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses the auto-skip behavior (content unchanged). Without annotations, the description carries the burden; it provides one key behavioral trait but no details on effects, auth, or rate limits.
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, zero wasted words, highly efficient. Key information is front-loaded.
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 low-complexity tool (one optional param, no output schema), the description adequately covers purpose and behavior. Lacks explicit linkage to sibling tools, but overall 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 covers the single parameter 'reindex' with a description; the tool description adds no extra meaning beyond reinforcing the auto-skip context. With 100% schema coverage, baseline 3 is appropriate.
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?
Explicitly states 'Index the specs/ directory' (specific verb+resource). Clearly distinguishes from siblings 'search' and 'status' by its indexing action.
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?
No guidance on when to use this tool versus alternatives like 'search' or 'status'. Does not mention prerequisites or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchA
Semantic search over indexed specs in app. Returns relevant markdown chunks ranked by similarity. Optionally filter by file, section heading, or chunk type.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Filter results to a specific file (e.g. 'auth-v2.md'). Matches if the filename contains this string, so partial names work. | |
| limit | No | Max results (default 5) | |
| query | Yes | Natural language search query | |
| section | No | Filter to chunks under a specific heading/section. Case-insensitive substring match against all heading levels (h1βh4). Example: 'authentication' matches chunks under '## Authentication Flow'. | |
| min_score | No | Minimum cosine similarity 0-1. Overrides the MIN_SCORE env var (default 0.44). Lower for rough search, higher for precise matches. Scores are model-relative: with the default embedding model, on-topic chunks land around 0.45-0.80 and unrelated ones below 0.45. | |
| chunk_type | No | Filter by chunk type: 'content', 'code', 'table', or 'toc'. Use 'toc' to retrieve a document's structure map. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the search and ranking behavior and provides scoring details via the min_score parameter. However, it does not mention aspects like rate limits, auth requirements, or no-result handling. It adds value beyond schema but not enough for a higher score.
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 leads with the main action ('Semantic search over indexed specs'), then details return type and optional filters. Every part earns its place with zero waste.
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 the tool's simplicity and 100% schema coverage, the description adequately covers the search functionality and return type. No output schema exists, but the description notes 'returns relevant markdown chunks ranked by similarity', which is sufficient. Minor gap: no mention of pagination, but acceptable for a 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 description coverage is 100%, so the baseline is 3. The description adds minimal extra context beyond the schema, which already thoroughly explains parameters like min_score with cosine similarity and section filtering. The description's mention of 'optional filters' is redundant with 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 clearly states the tool performs semantic search over indexed specs, returning relevant markdown chunks ranked by similarity. It distinguishes from siblings implicitly as 'index' is for indexing and 'status' for checking status, but the purpose is very specific and action-oriented.
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 mentions optional filters (file, section, chunk type) which guide usage but does not explicitly discuss when to use this tool versus its siblings (index, status) or provide exclusion criteria. The usage context is clear but lacks formal guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
statusA
Show index status for the current project.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as side effects, performance implications, or access restrictions. It is too brief for full transparency.
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 concise sentence, front-loaded with the action and object. No wasted words.
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 the simplicity of the tool (no parameters, no output schema), the description is minimally adequate but does not elaborate on the return format or any nuances. It leaves the agent with little information beyond the basic purpose.
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, so the schema is trivial. The description adds no parameter-specific meaning but the baseline for no parameters is 4, which is appropriate here.
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 shows index status, using a specific verb and resource. It is distinct from sibling tools 'index' and 'search'.
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?
No guidance is given on when to use this tool versus alternatives. The description only states what it does, without context for selection.
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. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
index - First observed
search - First observed
status
TDQS
Each tool has a distinct, non-overlapping purpose: index builds the search index, search queries it, and status shows its state. No ambiguity exists among them.
All three tool names are single lowercase words (index, search, status) that clearly describe their action. The naming pattern is uniform and predictable.
Three tools are exactly right for a focused semantic search MCP server: index, search, and status cover the essential operations without excess or deficiency.
The set covers the core lifecycle (index, search, status) but lacks an explicit operation to clear or delete the index. This minor gap is acceptable for most use cases.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Memory system for AI agents with semantic search. Store and recall memories with ease.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables semantic search and retrieval of information from technical documentation PDFs using RAG-powered natural language queries with Ollama embeddings and LLMs.6-
- FlicenseNot gradedqualityDmaintenanceEnables semantic search over local notes and documents using natural language queries. Supports multiple file types (Markdown, Python, HTML, JSON, CSV, text) with fast local embeddings and persistent ChromaDB vector storage.1-
- AlicenseAqualityCmaintenanceEnables AI agents to search local Markdown documents using natural language, with automatic indexing and section-level retrieval.951MIT
- AlicenseAqualityCmaintenanceEnables semantic search over local markdown documentation by indexing files and ranking results using vector similarity and BM25 fusion.111Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lemuelflores/spec-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server