{"slug": "self-hosted-second-brain-with-mcp", "title": "Self-hosted second brain with MCP", "summary": "A developer built Brain AI Hub, a portable second brain system that combines a local LLM, markdown vault, semantic search, and MCP hooks for IDE agents. The open-source project enables self-hosted RAG and tool-based agent interactions without relying on cloud services, with one-click deployment to Cursor, Claude Code, and VS Code.", "body_md": "I run IT and cybersecurity ops by day and tinker in a homelab at night. The problem I kept hitting: useful context from Cursor and Claude Code sessions evaporates when the chat ends. Notes end up scattered. RAG demos are cloud-first. I wanted something I own.\n\nSo I built [Brain AI Hub](https://github.com/lobrzut/brain) Ã¢â‚¬â€ a portable second brain with a local LLM, markdown vault, semantic search, and MCP hooks for IDE agents.\n\n`:11434`\n\n.`brain-vault`\n\n, `brain-library`\n\n, `brain-rag`\n\n) with one-click deploy to Cursor, Claude Code, VS Code.`:7860`\n\nfor services, chat, GPU/VRAM, API keys, pipeline status.| Edition | Install |\n|---|---|\nWindows portable |\n`Install.bat` Ã¢â€ â€™ `Start.bat` Ã¢â‚¬â€ copy the folder, run on another PC |\nLinux server |\n`curl -fsSL Ã¢â‚¬Â¦/linux/bootstrap.sh \\ |\n\nInstall scripts speak English and Polish ({% raw %}`locale.env`\n\n: `LANG=en`\n\nor `LANG=pl`\n\n).\n\nOn Windows, Brain deploys stdio MCP configs from the dashboard. On Linux, point Cursor at the SSE gateway:\n\n```\n{\n  \"mcpServers\": {\n    \"brain-rag\": {\n      \"url\": \"http://192.168.1.10:7862/sse/brain-rag\"\n    }\n  }\n}\n```\n\nAgents can search your vault, pull library chunks, and run skills without sending data to a third-party memory API.\n\nRAG answers retrieval. MCP gives agents **tools** Ã¢â‚¬â€ write a note, list vault files, trigger a skill, query the code index. That matches how Cursor and Claude Code actually work: function calls mid-session, not a single embedding search at prompt time.\n\nPython, FastAPI, Ollama, sqlite-vec, PowerShell (Windows), systemd (Linux). Homelab-friendly: MikroTik/UniFi networking, WireGuard, Docker where it helps.\n\n```\ngit clone https://github.com/lobrzut/brain.git\ncd brain\n# Windows: Install.bat && Start.bat\n# Linux:  curl -fsSL https://raw.githubusercontent.com/lobrzut/brain/main/linux/bootstrap.sh | sudo bash\n```\n\nOpen `http://127.0.0.1:7860`\n\n, connect MCP from the Tools tab, drop a PDF in the library, run a distill job on an old chat export.\n\nRelated homelab projects: [AI Studio](https://github.com/lobrzut/ai-studio) (ComfyUI + ACE-Step) and [NetDash](https://github.com/lobrzut/netdash) (LAN service dashboard).\n\nFeedback and issues welcome on GitHub.", "url": "https://wpnews.pro/news/self-hosted-second-brain-with-mcp", "canonical_source": "https://dev.to/lobrzut/self-hosted-second-brain-with-mcp-59d4", "published_at": "2026-06-17 17:11:21+00:00", "updated_at": "2026-06-17 17:21:39.756492+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "developer-tools", "ai-agents", "ai-infrastructure"], "entities": ["Brain AI Hub", "Cursor", "Claude Code", "VS Code", "Ollama", "FastAPI", "GitHub", "MCP"], "alternates": {"html": "https://wpnews.pro/news/self-hosted-second-brain-with-mcp", "markdown": "https://wpnews.pro/news/self-hosted-second-brain-with-mcp.md", "text": "https://wpnews.pro/news/self-hosted-second-brain-with-mcp.txt", "jsonld": "https://wpnews.pro/news/self-hosted-second-brain-with-mcp.jsonld"}}