agentee

Model Context Protocol

The MCP server

agentee mcp serves one project over stdio with 41 tools. The agent still writes TOML with its own file tools; the server checks, renders, routes, simulates and writes the fab package, and hands rendered PNGs straight back into the conversation.

Add it to your client

  • Claude Code

    a shell in the project

    claude mcp add agentee -- agentee mcp "$PWD"
  • Codex

    ~/.codex/config.toml

    [mcp_servers.agentee]
    command = "agentee"
    args = ["mcp", "/path/to/project"]
  • Cursor, Claude Desktop and most other clients

    .cursor/mcp.json, claude_desktop_config.json or the client’s own file

    {
      "mcpServers": {
        "agentee": {
          "command": "agentee",
          "args": ["mcp", "/path/to/project"]
        }
      }
    }

The path is the project directory, the one holding the TOML files. Pair the server with the skill, which tells the agent when to call each tool and in what order.

Tools

Read the project

format_reference

The file format reference for boards, symbols and footprints, with examples. Read this before writing files.

list_items

Every board, symbol and footprint in the project with its file and error counts.

show_item

The resolved model of one item as JSON: pins with positions, expanded pad arrays, stackup with computed trace geometry, impedance and current analysis.

name

check

Load the project and report errors and warnings for every item, or one item.

include_info item

drc

Design rule checks of a layout. With list = true: every DRC rule with its id, category, severity, and whether it applies to this board and why. Without: the layout's diagnostics that carry a rule id. Rule ids go in the board's [drc] disable list or severity table.

list name

render_item

Render an item to PNG exactly as the viewer shows it and return the image. Without the side panels the image is cropped to the drawing, so width and height are the largest it gets.

canvas_only context focus height hidden_pins hide name region rulers save_to show unit width

stackups

Stackup presets for a board's `stackup.preset`: JLCPCB and PCBWay builds and generic HDI builds with layer thicknesses and er. Filter the list, or give name to get one preset's layers.

fab layers name search thickness

Editing

edit

Edit a schematic (sch), layout (pcb) or board spec (board) with commands, one per line, in one load and one check at the end. It keeps the file's comments and layout and returns the check report of what it touched. A command that names a missing pin, part or net fails before anything is written. Send `help` alone for the commands of that target. Commands: sch add/remove/move/set/net/connect/disconnect/nc/unnc/note; pcb place/unplace/track/untrack/via/unvia/zone/unzone/cutout/uncutout/pair/text/fanout/stitch/watermark/title/test; board class/unclass/via/unvia/outline/cutout/stackup.

commands item target

Parts

import_kicad_symbol

Convert a KiCad symbol (Library:Name) into a .sym.toml in the project. with_footprint also imports its default footprint, or give footprint to pick one.

dir footprint force spec with_footprint

import_kicad_footprint

Convert a KiCad footprint (Library:Name) into a .fp.toml in the project.

dir force spec

new_item

Write a starter file for a board, symbol, footprint, schematic, layout or sim, to edit from. A sim starts as an FDTD run of a layout, with sim_kind logic as a logic sim of a schematic (clock, reset, a clocked assertion), or with sim_kind circuit as an analog circuit sim of a schematic (a drive, an AC sweep and checks), whose nets you rename.

dir kind name sim_kind

models

Find the 3D models (STEP or VRML) the project's footprints name, downloading missing KiCad library models into the cache. Reports each model's path and triangle count, or why it is missing.

Parts library

library_find

Search for a part: the library parts that match, and only when none does (or search is set) active parts in stock at Mouser, Farnell and DigiKey for the same words, merged by part number with total stock, the distributors that have it, the best unit price at the quantity needed and a datasheet link. Use it when the library has no part for a role; pick from the datasheets, then library_add the choice and library_use it.

need role search words

library_list

The user's parts library: the connectors, regulators, passives and other parts they have chosen, each with its role, part number, rating, pin count, notes, whether it is preferred for its role, and its last checked stock and price. Look here first whenever a design needs a part, and use what is here before searching for anything new; ask the user before using a part outside the library for a role it covers.

