SecondBrain MCP

SecondBrain MCP

Provides a read-only semantic layer over an Obsidian vault, enabling queries about projects, decisions, tasks, and related notes.

Category
Visit Server

README

SecondBrain MCP

Read-only MCP-сервер для Obsidian vault. Даёт AI-ассистентам (Claude, ChatGPT и др.) семантический доступ к заметкам, проектам, решениям и задачам.

Что умеет

Вместо сырого доступа к файлам предоставляет структурированные инструменты:

Tool Описание
healthcheck Статус vault и статистика
search_knowledge Полнотекстовый поиск + фильтры по frontmatter
get_note Чтение заметки по пути или имени
list_projects Список проектов с фильтром по статусу
get_project_context Полный контекст проекта: содержимое + связи + задачи + решения
find_related Связанные заметки через wikilinks, backlinks, общие теги
extract_tasks Открытые/завершённые задачи из vault или папки
extract_decisions Записи из журнала решений

Установка

git clone <repo-url> && cd sb-mcp
npm install
npm run build

Запуск

Stdio (локально, один клиент)

OBSIDIAN_VAULT_PATH=/path/to/vault node dist/index.js

HTTP (удалённо, несколько клиентов)

OBSIDIAN_VAULT_PATH=/path/to/vault \
MCP_AUTH_TOKEN=your-secret-token \
MCP_PORT=3100 \
node dist/index.js --http

Аутентификация

В HTTP-режиме задайте переменную MCP_AUTH_TOKEN для защиты доступа. Токен можно передать двумя способами:

1. Заголовок Authorization — для клиентов с поддержкой кастомных заголовков (Claude Code, API-клиенты):

Authorization: Bearer your-secret-token

2. Query-параметр — для клиентов без поддержки заголовков (Claude.ai, ChatGPT):

https://your-server/mcp?token=your-secret-token

Если MCP_AUTH_TOKEN не задан, сервер работает без аутентификации (не рекомендуется для публичных сетей).

Сгенерировать токен:

openssl rand -hex 32

Переменные окружения

Переменная По умолчанию Описание
OBSIDIAN_VAULT_PATH текущая директория Путь к Obsidian vault
MCP_TRANSPORT stdio Режим транспорта: stdio или http
MCP_PORT 3100 Порт HTTP-сервера
MCP_AUTH_TOKEN — Токен для аутентификации в HTTP-режиме

Настройка клиентов

Claude Code (.mcp.json)

Stdio (локально):

{
  "mcpServers": {
    "secondbrain": {
      "command": "node",
      "args": ["/path/to/sb-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/vault"
      }
    }
  }
}

HTTP (удалённо):

{
  "mcpServers": {
    "secondbrain": {
      "type": "url",
      "url": "https://your-server/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

Claude.ai / ChatGPT

Используйте URL с токеном в query-параметре:

https://your-server/mcp?token=your-secret-token

systemd (деплой на сервер)

# /etc/systemd/system/secondbrain-mcp.service
[Unit]
Description=SecondBrain MCP Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/node /path/to/sb-mcp/dist/index.js --http
Environment=OBSIDIAN_VAULT_PATH=/path/to/vault
Environment=MCP_AUTH_TOKEN=your-secret-token
Environment=MCP_PORT=3100
Restart=on-failure

[Install]
WantedBy=multi-user.target

Контракт данных

  • Исключённые папки: .git, .obsidian, node_modules, 99_Private, _attachments, mcp
  • Типы заметок: project, area, resource, person, daily, moc, decision, inbox, about
  • Статусы: active, paused, done, someday
  • Frontmatter: YAML с полями type, status, created, updated, tags, aliases, related
  • Связи: [[wikilinks]] + related: в frontmatter + backlinks + общие теги

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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