How inkmesh works

One program on your server, behind your own subdomain. People in the browser and AI agents through MCP or the API all go through the same code, which writes Markdown files to git repositories and keeps everything else in one SQLite file.

You and your team browser · editor Your clients browser · account or link AI agents Claude, Claude Code, ChatGPT, Cursor, scripts HTTPSsession cookie HTTPSor /s/<token> link HTTP APIbearer token MCPOAuth docs.yourcompany.com HTTPS reverse proxy TLS ends here · HTTP to loopback inkmesh · one Node process SvelteKit, adapter-node routes/ pages, editor, public links api/v1/ HTTP API mcp/ MCP server same functions core/ · the only path to disk, git and the database role check per actor · one write at a time per workspace · one event per write rows, events write .mdgit commit email $INKMESH_DATA/ inkmesh.db SQLite accounts, roles, sessions, agent tokens (hashed), events, public links, search index workspaces/<slug>/ one git repository each Markdown files (.md) images beside them .inkmesh/comments/ your SMTP server invites, sign-in links, digest private GitHub repos optional · hourly git push People you, your team, your clients AI agents Claude, ChatGPT, Cursor, scripts HTTPS API MCP docs.yourcompany.com HTTPS reverse proxy inkmesh one Node process routes/ pages, links api/v1/ HTTP mcp/ MCP core/ role check per actor one write at a time one event per write rows, events git commit inkmesh.db SQLite accounts, roles, sessions, tokens, events, links, search index workspaces/ one git repo each .md files images .inkmesh/ comments/ $INKMESH_DATA/ SMTP server invites, sign-in, digest · optional GitHub mirror hourly git push optional
Everything runs in one process on your server. The blue path is an agent writing a document.

Three kinds of users reach inkmesh through your subdomain and its HTTPS reverse proxy: you and your team in the browser, your clients in the browser with an account or a public link, and AI agents through the HTTP API with a bearer token or the MCP server with OAuth. Inside one Node process, the browser routes, the HTTP API and the MCP server all call the same core layer, which checks the role of each actor, runs one write at a time per workspace and records one event per write. The core writes Markdown files and commits them to one git repository per workspace, and keeps accounts, roles, sessions, hashed agent tokens, events, public links and the search index in a SQLite file, both inside the data directory. Only two things leave the server: email through your SMTP server if you set one, and an optional hourly git push of each workspace to a private GitHub repository.

Life of a document

An agent drops a weekly report, a client reads it, a teammate fixes a paragraph, and the agent picks up the feedback.

  1. Claude Code calls create_document through MCP.
  2. The core checks that Jon, who connected the agent, is an editor or owner of the workspace.
  3. The file is written to workspaces/studio/reports/weekly.md.
  4. Git commits it at once, with the author “Jon via claude-code”.
  5. An event lands in the members’ inbox, and in the daily email of those who turned it on.
  6. Your client opens the page in the browser, with an account or a public link.
  7. A teammate edits a paragraph; the editor saves two seconds after the last keystroke.
  8. The editing session becomes one commit when they leave, after a minute idle, or when someone else writes the file.
  9. On its next run, the agent reads the comments left on the page with read_comments.

What lives where

One data directory holds it all. Copy it and you have a backup.

The database

Accounts, sessions, roles, invitations, agent tokens (stored hashed), public links and events. Also the search index, rebuilt from the files at every start.

inkmesh.db

The git repositories

One per workspace: the Markdown files, their images, and the comment threads in .inkmesh/comments/. You can clone and read them without inkmesh.

workspaces/<slug>/

What leaves the server

Email through your own SMTP server, only if you set one. The optional backup script pushes each workspace to a private GitHub repository. No analytics.

SMTP_URL

Go further

Install it. The README covers Docker, the reverse proxy, email and backups.

Read the README

See it in use. The editor, agents and sharing, on the home page.

Back to the home page