3.5 KiB
Contributing
Thanks for taking the time to contribute. This project follows a small set of conventions so the history stays readable and CI stays predictable.
Local setup
git clone https://github.com/allexcd/obsidian-mcp.git
cd obsidian-mcp
npm install
npm install runs git config core.hooksPath .githooks automatically (via the prepare script), which activates the pre-push hook.
Conventions
Branch names
<type>/<short-description>
typeis one of:feat,fix,chore,docs,refactor,test,hotfixshort-descriptionis lowercase with hyphens
Examples:
feat/add-token-rotationfix/embedding-batch-overflowdocs/clarify-runtime-install
main is protected; nothing is pushed directly to it. Release branches (release/X.Y.Z) are created by the release script and exempt from the type-prefix rule.
Commit subjects
<type>(<scope>): [TICKET-123] - <short description>
typefrom the same set as branch names.- Scope and ticket are optional.
- Subject is ≤50 characters, lowercase, no trailing period.
Examples:
feat(plugin): add audit log retention settingfix(server): handle empty embedding responsechore: bump esbuild to 0.25.4
The pre-push hook validates both the branch name and every commit subject pushed. If you really need to bypass it once: git push --no-verify.
PR titles
Same format as commit subjects. The pr-title workflow checks them on every PR.
Running checks locally
npm run lint # eslint
npm run typecheck # tsc -b
npm test # vitest
npm run build # full build + plugin bundle + zip
Run all four before pushing if your change crosses package boundaries. The pre-push hook does not run these (it only checks naming) — CI does.
Cutting a release
Releases are version-controlled and gated through PRs. Never tag manually.
git checkout main
git pull
npm run release
The script:
- Confirms a clean
mainbranch. - Asks for
patch | minor | major. - Creates
release/X.Y.Z(novprefix; matches the Obsidian tag convention). - Bumps
package.json,package-lock.json,manifest.json,packages/plugin/manifest.json, and appends toversions.json. - Runs
npm run buildto confirm the bundle still produces a clean zip. - Commits, pushes, and opens a PR.
After the PR is merged, the Tag and Release workflow:
- Tags
X.Y.Z(read frommanifest.json). - Creates a GitHub Release with auto-generated notes.
- Uploads four assets:
main.js,manifest.json,styles.css, andmcp-vault-bridge-X.Y.Z.zip.
The first three are required by the Obsidian Community Plugins submission rules. The zip is a convenience for drop-in installs.
Submitting to the Obsidian Community Plugins directory
Once a release is shipped and field-tested, submit a PR to obsidianmd/obsidian-releases adding an entry to community-plugins.json:
{
"id": "mcp-vault-bridge",
"name": "MCP Vault Bridge",
"author": "allexcd",
"description": "Read-only, exclusion-based local bridge for using an Obsidian vault through MCP clients.",
"repo": "allexcd/obsidian-mcp"
}
Obsidian's reviewers will check that manifest.json at the repo root matches the latest release tag and that the assets exist at top level — both conditions are guaranteed by the release flow above.