Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 67
  • 17 stars
  • MIT
  • Updated

Install Second brain

Built from the published package, never by AI.

claude mcp add second-brain -- uvx secondbrain-py

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Second brain in Claude Code

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 →

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.

Second brain Install

Add to stack

Loading.