Skip to main content
Glama
Personal MCP Suite

Personal MCP Suite

by Chen017

✨ Why This Exists

Connecting personal tools to cloud AI clients (such as Gemini Web & iOS Custom Apps) often runs into three practical bottlenecks:

  1. OAuth refresh drops on mobile & session expiry: Stateful HTTP sessions and consumer OAuth connectors frequently lose sessions after idle periods or service restarts.

  2. Router isolation & tool bloat: Exposing 30–40+ tools across multiple connectors bloats context schemas and lowers selection accuracy, while splitting closely related knowledge/web tools prevents fallback scraping inside the same conversation.

  3. Unbounded page dumps & unsafe write delegation: Raw web scrapes or large files blow up context windows, while hiding mutating tools behind a generic proxy strips destructiveHint=True confirmation prompts.

This repository solves those with two isolated, stateless FastMCP servers behind capability URLs and reverse-proxy log redaction.


Related MCP server: loci-mcp

πŸ—οΈ Architecture

                Gemini (Web / iOS) or any Streamable HTTP MCP Client
                                        β”‚
                        HTTPS POST (Stateless JSON-RPC 2.0)
                                        β–Ό
                      Reverse Proxy (Nginx / Caddy + TLS)
                  β”œβ”€β”€ /<SECRET_PATH_NOTES>/mcp  ──► 127.0.0.1:8101/mcp (access_log off)
                  └── /<SECRET_PATH_GITHUB>/mcp ──► 127.0.0.1:8102/mcp (access_log off)
                                        β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                                                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Server 1: Personal Notes Web (:8101)  β”‚   β”‚ Server 2: GitHub Personal (:8102)     β”‚
β”‚ systemd: mcp-notes-web.service        β”‚   β”‚ systemd: mcp-github.service           β”‚
β”‚                                       β”‚   β”‚                                       β”‚
β”‚ β€’ 16 backend tools -> 7 exposed       β”‚   β”‚ β€’ 23 backend tools -> 12 exposed      β”‚
β”‚ β€’ SiYuan Notes RPC client (5 tools)   β”‚   β”‚ β€’ Shared httpx -> GitHub REST API     β”‚
β”‚ β€’ Firecrawl v2 wrapper (11 tools)     β”‚   β”‚ β€’ Fine-Grained PAT + owner allowlist  β”‚
β”‚ β€’ Local LRU+TTL cache + offset paging β”‚   β”‚ β€’ ALL 6 write tools pinned directly   β”‚
β”‚ β€’ BM25SearchTransform (Markdown)      β”‚   β”‚ β€’ BM25SearchTransform (Markdown)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό (Localhost only, header stripped on public proxy)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Optional: SiYuan Share Backend (:8081)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tool Inventory & Exposure Policy

Server

Port

Exposed (list_tools)

Backend Total

Pinned Tools (always_visible)

BM25 Hidden Tools (search_tools + call_tool)

Personal Notes Web (servers.notes_web)

127.0.0.1:8101

7

16

notes_search_notes, notes_read_document, notes_list_shares, web_scrape, web_map

notes_get_share_tree, notes_get_document_outline, web_crawl, web_crawl_status, web_batch_scrape, web_extract_structured, web_scrape_pdf, web_interact_start, web_interact_action, web_interact_stop, web_check_credit_usage

GitHub Personal (servers.github_personal)

127.0.0.1:8102

12

23

4 Read: gh_list_repos, gh_get_repo_tree, gh_get_file_contents, gh_search_code6 Write (destructiveHint=True): gh_create_or_update_file, gh_create_pull_request, gh_create_branch, gh_push_multiple_files, gh_create_issue, gh_comment_issue_or_pr

13 Read / Download: gh_get_repo_info, gh_list_branches, gh_list_commits, gh_get_commit_diff, gh_compare_commits, gh_list_issues, gh_get_issue, gh_list_pull_requests, gh_get_pull_request_detail, gh_list_releases, gh_list_workflow_runs, gh_get_archive_download_url, gh_fetch_directory_bundle


