memsearch-mcp
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., "@memsearch-mcpsearch for notes on deployment configuration"
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.
memsearch-mcp
FastMCP server wrapping the memsearch semantic memory search library. Exposes hybrid vector+BM25+reranker search and index-refresh tools to forge agents over streamable-http MCP transport.
Overview
Agent memory on forge lives in markdown files across a three-tier hierarchy: session (per-project
plugin dirs), working (~/.claude/memory/), and docs. memsearch-mcp lets agents query all of
it with a single tool call — without reading files directly or knowing where they live.
Who uses it: All 5 forge resident agents (research, developer, writer, security, sysadmin)
have memsearch-mcp in their scoped-mcp manifests. index_memory is denylisted for security,
research, and writer.
Related MCP server: QMD - Query Markdown
Tools
Tool | Description | Key Parameters | Returns |
| Hybrid vector+BM25+reranker search over Milvus-indexed agent memory |
|
|
| Trigger a memsearch index refresh for a path or default to |
|
|
search_memory result fields
Field | Type | Description |
|
| Absolute path to the source file |
|
| Relevance score (higher = more relevant) |
|
| Matching text chunk |
|
| Nearest markdown heading above the chunk |
|
|
|
|
| First line of the chunk in the source file |
|
| Last line of the chunk |
index_memory path restrictions
index_memory accepts only paths under:
~/.claude/memory/~/.claude/projects//opt/agents/memory/
Requests outside these roots are rejected with an error (not forwarded to the library).
Environment Variables
Variable | Required | Default | Purpose |
| No |
| Port for the streamable-http server |
| No | (none) | Bearer token for HTTP authentication. When set, all requests must include |
| No |
| structlog log level |
| No | (library default) | Path to memsearch config file |
Installation
Requires Python 3.11+ and an existing memsearch venv with the memsearch library installed.
# From the memsearch venv (forge standard)
/opt/venvs/memsearch/bin/pip install -e /home/ted/repos/personal/memsearch-mcp
# Or from git
/opt/venvs/memsearch/bin/pip install "git+https://github.com/TadMSTR/memsearch-mcp.git"Dependencies
fastmcp>=3.2.4,<4pydantic>=2.0structlog>=24.0memsearch(must be installed in the same venv — not in PyPI, install from source)
Deployment
PM2
ecosystem.config.js in the repo root:
module.exports = {
apps: [{
name: "memsearch-mcp",
script: "/opt/venvs/memsearch/bin/python3",
args: ["-m", "memsearch_mcp.server"],
cwd: "/home/ted/repos/personal/memsearch-mcp",
interpreter: "none",
env: {
LOG_LEVEL: "INFO",
MEMSEARCH_MCP_PORT: "8493",
},
}]
};pm2 start ecosystem.config.js
pm2 savescoped-mcp wiring
Add to each agent manifest at ~/.claude/manifests/<agent>-agent.yml:
modules:
memsearch-mcp:
type: mcp_proxy
config:
url: http://127.0.0.1:8493/mcp
headers:
Authorization: "Bearer ${MEMSEARCH_API_TOKEN}"
tool_denylist:
- "index_memory" # omit for developer and sysadminThe headers config injects an Authorization header into every upstream request via
scoped-mcp's mcp_proxy module. ${MEMSEARCH_API_TOKEN} is resolved from the agent's
Vault-backed credentials at session start — agents never see the token value.
No restart of scoped-mcp is needed — manifests are loaded fresh on each agent session start.
Observability
Logs are written to ~/logs/memsearch-mcp.log (stdout + stderr merged, timestamped by PM2).
Log lines are JSON (structlog):
{"event": "search_memory", "query": "grafana dashboard", "limit": 10, "level": "info"}
{"event": "search_memory_done", "query": "grafana dashboard", "results": 7, "level": "info"}
{"event": "index_memory_dir_done", "path": "/home/ted/.claude/memory", "chunks": 412, "level": "info"}Tool arguments are not included in logs — only query strings and result counts.
To check server health:
pm2 status memsearch-mcp
# Without auth (should return 401 when MEMSEARCH_API_TOKEN is set)
curl -s http://127.0.0.1:8493/mcp
# With auth
curl -s -H "Authorization: Bearer $MEMSEARCH_API_TOKEN" http://127.0.0.1:8493/mcp | head -5This server cannot be installed
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 Servers
- AlicenseAqualityDmaintenanceProvides persistent memory for AI agents using hybrid search (vector embeddings + BM25) with neural reranking, enabling storage and retrieval of insights, debugging solutions, and patterns across coding sessions.Last updated8MIT
- Alicense-qualityDmaintenanceProvides hybrid search over local markdown knowledge bases using BM25 keyword search and vector semantic search. Enables indexing, querying, and retrieving markdown documentation with dual-mode support for local and remote agents.Last updated40,04914MIT
- Alicense-qualityCmaintenanceEnables AI agents to maintain a structured Markdown or Obsidian memory vault with tools for reading, writing, searching, and organizing notes.Last updatedMIT
- Alicense-qualityCmaintenanceEnables AI agents to perform hybrid semantic+keyword search over structured markdown lairs and memory files, with tools for protocol checks and anti-pattern detection.Last updatedBSD 3-Clause
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Persistent memory for AI agents. Search, store, and recall across sessions.
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/TadMSTR/memsearch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server