Second brain
MCP server by mshtawythug Verified · gh:mshtawythug
Second Brain stores notes, transcripts, Slack threads and Gmail in Postgres with hybrid search, so AI agents can query them through the brain CLI or the brain-mcp server. It is aimed at people who want a local, queryable personal knowledge base.
Install Second brain
Built from the published package, never by AI.
claude mcp add second-brain -- uvx secondbrain-pyRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"second-brain": {
"args": [
"secondbrain-py"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"second-brain": {
"args": [
"secondbrain-py"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"second-brain": {
"args": [
"secondbrain-py"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add second-brain -- uvx secondbrain-py{
"mcpServers": {
"second-brain": {
"args": [
"secondbrain-py"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add second-brain uvx secondbrain-pyGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the second-brain block.
About
Second Brain is a local knowledge base and note vault. It stores career docs, interview prep, Krisp transcripts, Slack threads, Gmail and Markdown notes in Postgres with pgvector. Search combines full-text and vector ranking, and an entity graph layer supports GraphRAG-style queries.
An agent reaches the corpus through the brain CLI or the bundled brain-mcp MCP server. Results come back as ranked snippets or passages packed to a token budget, so whole files do not fill the context. A local web UI lets you browse, search and edit notes, and the vault is plain Markdown. It suits people who want their notes and work history searchable by AI assistants without cloud services or API keys.
Written from the project's README and checked against it.
Tools it gives your assistant
searchRuns hybrid full-text and vector search over ingested documents, with a --brief option for smaller output.recallReturns passages packed to an explicit token budget, with inline citations.askPlans sub-queries across iterations and composes a cited answer from your documents.showReturns the full document body for an ID prefix.listBrowses documents by source, such as gmail, with a limit.captureAdds quick text to a zero-friction inbox tagged inbox.briefProduces a digest of what recently landed in the brain.resurfaceRanks older notes that are due for another look.
What you need
- Docker (Desktop or Engine) for the Postgres and pgvector container
- Python 3.11+
- Git
- Ollama, for embeddings and hybrid search
- gws CLI, for Gmail ingest and Google-backed directory linking
Try asking
- Search my brain for notes about the platform migration.
- Recall passages about the platform migration runway, within 800 tokens.
- Ask my notes what we decided about the data pipeline.
Good to know
- Gmail ingest and Google directory linking need the gws CLI.
- The minimal profile uses full-text search only, without embeddings.
- Remote MCP access over HTTP is read-only and refuses confidential documents.
- External edits appear in search only while the vault-sync watcher is running.
Security check
C- Downloads a script from the internet and runs itIn
README.md:curl -fsSL https://raw.githubusercontent.com/mshtawythug/second-brain/v0.2.1/install.sh | bash
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Second brain
All alternatives →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Gives AI coding agents persistent memory, so each new session starts where the last one left off. Works with Claude Code, Codex, Cursor, OpenCode and 11 more agents.
Compare with Zotero MCP, Agentdb or Genkitx MCP
Second brain: common questions
Does Second Brain send my notes to the cloud?
The description says it runs fully local on Ollama with no cloud and no API keys. The source notes that Ollama is used for embeddings and enrichment.
How do AI agents use Second Brain?
Agents can run the brain CLI or connect to the bundled brain-mcp MCP server, so they can search the corpus from any conversation.
Can I edit notes without the CLI?
Yes. The local web UI at brain ui lets you create, edit, move and delete vault notes, and it has a read-only mode.
How do I install Second brain?
In Claude Code run claude mcp add second-brain -- uvx secondbrain-py. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Second brain the official server?
Second brain is published by gh:mshtawythug from its verified domain in the official MCP Registry.
Is Second brain free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Second brain safe to use?
It scores 67 of 100. Grades: maintenance A, licence A, quality C. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to Second brain?
Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, Qmd.
Does Second brain work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