role words

library_show

One library part in full: its symbol, footprint and model files and where each came from, its pinned datasheet file, and its stock and price at each distributor with the date checked.

name

library_add

Add a part to the user's parts library: its symbol and footprint (a .sym.toml/.fp.toml file, a project item or a KiCad Library:Name) and 3D model copied in, the footprint height set from the model, its datasheet fetched and pinned, its stock and price recorded. Notes say when the part is not in stock as an active part or has no datasheet. Add only parts the user agreed to, with the rating from the datasheet.

datasheet footprint force generic local manufacturer model mpn name notes preferred rating role symbol value

library_use

Copy a library part's symbol, footprint and 3D model into this project and return the edit command that places it with its mpn, mfr and library fields.

force name

Datasheets

datasheet_fetch

Fetch and cache a part's datasheet, or every part's of a layout or schematic, into the cache every project shares (~/.cache/agentee/datasheets). Tries the part's `datasheet` field, its symbol's `datasheet` URL, then the datasheet the distributors list for its mpn, with a browser user agent and retries. Lists the parts with no reachable datasheet: ask the user for those, never fill the gap from memory. A design fetch records the URL, hash and revision of each in datasheets.toml at the project root.

name refresh url

datasheet_text

Read a cached datasheet as text with page numbers, fetching it first when it is not cached. Use find for the pin table and electrical characteristics (e.g. find "VS" returns the passages holding that word, matched whole and case sensitive when it has capitals), and pages for a page range. Without find or pages it returns the first 3 pages and the page count.

context find name pages

datasheet_add

Add a PDF the user supplied (a part behind a login, a vendor that blocks downloads) to the shared datasheet cache under its part number.

manufacturer mpn path url

Traces

impedance

Trace impedance on a board layer for a width (and pair gap), or the width that hits a target.

board coplanar_gap gap layer target width

field_solve

Solve a trace cross-section with the GPU field solver: impedance, effective permittivity, C and L per metre, delay. Includes solder mask, thickness, coplanar grounds and differential pairs. Within 0.5% of exact references with fine = true.

board coplanar_gap fine gap layer netclass no_mask sweep width

trace_width

Minimum track width for a current (IPC-2221).

copper current internal temp_rise

serpentine

Points for a track that replaces a straight segment and adds a given length as trombone bumps to one side. Paste them into the track's points.

add amplitude from pitch to

Layout

place

Place the layout's parts automatically as a quick start: connectors and edge-mount parts on the board edges (never an RF and a USB connector on one edge unless it must), mounting holes and fiducials in the corners, the largest chips near the centre, each IC's decoupling caps, crystal and pull-ups clustered at the pins they serve, placed by weighted wirelength, then legalised on a 0.05 mm grid with no courtyard overlaps and refined by simulated annealing. Writes at, rotation and side into [[footprints]] and refreshes the stored fills. Parts with locked = true stay put.

dry_run keep_placed name parts seed side

route

Autoroute the ratsnest of the named nets of a layout on a grid, keeping each class's width, clearance, layers and via, and append the tracks and vias to the layout file. Existing copper is never moved unless reroute is set.

bend_cost dry_run grid layers name nets pairs reroute via via_cost via_in_pad

tie

Tie every SMD pad of a plane net (a net with a [[zones]] entry) to the nearest plane layer with a short stub and a via beside the pad, away from the part body, and append them to the layout file. Use this for ground and supply pads instead of routing tracks between them; `route` with a glob skips plane nets.

dry_run name nets

tune

Length-match a layout: meander the short net of every pair over its skew limit and every match group member short of its target, on the longest segments where the bumps clear every other net, and write the points back into the tracks.

amplitude dry_run name nets pitch

neck

Neck down track ends that enter a pad narrower than the track or break clearance near the pad: the end becomes a separate [[tracks]] entry with an explicit width, the smallest of the class width, the pad's smaller side and the widest that keeps clearance, rounded down to 0.01 mm, never under min_track_width and never longer than the class neckdown. taper steps the width down over a short chain of segments. Stored zone fills are refreshed.

