Agent Shaper extracts per-module tensor shape metadata from any PyTorch `nn.Module` and uses it to annotate source files — either with descriptive
Agent Shaper MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Agent Shaper extracts per-module tensor shape metadata from any PyTorch nn.Module and uses it to annotate source files — either with descriptive shape comments or by rewriting operations as torch.einsum / einops.
Once Agent Shaper is connected, these are the calls the assistant has available:
dim_names — The optional dim_names parameter maps symbolic names to their concrete values in the example run. This lets the shape annotations show (B, T, n_embd)You will need 3 environment variables: OPENAI_API_KEY, OPENAI_MODEL, OPENAI_BASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Agent Shaper's toolset — dim_names — is a fair guide to whether it matches your workflow. It is maintained by athe-kunal; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Agent Shaper's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| dim_names | The optional dim_names parameter maps symbolic names to their concrete values in the example run. This lets the shape annotations show (B, T, n_embd) instead of (2, 16, 64). When two names share the same value (e.g. B=2 |
| Variable | Description | Required |
|---|---|---|
| OPENAI_API_KEY | Credential the server authenticates with. | Yes |
| OPENAI_MODEL | Configuration value read at startup. | Optional |
| OPENAI_BASE_URL | Endpoint or connection string the server talks to. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.