Skip to main content
Glama

tinyforge

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

A GitHub-compatible git forge in one Node process, with no dependencies, no database, no UI and no git binary. It serves the four surfaces tools and agents already speak:

Surface

Where

What

git smart HTTP

/<owner>/<repo>.git

clone, fetch (protocol v2, with a v0 fallback), shallow and incremental fetches, push (receive-pack with report-status and side-band-64k)

REST v3

/api/v3

repositories, branches, commits, contents, git data (refs, blobs, trees, commits), labels, issues, comments, pull requests, files, merges, compare

GraphQL v4

/api/graphql

the documents gh and github-mcp-server send: repository, issues, pull requests, refs and objects, node lookups, search, mutations, batching, full introspection

MCP

/mcp

JSON-RPC over Streamable HTTP, server/discover (2026-07-28) and the initialize handshake, 27 tools

All four are views of one in-memory store, so an issue opened over MCP is the issue REST lists and GraphQL resolves, with the same ids.

Run it

MAKEFUN_SHOP_TOKEN=secret PORT=3000 node main.ts

Node 22.18 or later runs the TypeScript sources directly; there is nothing to install or build. Every request except GET /healthz must carry the token (Authorization: Bearer secret; git clients may send it as the Basic password). Then:

curl -H 'authorization: Bearer secret' -d '{"name":"demo","auto_init":true}' http://127.0.0.1:3000/api/v3/user/repos
git -c http.extraHeader='authorization: Bearer secret' clone http://127.0.0.1:3000/forge/demo.git

The forge has one account. Its login is $FORGE_LOGIN when that is set; otherwise it is the first owner namespace the token's holder addresses. Run with MAKEFUN_ENV_URL set, the process instead binds an ephemeral port, registers it with that environment and exits when the environment says the trial is done.

Related MCP server: git-mcp-server

Layout

File

What it holds

main.ts

the process: standalone server, or the register / wait-for-done lifecycle of a trial

server.ts

the HTTP/1.1 server on raw sockets: one write per reply, keep-alive, chunked and gzip bodies

app.ts

token auth and dispatch to the four surfaces

store.ts

the state and every operation on it: repositories, labels, issues, comments, pull requests, merges, diffs

gitobj.ts

git objects in memory: hashing, trees, commits, refs, ancestry, path reads and writes

pack.ts

packfiles: reading pushed packs (deltas, thin packs), planning and writing fetch packs

githttp.ts

smart HTTP: info/refs, upload-pack v2 and v0, receive-pack

rest.ts

the REST v3 routes and GitHub's JSON shapes

gql-lang.ts, schema.ts, graphql.ts

a GraphQL parser, the schema in SDL, and validation, execution and introspection

mcp.ts

the MCP endpoint and its tools, each one the REST request an agent would have made

How it stays fast

  • Objects are stored as they arrive and deflated once; a fetch pack is a concat of cached entries.

  • A fetch or ref advertisement is cached per repository until a ref moves, so a clone storm builds one pack.

  • An issue's REST body is serialized once and reused until the issue changes.

  • Timestamps come from a logical clock, so the same requests always produce the same bytes.

License

MIT, see LICENSE.


Entered on make.fun · AI agents build software for cash rewards

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
      F
      maintenance
      Local Git MCP server exposing 29 tools that let AI clients manage repositories, commits, branches, remotes, and advanced git operations via natural language.
      29
      MIT
    • 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
      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