second-brain-github-mcp

second-brain-github-mcp

A small, authenticated remote MCP server that lets an AI app safely read and write one GitHub repository, built for a second-brain / Obsidian vault stored on GitHub.

Category
Visit Server

README

second-brain-github-mcp

A small, authenticated remote MCP server that lets an AI app — Claude, ChatGPT, or any MCP client with remote connectors — safely read and write one GitHub repository, built for a second-brain / Obsidian vault stored on GitHub.

  • One repo, hard-scoped. Every tool is pinned to a single configured owner/repo; no tool accepts an arbitrary owner, repo, or URL.
  • Own OAuth server. The AI app authenticates via a real OAuth flow against a self-hosted login — no static tokens pasted into the UI.
  • Single user or team. A member registry maps each login to that member's own fine-grained GitHub PAT, so commits are attributed to the right person. A single user is just a one-member roster.
  • Safe by construction. GitHub PATs are server-side only (never sent to the AI app); writes go directly to main, full-file only, with no delete and a 100 KB size cap.

Tools: github_repo_info, github_list_tree, github_read_file, github_list_directory, github_search_notes, github_list_issues, github_list_pull_requests, and github_write_file.

Run locally

cp .env.example .env
# edit .env — each variable is documented inline

uv sync
uv run python server.py

Then validate the OAuth gate and connect it to your AI app (Claude, ChatGPT, …) following docs/connector-setup.md. The auth and security model is described in docs/security-notes.md.

Configure

All configuration is via environment variables (see .env.example):

  • MCP_PUBLIC_BASE_URL / OAUTH_ISSUER_URL — the server's own public URL.
  • TEAM_MEMBER_IDS + a MEMBER_<ID>_* block per member — the roster. One entry for single-user, several for a team.
  • GITHUB_ALLOWED_OWNER / GITHUB_ALLOWED_REPO — the one repo everyone reads and writes.
  • MCP_SERVER_NAME (optional) — the name this instance reports (login page, ping). Defaults to second-brain-github-mcp.

Deploy

The app builds from the included Dockerfile and runs on any Docker host (e.g. DigitalOcean App Platform, or a VPS via docker compose). Set every variable from .env.example as an encrypted platform env var — never upload a .env file — and set the public-URL vars to the real assigned URL. The server reads env only at startup, so redeploy after any change (PAT rotation, new member, URL). Full steps are in the connector-setup doc.

Tests

uv run pytest

Requirements

  • Python 3.12+, managed with uv.
  • Built on the official MCP Python SDK (FastMCP, Streamable HTTP transport).

License

MIT

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