Give your AI coding assistant a research brain.
ResearchMind connects to Cursor, VS Code (Cline), Claude Desktop, Windsurf, or any MCP-compatible AI assistant and gives it a persistent research memory. Your AI can search arXiv, download and ingest PDFs, save notes organized by project, and answer questions grounded in everything you've read β across sessions, across projects.
No cloud. No accounts.
git clone https://github.com/suraj5424/Researchmind_MCP_Server.git
cd Researchmind_MCP_Server
python -m venv .venvWindows: .venv\Scripts\activate
Mac/Linux: source .venv/bin/activate
pip install -r requirements.txtInstall time: Fast β no
torchorsentence-transformersneeded. The embedding model (~90 MB) auto-downloads from Google Drive on first server run.
Model auto-download: The first time you run the server, it automatically downloads
all-MiniLM-L6-v2.onnxfrom Google Drive intomodels/embeddings/. No manual download needed. To use a custom model location, setEMBEDDING_MODEL_PATHorEMBEDDING_MODEL_URLenvironment variables.
Universal Base Config (works with Cursor, Claude Desktop, Windsurf, Continue.dev, etc.):
{
"mcpServers": {
"researchmind": {
"type": "stdio",
"command": "/path/to/your/venv/python",
"args": ["/path/to/Researchmind_MCP_Server/server.py"]
}
}
}Cline on Windows β Workspace Awareness: Configure this based on the local path where you cloned the repository.
{
"mcpServers": {
"researchmind": {
"type": "stdio",
"command": "D:\\Projects\\MCP_server creation\\.mcp_server_venv\\Scripts\\python.exe",
"args": ["D:\\Projects\\MCP_server creation\\server.py"],
"env": {
"CLINE_WORKSPACE_FOLDER": "${workspaceFolder}"
}
}
}
}π‘ Workspace Awareness: Set the workspace environment variable to the local path of your cloned repository. For Cline, use
CLINE_WORKSPACE_FOLDER. Other clients (such as Kilo Code, Cursor, Claude Code, and Codex) may use a different workspace variable (for example,KILO_WORKSPACE_FOLDER,CLAUDE_PROJECT_DIR, orCODEX_WORKSPACE_DIR). Check your client's documentation for the correct variable. If your client does not support a workspace variable, remove theenvblock. The server will then use its default workspace folder.
Now try saying to your AI:
"Search arXiv for the latest on retrieval-augmented generation and save the top papers in a workspace called 'rag-research'."
| Say this to your AI... | And it'll... |
|---|---|
| "Find papers on vision transformers" | Search arXiv and return structured results |
| "Save this insight" | Create a note in your current workspace |
| "Download paper 2306.15595" | Fetch the PDF, extract text, index it for search |
| "What do my papers say about sparse attention?" | Search your ingested PDFs, return cited passages |
| "Find related notes across all projects" | Semantic search across everything you've saved |
| "Build a research report on fine-tuning" | Assemble your notes into a structured markdown report |
| "Check system health" | Verify server, vector store, and metadata DB are healthy |
ResearchMind gives your AI a persistent research memory. Save notes and your AI can search across everything β even across different projects and sessions. No more repeating yourself.
Search arXiv directly from your AI and download PDFs with download_paper. Papers are automatically indexed for search (set auto_ingest=false to skip). Once indexed, query your whole library semantically β across projects β instead of digging through folders. (Note: strip version suffixes like v4 from arXiv IDs before downloading; download_paper rejects versioned IDs like 2501.19389v4.)
After downloading a paper (with auto_ingest=true, the default), ask "What do my papers say about sparse attention?" β ResearchMind retrieves exact passages from ingested PDFs with citations (source, workspace, chunk, score). Use ask to query your knowledge base.
Workspaces keep research organized by project. Semantic search works across all of them. Ask "Find related notes across all projects" (leave workspace empty = search all) and get results from everything you've saved.
The build_report tool surveys your notes (including paper summaries saved as notes) on a topic and assembles a structured markdown report. For PDF-grounded answers, use ask.
Everything runs locally β embeddings (ONNX Runtime, CPU), vector storage (ChromaDB on disk), metadata (SQLite). No accounts, no cloud sync. The only network calls are arXiv search and the one-time embedding model download. Optional local-only telemetry exists but is off unless you set RESEARCHMIND_TELEMETRY=1.
Setup is pip install -r requirements.txt plus a one-time model download. The runtime is torch-free β embeddings run on ONNX Runtime (CPU), so no heavy torch/sentence-transformers dependency. On a fresh machine, expect a few minutes for the lightweight install (~0.5 GB). After that, every research session with your AI becomes more productive. The time you save finding papers, recalling notes, and re-explaining context adds up fast.
ββ Your AI Assistant βββββββββββββββββββββββββββ
β Cursor Β· Cline Β· Claude Desktop Β· Windsurf β
β β talks MCP protocol over stdio β
βββββββββββΌβββββββββββββββββββββββββββββββββββββ
β
βββββββββββΌβββββββββββββββββββββββββββββββββββββ
β ResearchMind Server β
β β
β ββββββββββββ ββββββββββββ βββββββββββββ β
β β Notes β β arXiv β β Papers β β
β β Tools β β Tools β β Tools β β
β ββββββ¬ββββββ ββββββ¬ββββββ βββββββ¬ββββββ β
β β β β β
β ββββββββββββββββ΄βββββββββββββββ β
β β β
β βββββββββββββββββββββΌβββββββββββββββββββββ β
β β Service Layer β β
β β ββββββββββββββ ββββββββββββββββββββ β β
β β β Embeddings β β Vector Store β β β
β β β(ONNX Run β β (ChromaDB) β β β
β β β time, CPU) β β β β β
β β ββββββββββββββ ββββββββββββββββββββ β β
β β ββββββββββββββ ββββββββββββββββββββ β β
β β β Metadata β β PDF Extractor β β β
β β β (SQLite) β β (PyMuPDF) β β β
β β ββββββββββββββ ββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββ
The flow:
- You ask your AI a question ("What do my papers say about attention mechanisms?")
- Your AI calls the
asktool on ResearchMind - ResearchMind embeds your question with the same local ONNX model used for ingestion
- That vector hits ChromaDB with hybrid BM25 + vector search
- Top chunks return with citations (source, workspace, chunk ID, score)
- Your AI synthesizes a grounded answer
No data leaves your machine. No API keys. No cloud accounts.
| Category | Tools |
|---|---|
| Workspace (4) | create_workspace Β· list_workspaces Β· delete_workspace Β· set_workspace_root |
| Notes (7) | create_note Β· list_notes Β· read_note Β· delete_note Β· summarize_note Β· build_report Β· list_templates |
| Research (1) | search_arxiv |
| Papers (4) | download_paper Β· list_papers Β· open_paper Β· delete_paper |
| Search & Q&A (2) | search Β· ask |
| System (1 public + 2 admin) | system_status Β· rebuild_registry Β· refresh_embeddings |
The project uses a config.json file for easy configuration:
{
"workspace_root": null,
"embedding": {
"model_path": "./models/embeddings/all-MiniLM-L6-v2.onnx",
"model_url": "https://drive.google.com/uc?export=download&id=1OvoK6Lg6rPktKwg73ggsB-EJk1ZzF6HJ",
"dimension": 384
},
"vector_store": {
"chroma_db_path": "./data/chroma_db"
},
"chunking": {
"mode": "semantic",
"max_chunk_words": 500,
"min_chunk_words": 100
},
"hybrid_search": {
"enabled": true,
"bm25_weight": 0.5,
"vector_weight": 0.5
}
}Key settings:
workspace_root: Override where workspaces are created (default: auto-detect)embedding.model_url: Custom model download URL (useful if Google Drive is blocked)hybrid_search: Toggle hybrid search and adjust BM25 vs vector weights
I built this like I'd build any production tool β sweating the small stuff that matters when you use it every day.
arXiv is a free service run by Cornell. ResearchMind treats it with respect:
- 2-second delay between every API call
- Automatic retry with backoff if a request hiccups
- 15-second timeout β if arXiv is slow, you get an empty result, not a hang
- Graceful degradation β if arXiv is down, the tool returns
{"papers": [], "total_count": 0}cleanly
- PDF downloads: 30-second timeout, size validation, MIME-type checking
- Path safety: No writes outside designated directories, ever
- Registry fallback: If SQLite is locked or corrupted, automatically falls back to filesystem scanning
Delete a paper and it's gone:
- PDF file removed
- SQLite metadata row removed
- All ChromaDB vectors for that paper removed
- Deletion verified and reported
Embeddings (ONNX Runtime, CPU), vector storage (ChromaDB on disk), metadata (SQLite) β all local. No accounts, no sync, no telemetry unless you explicitly set RESEARCHMIND_TELEMETRY=1. The only network calls are arXiv search and the one-time model download.
- Pre-warmed embeddings β model loads at startup, first query is fast
- Background DB init β ChromaDB and SQLite warm up while the server is already serving
- Thread-safe β ONNX Runtime has no C-extension threading constraints, so pre-warming is synchronous and reliable
Hybrid BM25 + vector similarity by default:
- BM25 catches exact terminology ("LoRA", "RAG", "flash attention")
- Vector catches conceptual matches ("efficient fine-tuning" β "LoRA")
- 50/50 fusion out of the box, tunable via config
- MMR diversification so you don't get five chunks from the same paper
A few deliberate choices:
Smaller than 768/1024-d models, intentionally:
| Factor | Choice | Rationale |
|---|---|---|
| Compute | CPU-first, no GPU/torch | ONNX Runtime on modest hardware |
| Footprint | ~0.5 GB | Small indexes, fast ops |
| Quality | Strong for technical retrieval | Paper abstracts, code-adjacent notes |
| Flexibility | Swappable | embedding.model_path / model_url in config |
- Your mental model > generic taxonomy β no forced buckets
- Templates over categories β
list_templates/create_notewithtemplate_idfor your own types (lit review, experiment log, ADR, etc.) - Search replaces classification β hybrid search means you just ask
- BM25 β exact terms: "LoRA", "flash attention", "2306.15595"
- Vector β concepts: "efficient fine-tuning" β LoRA papers
- 50/50 fusion default, tunable in
config.json
- First result by pure relevance
- Subsequent balance relevance vs. dissimilarity to selected
- Lambda=0.7 default (tunable) β broader coverage per query
| Dimension | Choice | Rationale |
|---|---|---|
| Retrieval quality | Hybrid BM25 + Vector + MMR | Best practical recall for technical content |
| Latency | 384-d ONNX on CPU, pre-warmed | Sub-100ms on typical laptop |
| Compute efficiency | No torch, no GPU, ~0.5 GB RAM | Runs anywhere Python runs |
| Ease of use | Auto model download, single config, stdio MCP | Zero-config for 90%; extensible for rest |
I read a lot of papers. I code with AI assistants a lot. And for the longest time, those two workflows didn't talk to each other.
Every time I started a new chat, I had to re-explain the papers I'd read, re-paste the relevant sections, re-establish context. My AI had no memory. It felt like working with a brilliant colleague who gets amnesia every morning.
So I built the bridge I needed: an MCP server that sits locally, indexes everything I throw at it, and makes it all available to my AI through a clean tool interface. No dashboards, no login screens, no telemetry phoning home. Just a Python process that does one thing well.
MIT β free to use.
Built by suraj5424