pinnedai-mcp
Stops your AI from re-introducing bugs, leaking provider keys, or weakening tests. Bug fixes become permanent regression guards; blocked mistakes become AI lessons the agent reads and learns from before its next edit.
README
PinnedAI
Pinned creates a local AI-coder safety net on install, writes repo-specific lessons, and blocks AI from weakening protected guards.
Free beta · Founder Pro waitlist open at pinnedai.dev.
The 5-step value loop
pinned initscans your repo and creates baseline guards on install (auth checks, lockfile integrity, secret prefixes, route registrations, webhook signatures, URL literals, exports, form error-handling, more).- Guard Integrity blocks any commit that tries to delete, skip, weaken, or
--no-verify-bypass a guard. - AI Lessons file (
.pinned/ai-lessons.md) captures repo-specific rules — read by Claude / Cursor / Devin / Copilot before they edit. pinned audit --learnedscans sibling code paths for the same mistake pattern.- Future AI edits must pass every guard. The output of every finding is an executable test, not a review comment.
Proof it works: see the /proof page for benchmark results, or jump to Status below for the headline numbers.
Quickstart
# See what Pinned does on a sample claim — no install, no signup
npx pinnedai
# Install in your repo (one command)
npx pinnedai init
# After init, on every commit Pinned blocks AI bypass attempts and
# auto-protects new admin/middleware/webhook/client-fetch code.
pinned init writes .github/workflows/pinned.yml, creates tests/pinned/ with PINS.md, installs pre-commit + pre-push hooks, auto-generates baseline pins from your current code, and seeds AI-coder rules into CLAUDE.md + .github/copilot-instructions.md (and any other AI rule file already in the repo). Each step prompts before writing in interactive mode; pass --auto to accept all.
If your repo already has .cursorrules, .clinerules, AGENTS.md, or .windsurfrules, init writes to those too — same marker-bounded block, identical uninstall flow (pinned uninstall-agent-rules).
Editor + AI-tool surfaces
Pinned ships across every major AI-coder surface:
| Surface | What you get | How to install |
|---|---|---|
| VS Code / Cursor / Windsurf / Codium | ◆ pinned · N guards · ✓ in the status bar, rich hover tooltip with recent guards + latest AI lesson, click → Quick Pick (action chooser) → command runs in a Pinned-managed terminal. Works in stock VS Code (Copilot users), Cursor, Windsurf, Codium. |
Bundled .vsix auto-installs during pinned init (until we publish to the Marketplace + Open VSX in v0.1.1) |
| Claude Code | Statusline + UserPromptSubmit hook (◆ pinned · LEARNED · 1 new AI mistake, transient block-event messages). Optional /pinned-status, /pinned-list, /pinned-review, /pinned-done slash commands. |
Statusline auto-wired by init; slash commands via npx pinnedai install-claude |
| GitHub Copilot Chat (free + paid) | Reads Pinned rules from .github/copilot-instructions.md before generating code |
Auto-created during init |
| MCP-aware tools (Claude Desktop, Cline, Continue) | pinned_before_code_change, pinned_before_done_check, pinned_scan_diff, pinned_list_guards, pinned_check_pr_description, pinned_suggest_init as native tools with structured human_summary + must-report agent_instruction fields |
Add pinnedai-mcp to the tool's MCP config — see docs/integrations/ |
| GitHub Action (CI) | pinned check-guard-removal + vitest on every PR — guard weakening attempts fail CI |
Auto-wired via .github/workflows/pinned.yml from init |
| Pre-commit + pre-push hooks | Block bypass attempts locally before they reach CI | Auto-wired by init |
Per-tool integration docs:
- docs/integrations/cursor-rules.md
- docs/integrations/windsurf-rules.md
- docs/integrations/claude-code.md
README badge
[](https://pinnedai.dev)
What Pinned protects
Pinned focuses on AI-prone failure modes:
- Guard weakening —
.skip(),.only(),xit(),.todo(),.skipIf(true), deleted tests, weakened assertions (toBe(401)→toBeTruthy()),|| true,?? true,catch(() => true),expect(true).toBe(true)tautologies, commented-outexpect(),expect.assertions(0), earlyreturn;in test body. - Pinned-infrastructure tampering — deletion of
tests/pinned/*,.github/workflows/pinned.yml,tests/pinned/.registry.json,.pinned/ai-lessons.md, or sneaky rename-to-retired/ without the matching.audit.json. - Client / API mistakes — missing
authHeaders(), missingcredentials: "include", lostif (!res.ok)gates, removed 401/402/403 handling. Detected statically per file via path + pattern heuristics. - Auth / middleware regressions —
requireAuth/requireAdmin/ middleware matcher coverage; the middleware-aware pin usesmiddleware.ts's captured auth signature so removing the auth check fails the guard. - Route / export / reference integrity — internal
<Link href="/foo">/navigate("/foo")/router.push("/foo")that resolve today are pinned; if a future commit removes the target page file, the pin fails. - Webhook signature verification —
stripe.webhooks.constructEvent,x-hub-signature-256,svix.verify,twilio.validateRequest, genericcrypto.createHmac("sha256", ...). Pinned captures the verify call so removing it fails the guard. - Public exposure no-fixture checks —
.envcommitted without.gitignorecoverage,.mapfiles indist//build/, debug routes (__debug,__test,debug.html,/admin/console).
AI lessons
Pinned writes repo-specific lessons to .pinned/ai-lessons.md (markdown for humans) and .pinned/lessons.json (structured for tools).
Each lesson is generated from a real event — a blocked bypass attempt, a replay-verified bug-fix guard, or a confirmed sibling audit. Dedupe is per guardId: repeat attempts append evidence to the existing entry, not duplicate sections.
Example:
## Don't weaken client-getReport-authHeaders
<!-- pinned:guard=client-getReport-authHeaders kind=guard-block -->
**Past mistake:**
weakened: src/api/getReport.ts — `headers: await authHeaders()` removed in PR #88
**Rule:**
Do not remove `authHeaders()` from `src/api/getReport.ts`. Fix the application code instead.
**Guard:** `client-getReport-authHeaders`
**Plain English:** don't drop authHeaders() from API calls
Point your AI coder at this file with pinned install-agent-rules so Claude/Cursor reads the rules before editing.
Commands
Setup
npx pinnedai init # one-time per repo
npx pinnedai install-agent-rules # opt-in: wire CLAUDE.md/.cursorrules/etc. to read .pinned/ai-lessons.md
npx pinnedai uninstall-agent-rules # undo the above
npx pinnedai agent-rules # show which agent files are wired
Daily workflow
npx pinned test # run the pin suite
npx pinned status # see active pins + recent events
npx pinned context # print the AI-coder context (rules + lessons) for inline prompting
Discovery
npx pinned scan-diff # show what Pinned would auto-protect in the current diff
npx pinned audit --learned # scan sibling code paths for risks matching learned patterns
npx pinned probe-admin # enumerate admin/internal routes + their protection state
npx pinned list # list all active + retired pins
Lifecycle
npx pinned retire <claim-id> --reason="..." # legitimate retirement (writes audit entry)
Internal (called by hooks)
npx pinned check-guard-removal # pre-commit hook entry; blocks AI bypass attempts
npx pinned statusline # statusline rendering for Claude Code
npx pinned backtest --mode=bug-fix # replay a repo's git history (calibration tool)
Optional AI-assisted analysis (BYOK)
PINNEDAI_BYOK=openai PINNEDAI_OPENAI_KEY=sk-... npx pinned check
LLM-as-proposer fires on each commit's diff to suggest additional guards the deterministic detectors might miss. Customer pays their LLM vendor directly; Pinned doesn't proxy.
Statusline
Pinned surfaces protection events without becoming a noisy reviewer. Events decay back to a calm baseline:
◆ pinned · 34 pins · 7 lessons · ✓ 12 verified # baseline
◆ pinned · 34 pins · ⚠ 2 protected files in this commit # editing guarded files
◆ pinned · 34 pins · ⛔ blocked: AI weakened pin sample.test.ts # Guard Integrity refused
◆ pinned · 34 pins · +1 new guard # SAVED
◆ pinned · 34 pins · scanned 3 similar files # AUDIT
◆ pinned · 34 pins · 4 guards passed # COVERED
◆ pinned · 34 pins · learned: don't drop authHeaders() from API calls # LEARNED
◆ pinned · 34 pins · ✗ 1 broken # failing pin
The BLOCK / LEARNED / SAVED / AUDIT / COVERED transients fall back to baseline after 1-2 minutes. Persistent value = guard count + lesson count.
What Pinned is NOT
Pinned is not a generic code reviewer, SAST scanner, or AI bug-fixer.
CodeRabbit reviews PRs. Snyk / Semgrep scan for broad security issues. They run once and leave comments.
Pinned protects the repo-specific promises your AI coder must not forget: the bug fixes, guards, tests, and lessons that should survive future AI edits. The output of every finding is an executable guard, not a comment.
AI and privacy
Pinned works without an LLM. The core engine is deterministic: guards either pass, fail, or were weakened.
Optional AI-assisted mode (BYOK) can propose additional guards, sibling audits, and lessons from diff context. AI output never enforces anything by itself — deterministic guards + CI do the enforcement.
Principle:
LLM proposes. Guards prove. CI enforces.
Local-first. Free beta runs entirely on your machine + your CI. Pinned doesn't see your code unless you set BYOK env vars (in which case the calls go directly to your LLM vendor, not through Pinned infrastructure).
Free vs Founder Pro
| Free Beta | Founder Pro (waitlist) | |
|---|---|---|
| All deterministic detectors | ✅ Unlimited | ✅ |
| Guard Integrity blocks | ✅ | ✅ |
| AI Lessons file + agent config wiring | ✅ | ✅ |
| Replay-verified bug-fix guards | ✅ | ✅ |
| Local audit / probe / context | ✅ | ✅ |
| Pre-commit / pre-push hooks | ✅ | ✅ |
| Statusline integration | ✅ | ✅ |
Report-only CI (you wire pinned guard yourself) |
✅ | ✅ |
| Optional BYOK AI proposer (your own key) | ✅ | ✅ |
| PR comments with repair prompts | — | Coming |
| Cross-repo AI lessons | — | Coming |
| Hosted AI analysis (no API key) | — | Coming |
| Cloud proof / history dashboard | — | Coming |
| AI / provider mistake analytics | — | Coming |
| Managed CI enforcement policies | — | Coming |
| Custom guard templates | — | Coming |
| Team policies + audit log | — | Coming |
Founder Pro is a waitlist today — no payment, no card. We collect interest to gauge demand for the paid features above. When paid opens, founder pricing locks for everyone on the list.
Status
v0.1 (free beta) ships with:
- 8 Guard Integrity detectors (23 / 23 known AI bypass tactics blocked in our mutation-test suite)
- AI Lessons file + opt-in agent-config wiring (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.)
- 6 P0 detector categories generating pins at init: Guard Integrity, client fetch / auth-headers / error-handling, auth/middleware, route/export/reference integrity, public exposure, webhook signature
pinned audit --learnedfor sibling discoverypinned probe-adminfor admin-route enumerationpinned contextfor runtime AI-coder briefing- Statusline events for BLOCK / SAVED / AUDIT / COVERED / LEARNED / VERIFIED + baseline
N pins · M lessons
Open beta. Bug reports + feature requests welcome at github.com/pinnedai/pinnedai/issues.
License
Apache 2.0. CLI source is public; the Cloudflare Worker that backs the (coming) hosted AI / cross-repo lessons / dashboard features stays private.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。