
gittr-mcp
io.github.arbadacarbaYK由 GitHub 账号 arbadacarbaYK 发布v1.0.2更新于 Nov 3, 2026
Git on Nostr via gittr.space: repos, push, issues, PRs, stars, bounties. Nostr identity (NIP-34).
概览
把 AI 助手接入基于 Nostr 的 git 托管平台 gittr,让它以你的 Nostr 身份创建仓库、推送代码、管理议题与 PR,并处理闪电网络悬赏。
- 可以做什么
- 创建、复刻、镜像和导入仓库,向 git 桥推送文件,并发布仓库公告与状态事件
- 无需克隆即可读取文件、分支、提交历史和克隆地址,并按 Nostr 标识解析仓库
- 列出、新建、评论、关闭和重新打开议题,包括导入的 GitHub 或 Gitea 议题
- 列出、创建、评论、更新和合并拉取请求,在具备 git 时执行真实合并
- 发现与社交:搜索和浏览仓库、加星、关注、查看贡献者
- 发布 Pages、审计依赖、列出发布与标签、公告软件发布,并管理闪电网络悬赏与推送付费墙
- 适用场景
- 适合希望助手直接在 gittr.space 上完成 git 托管工作、不必在聊天与网站之间复制粘贴,且你已在该平台拥有 Nostr 身份的场景。可用于启动新项目、日常推送与代码评审,以及把 GitHub 或 GitLab 仓库镜像到 Nostr。
- 运行要求
- 以 Node.js 本地进程通过 stdio 运行(README 要求 Node 22.23.4、24.22.1 或 26.12.1 及这些版本线的新版本,并称旧版本会直接退出)。未发布到 npm:需克隆仓库或从 GitHub Releases 安装 .mcpb 包。需要密钥文件中的 Nostr 私钥(nsec 或十六进制),合并 PR 还需 PATH 中有 git。可选通过 GITTR_LNBITS_URL 和 GITTR_LNBITS_ADMIN_KEY 配置 LNbits。
安装
在 SourceWeft 中
- 打开 控制台中的 gittr-mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
gittr-mcp
Let your AI agent (or app) use gittr — Nostr git hosting — like a developer would — create repos, push code, open and merge pull requests, manage issues, and work with Lightning bounties — using your Nostr identity, not a GitHub login.
Works with Cursor, Claude Desktop, VS Code / Copilot MCP, Windsurf, OpenClaw, or any host that speaks the Model Context Protocol over stdio.
Needs Node 22.23.4, 24.22.1, or 26.12.1 (or a newer build on those lines). Node 18 and 20 have no fix for the October 2026 certificate and Brotli bugs, and gittr-mcp exits instead of starting on those.
Docs hub: gittr-docu — product map and how this MCP sits next to the website.
This repo’s Page: root index.html. After Push Manifest, save site name gittr-mcp.
Why use this?
End result: one MCP server connects your agent to decentralized git on Nostr — same account as on gittr.space (nsec / keys file), no separate vendor account for the agent.
Hosting note: The website Create/Import flow stays browser-local until announce/Push. MCP createRepo / mirrorRepo / pushToBridge write the git the same way the website does. The clone addresses are the servers saved under Settings → Relays (yours first), then the public copies. Soft-delete POSTs the tombstone to the bridge so disk is wiped.
Where this sits (platform map)
gittr-mcp is the agent door into the same platform humans use in the browser. You are here = gittr-mcp (this repo, teal). Cyan-outlined host boxes = public hostnames (git. / pages. / relay.gittr.space) (teal = this repo; cyan outline = host URLs).
Addressing for agents: resolveRepoByNostrId(npub|hex, repo) → cloneUrl + relays. Prefer announced npub-path HTTPS on git.gittr.space (NIP-34); hex path is a disk fallback if a symlink is missing. Include wss://relay.gittr.space when publishing.
What you can do (workflows)
These are the processes people actually run; each maps to MCP tools the agent can call. Agents: follow docs/AGENT-WORKFLOW.md (which tool, and what not to call after it).
Ship a new project
createRepo— push initial files to the bridge and publish Nostr kinds 30617 + 30618 in one step (best default for agents).
PasspublicRead: falseto create a private repo (code/clone/API/SSH readable only by you and listed maintainers). The announcement name/description still appear on relays — only file access is gated.- Or step-by-step:
pushToBridge→publishRepoAnnouncement→publishRepoState.
Private repositories
- Set
publicRead: falseoncreateRepo,publishRepoAnnouncement,forkRepo, ormirrorRepo. - Private repos are hidden from Explore/home/profile listings for strangers.
- Direct URL still shows the repo name with a Private badge; unauthorized viewers see a lock screen (no code).
- SSH / CLI / API reads use the same ACL as the web UI: your npub must be owner or maintainer (
addCollaboratoror Settings → Contributors on gittr.space). - SSH key registration is unchanged — keys identify you; private repos only check whether your pubkey has read permission.
Day-to-day development
pushToBridge— update files on a branch (NIP-98 auth to gittr bridge); optionaldeletedPaths/allowTreeShrinkfor file or folder deletes (parity with Code-tab trash).getFile,bridgeListFiles,bridgeGetFileContent,getBranches,getCommitHistory— read without cloning.getFileis the bridge, then a short GRASP list — not the Code tab. On the website: latest live 30617; forgesourceis the tree when present (stale bridge listing is replaced); otherwise first non-emptyclone[]listing. See MCP-GITTR-PARITY.md and gittr FILE_FETCHING_INSIGHTS.md.resolveRepoByNostrId— find clone URLs and relays from npub + repo name.
Issues (bug reports, tasks)
listIssues,getIssueById— same rows as the website Issues tab. Nostr issues, plus GitHub or Codeberg/Gitea issues when the repo source says so. They stay separate rows.getIssueByIdwithissue-Nor a number needsownerPubkeyandrepoId. GitLab sources stay Nostr-only.createIssuelistIssueComments,createIssueComment— Nostr comments on a 64-character id. Forge comments when the id isissue-Nor a number (read-only; the website does not post them back to GitHub).closeIssue,reopenIssue— publish NIP-34 status events (1632 / 1630) for a 64-char Nostr event id. GitHub/Gitea importedissue-12/pr-12(and a bare12) are refused — close those on the origin.
Pull requests (code review flow)
Honest limits on PRs: Creating and listing PRs via MCP is supported. Merging needs git installed and permission on the repo. Some relays are strict about clone URL + relay matching in repo announcements — if PR publish fails, fix metadata (see Limitations) or use createPRViaGittrCLI. Details: docs/DEVELOPER.md#limitations.
Fork, mirror, import
forkRepo— fork an existing gittr repo under your key.mirrorRepo— same result as the website Push of a GitHub/GitLab repo: forge commits on gittr (history kept, and a later call updates them), the same git-server list, and a state event whoseHEADis the forge default branch. A later call keeps the name, description, and web links already announced.importRemoteToBridge— copy onto the git server only. With the owner key, a later call updates the forge commits. It does not publish the Nostr card. UsemirrorRepofor the full website result.- Forge 403 / suspended account: if the repo was already copied, keep using
https://git.gittr.space/<npub>/<repo>.git. Do not pointmirrorRepoat a new forge to change the source — that copies the new URL onto gittr and replaces the branches. Guide: docs/AGENT-WORKFLOW.md.
Discover & social
listRepos,searchRepos,myRepos,exploreRepos,getTrendingRepos(trending = recent repos, not engagement rank)starRepo,unstarRepo,listStars— NIP-25 on the repo’s 30617 event (same as gittr Star button).watchRepo,unwatchRepo,listWatchedRepos— NIP-51 kind 10018 followed-repo list (same as gittr Watch).getRepoContributors
Parity details: docs/MCP-GITTR-PARITY.md — what matches gittr.space vs caveats.
Releases & tags
listReleases— git tags from bridge (refs/tags/*), not the web UI Releases tab and not Zapstore.listForgeReleases— forge Releases tab listing (all assets; no NIP-82 MIME gate).createRelease— returns guidance only (UI release notes until next 30617 push).fetchForgeReleases— one forge Release + announceable binaries. Omittagfor latest;hash:truefor sha256 (required before announce).announceSoftwareFromForgeRelease— Zapstore/NIP-82 (kinds 32267 / 30063 / 3063) from a tagged forge Release. APK preferred; AppImage/DMG/linuxtar.gz/MSI/EXE/IPA also. Extra binaries on the same tag are sibling assets. Copiesimages:from the forgezapstore.yaml. OptionalpinToBlossom(public Blossom;blossom.gittr.spaceonly for officialspace.gittr.app). Same as gittr Nostr Apps (latest) or Releases Announce on Nostr (tag=). Never a tagless app.deleteSoftwareAnnounce— NIP-09 kind 5 for those app/release/asset event ids.
Pages & security
publishNostrPages— NIP-5A kind 35128 + Blossom upload through gittr (index.htmlrequired).auditRepoDependencies— parse lockfiles on the bridge and query OSV via gittr/api/security/audit.
Lightning bounties & pay-to-push
- Bounties:
listBounties,createBountyInvoice,publishBountyToNostr,submitBounty,listBountiesForIssue, release/withdraw tools. - Paywall:
getPushPaywallStatus,createPushPaywallIntent,syncRepoPushPolicy. - Optional LNbits: set
GITTR_LNBITS_URLandGITTR_LNBITS_ADMIN_KEYin MCP env (see.env.example).
Session / keys
describeAgentAuth— run once: confirms keys load (never returnsnsec); if unconfigured it tells the agent to ask you about a test keypair.setupTestKeypair— after your explicit OK, writes a disposable test identity to.nostr-keys.json(replace with your realnsecanytime).loadCredentials,getPublicKey— debugging helpers. MCPloadCredentialsmasksnsec(prefix only),secretKey, andprivate_key.
Full tool list: 50+ tools in server.js (search for name:). Library API: docs/DEVELOPER.md.
Install (5 minutes)
Requirements
- Node.js 18+
- A Nostr private key (
nsecor hex) — same identity you use on gittr.space
1. Get the server
Clone (developers / Cursor):
Claude Desktop one-click (.mcpb): this package is not on npm. Download the latest bundle from GitHub Releases (gittr-mcp-x.y.z.mcpb) and install that. New releases are built automatically when we push a v* tag — see docs/RELEASE.md.
2. Add your key (local only, never commit)
Edit .nostr-keys.json and set your nsec (or hex secretKey). The file is gitignored.
Lookup order: ./.nostr-keys.json (the folder the MCP process was started in) → .nostr-keys.json next to server.js → ~/.nostr-identity.json → ~/.config/gittr/keys.json. On Windows, the home folder is used even when HOME is unset. A UTF-8 BOM (PowerShell’s default) is stripped before the file is read.
No key yet? Test keypair flow. If no credentials are found, describeAgentAuth and all key-missing errors tell the agent to ask you whether a disposable test keypair should be created. If you agree, the agent calls setupTestKeypair({ confirm: true }) — it writes a fresh identity into .nostr-keys.json (flagged "generated": true, file mode 600, never committed) and everything auto-loads it from then on. Replace the nsec in that file with your real key whenever you're ready; describeAgentAuth keeps reminding the agent that a test key is active. It never runs without confirm: true and never overwrites existing credentials unless you explicitly ask for force: true — anything published under a keypair stays under that identity forever, so this is always your call, not the agent's.
3. Wire up your MCP host
Important: Add a new server entry — do not replace your entire MCP config.
Cursor
Edit ~/.cursor/mcp.json (or project MCP settings). Use an absolute path:
Reload MCP or restart Cursor.
Claude Desktop
Quit Claude, edit claude_desktop_config.json (path depends on OS — see Anthropic docs), same mcpServers block as above, restart.
VS Code / Copilot, Windsurf, OpenClaw, custom apps
Same stdio contract: command: node, args: ["/path/to/server.js"], optional env.
OpenClaw / mcporter: docs/MCP-HOSTS.md.
Embed as a library (no MCP)
Entry point: index.js. MCP process: server.js (npm bin gittr-mcp).
4. Verify
In chat, ask the agent to call describeAgentAuth, or from the repo:
UI / file-fetch tip fidelity regressions live in the gittr monorepo: cd ../gittr/ui && npm run test:regressions (see gittr docs/FILE_FETCHING_INSIGHTS.md).
What to ask your agent
Examples that map to the workflows above:
- “Create a repo
my-demowith a README and publish it on gittr.” - “Push these file changes to
my-demoonmain.” - “Open an issue: login button broken.”
- “List open PRs on npub…/my-demo and merge PR
<id>if I’m the owner.” - “Mirror
https://github.com/user/repoto gittr asrepo-name.”
Agents should read tool results as JSON; many responses include agentSummary and nextSteps.
Limitations (PRs & clone URLs)
Short version — full detail in docs/DEVELOPER.md:
- Bridge push and Nostr publish are separate steps unless you use
createRepo. Pushing alone does not make the repo visible everywhere. git cloneonly “works” for others if your publishedcloneURL serves git HTTP. This MCP defaults towardhttps://git.gittr.space/<hex-pubkey>/<repo>.git. A failed clone means fix the URL in 30617, not “ignore and continue.” Host-only values likehttps://git.gittr.spaceare rejected/expanded on publish.mergePullRequestneedsgiton the machine running MCP and maintainer/owner rights.- Relays can rate-limit or lag; failed verification is a failed publish, not “maybe OK.”
- Same result as the website Push.
mirrorRepocopies the forge commits (and updates them if the repo is already there), then writesclonefor gittr, ngit, gitnostr, shakespeare, and danconway, keeps the forge URL insource, and publishes the branch tips withHEADon the forge default branch. A second call keeps the existing name, description, and web links. Dead hosts (git-01.uid.ovh,ngit-relay.nostrver.se) are not added. pushToBridgereplaces the branch with one new snapshot (authorgittr push) and drops imported GitHub history. That matches editing files on the website, not syncing GitHub. Do not use it aftermirrorRepo.
Do MCP users get gittr’s filter / CORS server fixes?
Mostly yes, without updating MCP. Browser/filter/uploadpack/CORS fixes live on git.gittr.space. Anyone (including agents via MCP) cloning that host benefits as soon as the server is fixed.
MCP updates are a new version, not an npm package. This project is not installed from the npm registry. Cursor runs node on a local server.js. Claude can install the .mcpb file from GitHub Releases.
- Cursor: in the folder whose path ends with
gittr-mcp/server.js, rungit pull, then reload the MCP.npm installis only the first-time library download in that folder. A normal update does not need it. - Release file: install the new
gittr-mcp-x.y.z.mcpbfrom Releases. The old 1.0.9 file does not include later fixes. The version shown at startup is the way to tell them apart.
For developers
Security
- Do not commit
.nostr-keys.json,.env, or realnsecvalues. - Bridge auth uses NIP-98; treat agent transcripts as sensitive.
- Only
.nostr-keys.json.examplebelongs in git. - The gittr Dependencies tab can list matches inside the MCP SDK. gittr-mcp talks stdio only (it is a server, not an OAuth client).
@modelcontextprotocol/sdkstays on ^1.32.1 or newer so CVE-2026-104850 is not in the lockfile.overridespin patchedfast-uri,hono,qs, and zod 4.6.7 (CVE-2023-54404 — the server does not parse visitor arrays with Zod). Details: docs/SECURITY-ADVISORIES.md.
Links
- This repo: https://github.com/arbadacarbaYK/gittr-mcp
- gittr.space: https://gittr.space
- Glama: https://glama.ai/mcp/servers/arbadacarbaYK/gittr-mcp
- Awesome MCP Servers: https://github.com/punkpeye/awesome-mcp-servers (Version Control)
- NIP-34 (git on Nostr): https://github.com/nostr-protocol/nips/blob/master/34.md
See LICENSE (MIT).
来源:README.md,提交 ccf0c7a
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分