second-brain

second-brain

This MCP server implements a second brain system, managing unvalidated investigation cases as JSON and validated knowledge as markdown files and skills. It provides tools for creating, updating, promoting cases, managing knowledge files, and performing semantic search.

Category
Visit Server

README

second-brain

MCP server + skill pour un second cerveau : la connaissance validée vit dans des fiches MD et des skills, tout ce qui n'est pas encore validé vit dans des cases (dossiers d'investigation JSON). Un case résolu se promeut en fiche ou en skill via le MCP.

source de vérité (fichiers)                      index dérivé (regénérable)
────────────────────────────────────             ────────────────────────────
<data_dir>/
  cases/<case-id>/case.json          ──→   vector/ (chromadb, gitignoré)
  cases/<case-id>/evidence/*.log           + recherche lexicale (fallback)
  fiches/*.md
  skills/<slug>/SKILL.md

Stack

  • Python 3.12+, uv
  • FastMCP (stdio)
  • ChromaDB + fastembed (index vectoriel, optionnel : [vector])
  • jsonschema (validation des cases)

Installation (dans un projet)

uv init
uv add "second-brain[vector]"          # ou sans [vector] pour le fallback lexical

Ou depuis le repo :

cd second-brain
uv sync --extra vector

Configuration

Variable Rôle Défaut
SECOND_BRAIN_DATA_DIR Dossier racine des données (cases + kb + vector) ~/second-brain-data

Câbler le serveur MCP dans opencode

Ajouter à ~/.config/opencode/opencode.json :

{
  "mcp": {
    "second-brain": {
      "type": "local",
      "command": ["/opt/second-brain/.venv/bin/python", "-m", "second_brain.server"],
      "enabled": true,
      "environment": {
        "SECOND_BRAIN_DATA_DIR": "/opt/infra/kb"
      }
    }
  }
}

Installer le skill globalement

Le skill est versionné dans ce repo (skill/second-brain/SKILL.md). Pour le rendre disponible à tous les agents opencode :

ln -s /opt/second-brain/skill/second-brain ~/.agents/skills/second-brain

Sur une autre machine, cloner le repo puis créer le même lien pointant vers le checkout.

Outils MCP

Cases

Outil Rôle
case_create Créer une investigation (sujet non validé)
case_get / case_list Lire / lister (filtres status, tag)
case_search Recherche sémantique (cases + KB)
case_update Ajouter findings / steps / hypothèses / conclusion
case_add_evidence Attacher une preuve (log, sortie, note)
case_set_status open / in_progress / resolved / abandoned
case_promote Promouvoir un case résolu → fiche ou skill

KB

Outil Rôle
fiche_list / fiche_read / fiche_write CRUD des fiches validées
skill_list / skill_read CRUD des skills validés
index_rebuild Reconstruire l'index vectoriel depuis les fichiers

Schéma des cases

Défini dans schema/case.schema.json — source de vérité. Tout case écrit via le MCP est validé contre ce schéma.

Tests

uv run pytest tests/ -v
uv run ruff check src/ tests/

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured