code-shot
Allows rendering source code as beautiful images (SVG/PNG) with syntax highlighting, line numbers, and diff rendering, directly from the Hermes AI assistant.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@code-shotRender this Python code as a PNG with line numbers."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
code-shot
MCP server that renders source code as beautiful images. Perfect for AI agents to show code visually to humans on mobile devices, or for sharing syntax-highlighted snippets.
Tools
render_code
Render source code as SVG or PNG with full syntax highlighting.
Param | Type | Default | Description |
| string | required | Source code to render |
| string | auto-detect | Language (ts, rust, py, go, js, and 40+ more) |
| string |
| Color theme (nord, dracula, catppuccin, one-dark-pro, etc.) |
| string | — | Window title bar text (e.g. filename) |
| boolean |
| Line number gutter |
| number |
| Font size in px |
|
|
| SVG is crisp & copyable; PNG is raster |
| number | auto | Code area width in characters |
| number |
| Padding in px |
render_diff
Render a git unified diff with color-coded additions/deletions.
Same options as render_code, plus:
Param | Type | Default | Description |
| string | required | Unified diff content ( |
Diff lines are highlighted with:
@@hunk headers → blue background+additions → green background (#1b4520dark /#dafbe1light)-deletions → red background (#4f1818dark /#ffebe9light)
Related MCP server: Code Screenshot Generator
Usage with Hermes
Add to ~/.hermes/config.yaml (local build):
mcp_servers:
code-shot:
command: "node"
args: ["/path/to/code-shot/dist/index.js"]Or from npm (after npm install -g code-shot or via npx):
mcp_servers:
code-shot:
command: "npx"
args: ["-y", "code-shot"]Configuration
Set defaults via ~/.code-shotrc (JSON):
{
"theme": "nord",
"show_line_numbers": true,
"font_size": 14,
"padding": 16
}Also checked (in order): ~/.code-shotrc > ~/.code-shotrc.json > ~/.config/code-shot/config.json.
Tool call arguments override config file values.
Usage with Claude Code / Cursor
{
"mcpServers": {
"code-shot": {
"command": "node",
"args": ["/path/to/code-shot/dist/index.js"]
}
}
}Build
npm install
npm run buildThemes
18 bundled themes: github-dark, github-light, nord, one-dark-pro, one-light, dracula, dracula-soft, catppuccin-mocha, catppuccin-latte, material-theme, material-theme-lighter, min-dark, min-light, solarized-dark, solarized-light, vitesse-dark, vitesse-light.
How it works
Shiki tokenizes the code with full syntax highlighting (grammars for 40+ languages)
SVG renderer builds a pixel-perfect SVG with monospace positioning, window chrome, line numbers, and diff markers
Optional PNG via
@resvg/resvg-jsfor platforms that don't support SVG natively
No browser, no DOM, no headless Chromium — pure math-based SVG generation.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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/thesimonharms/code-shot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server