Skip to main content
Glama

codeprint

An afternoon experiment: index your own git history and serve your coding style back to Claude over MCP, in the spirit of "write code like your favorite author," except the author is you.

This is more novelty than daily tool. It works, but it is not something reached for on every task; treat it as a proof of concept for style-conditioned code generation, not a production pipeline.

What it does

codeprint walks your authored commits, uses tree-sitter to snapshot each touched function as it existed at that commit, dedupes to the latest version per symbol, and drops anything you contributed less than half of (--min-contribution) so lightly touched code never enters the profile. Each surviving function gets a one-line summary from Claude, an embedding from Voyage, and a home in a local SQLite database (sqlite-vec for the vector search). Everything is keyed by content hash, so re-running only pays for new or changed code.

From that corpus, an LLM distills a tiered style rulebook (universal rules, then per-language, then per-stack) and a separate pass classifies how you revise your own code across successive commits into a refinement profile.

Related MCP server: ClaudeHistoryMCP

Serve it to Claude

A local MCP server exposes the profile as tools:

  • get_style_rules(language?): the rulebook, filtered to the target language.

  • find_exemplars(task, language?, k?): your prior code most similar to a task, as few-shot exemplars.

  • get_refinement_patterns(): how you revise and refactor your own code.

A companion skill (skill/codeprint-style/) wires these into Claude Code. It never auto-triggers (disable-model-invocation: true); invoke it explicitly with /codeprint-style when you want code written in your style.

Setup

Requires Node 22+, VOYAGE_API_KEY for embeddings, and either ANTHROPIC_API_KEY or a logged-in local claude CLI (LLM calls default to whichever is available; the claude-CLI path runs headless claude -p so it bills against a Claude subscription instead of API rates).

npm install && npm run build

Index a repo

codeprint index ~/Documents/GitHub/myrepo \
  --profile matt \
  --author me@example.com me@work.com \
  --since 2024-01-01

Serve to Claude

.mcp.json (or Claude Code MCP settings):

{
  "mcpServers": {
    "codeprint": {
      "command": "codeprint",
      "args": ["serve", "--profile", "matt"]
    }
  }
}

Install the skill by copying skill/codeprint-style/ into ~/.claude/skills/.

Other commands

  • codeprint distill: re-run rulebook distillation without re-indexing.

  • codeprint refine: classify revision history and distill refinement patterns.

  • codeprint eval: a blind A/B harness that generates styled vs. baseline solutions to built-in tasks and has a separate judge model score and guess which is which.

  • codeprint site: renders a shareable "coding personality" HTML page from the distilled profile.

White paper

report/ holds a longer write-up: architecture, the rulebook, honesty checks against project-specific residue, blind eval results, and refinement findings, with a small Bun static server (report/server.ts) to view it locally.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    An MCP server that enables users to store and retrieve personalized coding patterns, serving as a persistent memory layer for LLM agents. It allows AI models to generate code and refactor projects according to a user's specific styles, technologies, and established development conventions.
    Last updated
    7
    1
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that makes Claude Code conversation history searchable and proactively useful by indexing past sessions with hybrid BM25+TF-IDF search, extracting decisions and solutions, and auto-injecting relevant project context at session start.
    Last updated
    12
    65
    MIT

View all related MCP servers

Related MCP Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/m4ttheweric/codeprint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server