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.
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+ aMEMBER_<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 tosecond-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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。