πŸ›‘οΈ Key Engineering Safeguards

  • Stateless Streamable HTTP (stateless_http=True): Every JSON-RPC call is self-contained with zero in-memory session affinity, preventing 404 Session terminated errors across mobile reconnects or systemd restarts.

  • Write Safety Preserved: All 6 GitHub mutating tools are pinned in always_visible with destructiveHint=True (never hidden behind call_tool) and enforced server-side by GITHUB_ALLOWED_WRITE_OWNERS (fail-closed if unconfigured).

  • Zero-Credit Local Cache Pagination: web_scrape and web_scrape_pdf cache full extracted Markdown in an LRU + TTL memory store (WEB_CACHE_TTL_SECONDS=1800). Follow-up offset reads and find_keyword jumps consume 0 extra Firecrawl credits, while each read is capped at MAX_SINGLE_READ_CHARS (default 32000).

  • Soft Guardrails Without Dead-Ends: web_crawl, web_batch_scrape, and web_extract_structured pause and return needs_confirmation=True above configurable thresholds unless confirm_large=True is passed. firecrawl_search is intentionally omitted.

  • Privacy & Log Redaction: Capability URLs use 64-hex random paths paired with access_log off (Nginx) / log_skip (Caddy) and proxy_buffering off.


πŸš€ Quick Start (Debian / Ubuntu)

1. One-Command Install & Update

curl -fsSL https://raw.githubusercontent.com/Chen017/personal-mcp/main/deploy/deploy.sh | bash

The idempotent script installs uv, syncs Python dependencies into /opt/personal-mcp, creates .env (chmod 600) with generated random secrets on first run, installs and starts mcp-notes-web.service and mcp-github.service, verifies HTTP 200 on 127.0.0.1:8101/mcp and 127.0.0.1:8102/mcp, and prints ready-to-use Nginx/Caddy snippets. Re-run bash /opt/personal-mcp/deploy/deploy.sh anytime to pull updates without overwriting .env.

2. Configure Secrets & Reverse Proxy

  1. Edit /opt/personal-mcp/.env (see .env.example):

    • Set GITHUB_PAT, GITHUB_DEFAULT_OWNER, and GITHUB_ALLOWED_WRITE_OWNERS.

    • Set FIRECRAWL_API_KEY.

    • Optionally set NOTES_RPC_URL, NOTES_INTERNAL_TOKEN, NOTES_SITE_DOMAIN, and BLOG_SITE_DOMAIN if integrating a SiYuan Share instance.

  2. Restart services:

    sudo systemctl restart mcp-notes-web mcp-github
  3. Configure HTTPS reverse proxy using deploy/nginx/mcp.example.com.conf or deploy/caddy/Caddyfile.example.

  4. Follow the step-by-step client guide in docs/GEMINI_SETUP.md to register both Custom Apps, sync schemas in Developer Mode, and apply the Saved Info routing cards.


πŸ§ͺ Local Development & CI

uv sync
uv run ruff check .
uv run ruff format --check .
uv run pytest -v

GitHub Actions (ci.yml) runs Ruff lint/format checks, Python bytecode compilation, shell syntax validation (bash -n deploy/deploy.sh), hygiene/privacy guards, and the full pytest suite across Python 3.11 and 3.12. See docs/MAINTENANCE.md for architecture details and troubleshooting.


πŸ“„ License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables web searching via SearXNG, page content extraction with Crawl4AI, and image analysis using vision language models. It provides AI agents with tools for information synthesis and web-based data retrieval through OpenAI-compatible LLM endpoints.
      3
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI hosts such as Claude Desktop, Cursor, and Cline to search, ask questions of, and receive cited answers from a local hybrid vector-plus-BM25 index built over scattered notes, project docs, PDFs, and chat logs. Exposes 8 tools with resources and prompts so agents can retrieve section-level citations from a personal knowledge base without leaving their own interface.
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables clients to read web pages and PDFs as markdown, capture screenshots, search the web and academic sources, rerank/deduplicate content, and extract PDF elements. Supports API-key access, tool filtering, and response token limits.
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to run web searches across SearXNG and/or You.com in parallel and to crawl single pages or whole sites into clean, deduplicated Markdown or JSON, including behind logins.
      -