Back to Browse

Obsidian Github MCP Server

ProductivityLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

A permissioned MCP gateway for agent proposals to a Git-backed Obsidian vault.

About

A permissioned MCP gateway for agent proposals to a Git-backed Obsidian vault.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (4 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (3/3 approved); 4 highly-trusted packages.

9 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

What You'll Need

Set these up before or after installing:

Loopback HTTP listening port.Optional

Environment variable: VAULT_MCP_PORT

Owner of the operator-authorised vault repository.Optional

Environment variable: VAULT_MCP_GITHUB_OWNER

Operator-authorised vault repository name.Optional

Environment variable: VAULT_MCP_GITHUB_REPO

Absolute path to the operator-provisioned policy YAML.Optional

Environment variable: VAULT_MCP_POLICY_FILE

Absolute path to the operator-provisioned client-token YAML.Optional

Environment variable: VAULT_MCP_TOKEN_FILE

Required for the token-based quickstart. Alternatively configure all three GitHub App variables documented in README.Required

Environment variable: GITHUB_TOKEN

GitHub App alternative: set all three App variables instead of GITHUB_TOKEN.Optional

Environment variable: GITHUB_APP_ID

GitHub App installation ID, required with GITHUB_APP_ID.Optional

Environment variable: GITHUB_APP_INSTALLATION_ID

Absolute path to the operator-provisioned App private key; required with GITHUB_APP_ID.Required

Environment variable: GITHUB_APP_PRIVATE_KEY_FILE

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-sarutobisasuke8-obsidian-github-mcp": {
      "env": {
        "GITHUB_TOKEN": "your-github-token-here",
        "GITHUB_APP_ID": "your-github-app-id-here",
        "VAULT_MCP_PORT": "your-vault-mcp-port-here",
        "VAULT_MCP_TOKEN_FILE": "your-vault-mcp-token-file-here",
        "VAULT_MCP_GITHUB_REPO": "your-vault-mcp-github-repo-here",
        "VAULT_MCP_POLICY_FILE": "your-vault-mcp-policy-file-here",
        "VAULT_MCP_GITHUB_OWNER": "your-vault-mcp-github-owner-here",
        "GITHUB_APP_INSTALLATION_ID": "your-github-app-installation-id-here",
        "GITHUB_APP_PRIVATE_KEY_FILE": "your-github-app-private-key-file-here"
      },
      "args": [
        "-y",
        "@sarutobi-sasuke/obsidian-github-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

Obsidian GitHub MCP

A white-label Model Context Protocol server that gives selected AI agents bounded, auditable access to propose changes to an Obsidian vault stored in GitHub.

Each agent receives its own expiring MCP bearer token. The GitHub credential remains server-side. Read and write paths, denials, protected surfaces, proposal branches, and token revocation are controlled by operator-owned YAML files.

This is an independent open-source project. It is not affiliated with or endorsed by Obsidian or GitHub.

Why use it?

Giving an agent a general GitHub token is difficult to constrain and easy to misuse. This server creates a narrower boundary:

AI agent + individual MCP token
        |
        v
identity + fixed broker
        |
        v
agent write scope AND broker publication scope
        |
        v
deny, path, frontmatter, mutability, size, and secret checks
        |
        v
server-side GitHub App token
        |
        v
proposal branch for human review

The service has no tools for deleting files, merging branches, pushing to main or master, changing repository settings, editing workflows, or exposing credentials.

Features

  • Stateless MCP Streamable HTTP transport
  • Unique, expiring bearer tokens stored as SHA-256 bindings
  • Per-agent read, write, and deny path globs
  • Separate Git broker allowlists and fixed proposal branches
  • Configurable frontmatter requirements for shared or sensitive surfaces
  • living, review-first, append-only, and immutable note handling
  • Path-traversal prevention and file-extension/size allowlists
  • Credential-shaped-content detection
  • Repository-restricted GitHub App tokens with PAT fallback for local testing
  • Content-free JSONL audit records
  • Host/origin validation, security headers, rate limiting, and HTTP timeouts
  • Docker, CI, tests, and deployment documentation

MCP tools

ToolPurpose
vault_whoamiShow the authenticated identity, broker, branch, and policy scopes.
vault_list_allowed_pathsExplain effective read/write/deny boundaries.
vault_explain_accessDry run a single path. Report whether read, list, or write would be permitted and which policy rule decides it. No GitHub call.
vault_list_filesList an authorised directory while filtering denied children.
vault_read_fileRead an authorised UTF-8 vault file.
vault_create_fileCreate a file on the identity's fixed proposal branch.
vault_update_fileUpdate a permitted file while respecting mutability.
vault_append_fileAppend while preserving all existing bytes.

Requirements

  • Node.js 22+
  • An Obsidian vault in a GitHub repository
  • A dedicated non-default proposal branch for each broker
  • A GitHub App installed only on the vault repository with Contents: read and write, or a fine-grained PAT for local testing

Quick start

Install from source (the current supported path):

git clone https://github.com/YOUR_ACCOUNT/obsidian-github-mcp.git
cd obsidian-github-mcp
npm ci
cp .env.example .env
cp config/policy.example.yaml config/policy.yaml
cp config/tokens.example.yaml config/tokens.yaml
npm run token:new
npm run check
# Configure .env with your GitHub repository and token/app credentials before starting:
npm start

Configure .env (specifying your repository and either a GITHUB_TOKEN or GitHub App credentials), replace the sample policy, and put only the generated token's SHA-256 in config/tokens.yaml. Give the raw bearer token to exactly one MCP client.

To verify a checkout before configuring a running service:

npm ci
npm run check
npm run test:e2e

These checks use synthetic notes, mock GitHub responses and loopback transports. They need no GitHub or MCP credentials. Note regressions cover Unicode/path encoding, CRLF frontmatter, malformed metadata, UTF-8 size limits and append-only byte preservation. CI runs the same checks on Linux and Windows with Node.js 22 and 24. The 8 tools listed above are the current server surface; tests do not publish proposals to a real vault.

Once v0.1.0 is published to npm, a global install will also be available:

# Available once v0.1.0 is published (not yet on the npm registry).
npm install -g @sarutobi-sasuke/obsidian-github-mcp

The default endpoints are:

GET  http://127.0.0.1:3210/healthz
POST http://127.0.0.1:3210/mcp

MCP clients must send:

Authorization: Bearer vault_<generated-token>

Permission model

The effective write scope is the intersection of the agent grant and its broker:

policy_version: 1
authority: operator-only

agents:
  - id: example-writer
    name: Example Writer
    role: bounded knowledge worker
    disclosure_ceiling: internal
    entry_reads: [README.md]
    read: [Knowledge/**, Workspace/**]
    write: [Workspace/Shared/**, Workspace/Example Writer/**]
    deny: [Private/**, People/**, .obsidian/**]

git_brokers:
  - broker: example-writer
    branch: agent/example-writer
    allow: [Workspace/Shared/**, Workspace/Example Writer/**]

never_versioned: [Private/**, People/**, .obsidian/**, secrets/**]

surface_rules:
  - path: Workspace/Shared/**
    required_frontmatter:
      disclosure: public-safe

An auth binding then maps one token hash to that identity and broker. The binding cannot grant paths that the policy does not grant.

See Permissions documentation for provisioning and revocation.

GitHub authentication

Production deployments should use a GitHub App installed only on the vault repository. Configure:

GITHUB_APP_ID=123456
GITHUB_APP_INSTALLATION_ID=12345678
GITHUB_APP_PRIVATE_KEY_FILE=/run/secrets/vault-mcp.pem

The server creates short-lived installation tokens restricted again to the configured repository and contents: write. A repository-scoped GITHUB_TOKEN is supported as a local-development fallback.

Deployment

The included container runs as a non-root user with a read-only root filesystem. Put TLS, a private overlay network, or an authenticated gateway in front of the service before making it remotely reachable.

See Deployment guide.

Verification

npm run check
npm audit --audit-level=high

Tests cover policy parsing, write-scope intersection, deny precedence, traversal attempts, frontmatter rules, mutability, secret detection, token bindings, and fixed-branch GitHub writes.

Run npm run test:e2e for a clean tarball installation and real MCP HTTP client proof against a test-only GitHub substitute. It exercises proposal writes, denied paths/content, immutable and append-only notes, stale-write conflicts, invalid policy reloads, live token revocation and content-free audit records. CI runs this proof on Windows/Linux with Node 22/24, and the release workflow requires it.

Policy and token files reject unknown keys. Only policy_version: 1 and authority: operator-only are supported. Correct misspelt fields or remove unsupported metadata before upgrading; silently ignored restrictions are no longer accepted. Release evidence and remaining gates.

The draft MCP Registry npm entry describes a self-hosted Streamable HTTP process, not a stdio server. A compatible client starts the process with the declared environment and connects to http://127.0.0.1:{VAULT_MCP_PORT}/mcp (port 3210 by default). Supply the existing policy and token-file paths plus the repository owner/name. For GitHub access, use either GITHUB_TOKEN or all three documented GitHub App variables. The manifest cannot express that alternative group; runtime configuration validates it. The process does not create credentials, provision a hosted endpoint or bypass its existing bearer-token checks. The namespace preserves the exact GitHub owner spelling. prepublishOnly includes the registry/package gate; no login or publication is performed by it.

Security

Read Security policy before deployment. Report suspected vulnerabilities privately rather than opening a public issue with exploit details.

License

Apache-2.0. See Apache-2.0 License.

Reviews

No reviews yet

Be the first to review this server!