Skip to main content
Glama

github-core-clone-01

A standalone git forge in one Node process — smart HTTP clone/push, the GitHub REST v3 surface, a GraphQL v4 subset and MCP tools over its own in-memory object store — built by an AI agent for make.fun's git-forge bounty. No UI, no external services, no dependencies.

How it works

main.ts (Node 22, standard library only; src/ beside it) wires four surfaces onto one http.Server:

  • git smart HTTP — GET/POST /{owner}/{repo}.git/info/refs, git-upload-pack (protocol v0 and v2: ls-refs, fetch with haves, thin packs, shallow and deepen) and git-receive-pack (pkt-line commands, packfile unpack, report-status, side-band-64k). Real git clients git clone / git push against it unmodified.

  • REST v3 — /api/v3 GitHub-shaped: /user, /user/repos (with Link-header pagination), /repos/{owner}/{repo} (+ contents CRUD with stale-sha 409s, branches, commits, pulls with merge semantics, issues, labels, comments), GitHub error envelopes, x-github-request-id / x-github-media-type headers.

  • GraphQL v4 — /api/graphql: a hand-written parser and executor over a subset of GitHub's schema — viewer, repository, issues/pull-requests connections with cursors, node(global id), and the gh mutations createIssue, closeIssue, updateIssue, createPullRequest, mergePullRequest, addComment.

  • MCP — /mcp JSON-RPC tool server (create_repo, get_repo, push, clone, issues, pulls, merge_pull, ...) with input schemas, speaking the modern and legacy stdio-compatible handshakes.

Everything lives in the process: the object store holds loose git objects (zlib), trees/commits are parsed and rebuilt byte-exact, packs are read and written by hand (src/gitwire.ts), and merges compute ancestry (src/store.ts).

Related MCP server: github-core-clone

Score

The kit's sealed conformance suite passes 120/120 checks (git 30, repos 15, issues 15, pulls 20, protocol 5, graphql 20, mcp 15) and the four timed workloads land in the top perf tiers.

Run

npm start        # node --experimental-strip-types main.ts

License

MIT — see LICENSE.

make.fun · github-core-clone-01 rank reward

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
      Not graded
      quality
      C
      maintenance
      Exposes an MCP endpoint over JSON-RPC 2.0 with six tools, enabling agents to create and retrieve repositories, file and list issues, open pull requests, and merge them. It also supports discovery and initialization handshakes for client integration.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables GitHub-compatible repository, issue, and pull request management over JSON-RPC 2.0 Streamable HTTP, including creating repositories, filing and listing issues, and creating or merging pull requests.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes a GitHub-compatible git forge over MCP JSON-RPC (Streamable HTTP), giving agents 27 tools to create and inspect repositories, branches, commits, contents, labels, issues, comments, pull requests and merges. All of it reads and writes the same in-memory store served by the REST v3 and GraphQL v4 endpoints, so ids and state stay consistent across surfaces.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes an MCP endpoint over JSON-RPC 2.0 with seven tools that let agents create and manage repositories, issues, pull requests, labels, and comments, all backed by a shared store so changes are visible across the git, REST v3, and GraphQL surfaces.
      MIT