mcpField
P

pensketch

Local

About pensketch

An MCP server for pensketch: check, render and rasterise hand-sketched diagrams

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"alpha-nu-pensketch": {
"command": "npx",
"args": [
"-y",
"@pensketch/mcp"
]
}
}
}
Run commandnpx -y @pensketch/mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@pensketch/mcp0.13.0

Tools

4

Saved tool list · updated 4w ago

ParameterTypeRequiredDescription
depthnumberNoHow deep a slab is drawn, in px, for every node without a `depth` of its own. Default 12, calibrated on a box; a pill wants about a third of its height, and a diamond reads as a folded corner at every depth probed, so prefer it flat. Must be a positive finite number wherever it could be read - whenever extrude is on, and through any node extruding on its own - or the render is refused naming the field. A value nothing reads is ignored, except a non-finite one: the boundary refuses that before anything decides whether to read it.
anchorsbooleanNoAppend the resolved end points of every edge to the report, one line each: the two points its drawn line actually begins and ends at - a side fraction walked, an extruded anchor carried onto the silhouette, a self-transition's ends spread span apart - rounded to the two decimals the drawing itself is serialized at. This is how to verify geometry arithmetically without seeing the picture. Default false, so the default report stays lean.
diagramobjectYesA diagram: nodes, edges, braces and notes as plain data. Read the pensketch://schema resource - or call the get_schema tool, the same document - for every field. The whole diagram is validated against that schema before anything draws: an unknown field at any depth is refused by name rather than ignored, `raw` included - it holds functions that JSON cannot carry - and every defect is reported in one refusal. A minimal diagram: {"nodes":[{"id":"a","x":40,"y":40,"w":160,"h":50,"lines":["start"]},{"id":"b","x":300,"y":40,"w":160,"h":50,"lines":["done"]}],"edges":[{"from":["a","r"],"to":["b","l"]}]} - node text is `lines`, an array of strings, and an edge end is ["nodeId", "side"] with sides "t", "b", "l", "r" - plus an optional third number from 0 to 1 placing the anchor along that side, where 0 and 1 are its corners and 0.5 is the default midpoint, so ["a", "r", 0.25] fans a second arrow onto a side another already uses. Write it compact - no indentation, no line breaks between fields - which costs about half the tokens of the same diagram pretty-printed. That is a request rather than a rule: nothing here refuses pretty JSON, and nothing can tell afterwards which you sent.
diagram.edgesarrayNo
diagram.nodesarrayNo
diagram.notesarrayNo
diagram.bracesarrayNo
extrudebooleanNoDraw every node as a slab: its outline redrawn offset up and to the right and joined to it. A node's own `extrude` wins over this either way, so an extruded diagram can flatten one node and a flat one can raise one. A group never extrudes. Nor does a shape too small to carry a face: it draws flat, with nothing thrown, and its anchors stay where they were. A pill needs a larger dimension of 11.46 px or more; a box and a diamond carry faces at any non-zero size. Default false.
viewBoxarrayNo[minX, minY, width, height], the four numbers the <svg> carries. Without it the out-of-bounds rule cannot run and does not.

Details

The maintainer has not added details yet. Check the README in the repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.