prinfer MCP server
io.github.clockblocker/prinfer·v3.4.0·1 starsTypeScript inferred types, completions and type errors for AI coding agents
not scanned yet
1 stars16 downloads/wk
Reviews
Write oneNobody has reviewed prinfer yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
prinfer tools
No tool declarations could be read from the package source. They show once the server is installed.
How prinfer compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 95% of 48,255 servers
- GitHub stars
- 1
- more than 65% of 28,688 servers
- Downloads a week
- 16
- more than 4% of 12,191 servers with a package
Release history: 2 versions in the registry since 2026-10-09, latest 2026-10-10, typically one every 1 day.
Install prinfer in Claude Code, Cursor or VS Code
Runs npx -y prinfer on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add prinfer -- npx -y prinfer
What the publisher says
From the prinfer repository's README, as published. We do not edit it. Read it on GitHub
prinfer
prinfer lets AI coding agents ask the TypeScript compiler what it infers (types, completions, type errors) instead of guessing, through an MCP server, a CLI, or a library.
Type regression tests
prinfer/testing returns an inferred type as a string, so a test can pin it with an ordinary snapshot matcher in Vitest, Jest, Bun, or any compatible runner. Use it to lock the types your public API infers: a refactor that changes one fails the test. The example is test/users.test.ts, next to a src/users.ts that exports groupBy, Role, and User.
import { expect, test } from "vitest"; // or "bun:test"
import { inferredCompletions, inferredType } from "prinfer/testing";
import { groupBy, type Role, type User } from "../src/users";
const users: User[] = [{ name: "Ada", role: "admin" }];
const byRole = groupBy(users, (user) => user.role);
const fallback: Role = "member";
test("groupBy keys the result by the callback's return type", () => {
expect(inferredType(import.meta.url, { name: "byRole" }))
.toMatchInlineSnapshot(`"Record<Role, User[]>"`);
});
test("groupBy keeps its public signature", () => {
expect(inferredType(new URL("../src/users.ts", import.meta.url), { name: "groupBy" }))
.toMatchInlineSnapshot(`"<T, K extends PropertyKey>(items: readonly T[], key: (item: T) => K): Record<K, T[]>"`);
});
test("Role offers its members", async () => {
await expect(inferredCompletions(import.meta.url, { line: 7, text: '"' }))
.resolves.toMatchInlineSnapshot(`
[
"admin",
"member",
]
`);
});Write the matcher empty (toMatchInlineSnapshot()) and the runner fills it in; after an intended type change, update it with the runner's snapshot update (vitest -u, bun test --update-snapshots). Unlike expectTypeOf or tsd, you never write the expected type by hand: the snapshot is the type as the editor displays it, so any change shows up, including a literal union widening to string.
The first argument is the file to inspect: import.meta.url for the test file itself, or new URL("../src/users.ts", import.meta.url) for another module. Plain string paths resolve against process.cwd(), not the test file. The source is read through its nearest tsconfig.json, or project when given.
The second argument picks the target:
- { name, line? }: a declaration by name; line picks among repeats.
- { line, text, occurrence? }: the token where text starts on that line, matched like the hover tool's text.
- { line, column }: a 1-based position.
inferredType and inferredTypeInfo (the full hover result: name, kind, return type, docs) are synchronous and use TypeScript 6 by default. Pass backend: "typescript7" for TypeScript 7 output; the call then returns a promise. Types are untruncated by default, so a change deep inside an object or union fails the snapshot; pass full: false for the editor's shortened form ({ ...; }). include_docs adds JSDoc to inferredTypeInfo.
To pin what a function infers for an argument you have no value for, declare the argument in a fixture file and point the helper at it. A declare const in the test file itself has no runtime value, so the test throws a ReferenceError as soon as it runs.
// test/groupBy.fixture.ts, read for types only, never run
import { groupBy, type User } from "../src/users";
declare const input: User[];
export const byName = groupBy(input, (user) => user.name);
// test/users.test.ts
expect(inferredType(new URL("./groupBy.fixture.ts", import.meta.url), { name: "byName" }))
.toMatchInlineSnapshot(`"Record<string, User[]>"`);Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
prinfer: common questions
- Is prinfer MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the prinfer safety report
- How do I install prinfer?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does prinfer need an API key?
- No secret keys are declared. It reads 2 settings from the environment.
- Is prinfer maintained?
- The last commit was 26 days ago (2026-10-09). The latest release is v3.4.0.
- How does prinfer compare with other MCP servers?
- safety score 92/100 (higher than 95% of 48,255 servers); github stars 1 (more than 65% of 28,688 servers); downloads a week 16 (more than 4% of 12,191 servers with a package). Full comparison.