dry_run name nets taper

fill

Fill the zones of a layout and store the copper at the end of its file, so loads and the viewer skip the fill until the zone's copper, clearances or neighbours change.

name

silk

Move every silk reference that check flags to the clear spot it suggests, repeating until the labels settle, and optionally hide the ones that have nowhere to go. Writes label = { at, rotation } or hide = true into the footprints.

dry_run hide name

testpoints

Add a test pad to each net that needs probe access and has none: a TestPoint part (TestPoint_Pad_D1.0mm footprint, both written into the project if missing) joined to the net in the schematic sheet that lists it, a footprint on the probe side in free space near the net's copper, and an autorouted track and via from the net's copper. Nets default to the layout's [test] nets; impedance and pair nets are skipped.

dry_run name nets pitch side

layout

Run the layout engine on a layout: the configured [engine] phases in order, then the score per term with the worst offenders of each. Phases not implemented yet are listed as skipped. With search it runs a beam search over the stages in memory: each kept engine state branches into children with different values of that stage's [engine.search] knobs (placement seeds by default), the best `keep` survive each stage from the global route on, and the winner is written with its settings pinned in [engine]. Use search instead of rerunning place and route by hand with different seeds.

dry_run from keep name only search to

fit

Find the smallest rectangular board a layout fits on. Loads the layout once and tries outlines of many aspect ratios in memory: the current placement scaled to the new size, edge connectors slid along their edge, holes kept in their corners, the rest legalised, routing demand estimated per tile; then checks the smallest sizes with the global router. strategy tight, balanced or spread sets the gap between parts and the routing room kept. width or height holds one side. write sets the board's [outline] size and writes the placement. Place the layout first: the search starts from its current arrangement.

aspects height name strategy verify width write

Simulation

run_sim

Run a simulation (*.sim.toml): an FDTD run of a layout on the GPU (ports on pads, lumped models for passives, S-parameters saved as JSON and Touchstone next to the spec), any other kind (dc, thermal, cascade, channel, pdn), or a logic sim of the schematic netlist (stimulus, assertions, setup and hold, a VCD next to the spec). Render the sim afterwards to see the plot or the waveforms.

name

sparam

Analyse a finished sim or cascade: passivity and reciprocity, a TDR of one port (impedance against time with a Gaussian edge), mixed-mode Sdd/Scc/Scd for a pair given as IN+,IN-,OUT+,OUT-, and crosstalk FROM,TO in frequency and as a step.

name pair rise tdr xtalk

Output

fab

Write the fab package for a layout into a folder: RS-274X Gerbers (X2) per copper, mask, paste, silk and edge layer, Excellon drills, a zip of those for upload, BOM (generic and JLCPCB), pick-and-place, fab notes and assembly drawings. Refuses while the layout has errors.

name out

export

Write a layout as one STEP assembly for enclosure CAD: the board as a solid with its drilled holes and cutouts, each part's STEP model embedded and placed, and VRML, generated and missing models as surfaces or boxes. Board bottom at z = 0, X and Y as the layout with Y up.

name out

parts

Price a layout's or schematic's BOM at Mouser, Farnell and DigiKey and find cheaper equivalents: the same part at another distributor, resistors and ceramic capacitors with the same value, package, tolerance, voltage and dielectric (never a downgrade), generic discretes (2N7002, S1D, SS14, SMAJ..) by name and package, indicator LEDs by colour and package, and the distributor's suggested replacement for parts going obsolete. Costs are at the needed quantity, buying up to a price break when that is cheaper. Keys come from ~/.config/agentee/distributors.toml ([mouser] api_key, [farnell] api_key and store, [digikey] client_id, client_secret and site).

alternatives boards distributors farnell_store name order refs spares

bom

BOM cost table of a layout or schematic: every line priced at Mouser, Farnell and DigiKey at each board count (default 1, 10 and 100), buying up to a price break when that is cheaper, with the total and the cost per board, and the lines that could not be priced and why. Use parts to look for cheaper equivalents.

boards distributors farnell_store json name refs