mcp-apps-kit
AGENTS.md16 starsChanged 11 months agoMITView on GitHub
Build a single TypeScript codebase that runs interactive apps on MCP Apps and ChatGPT via a shared tool + UI model. Optimize for strict type-safety, clean public APIs, and backwards-compatible changes across packages.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- chatgpt-mcp-apps-kitSkill
- code-reviewerSkill
- dispatching-parallel-agentsSkill
- mcp-mcp-apps-kitSkill
- mcp-builderSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 45
Test: pnpm test (or faster: pnpm -C packages/<pkg> test)
- Very specific: line 53
ALWAYS: run pnpm build && pnpm test && pnpm lint && pnpm typecheck before finishing any task (repo policy.
- Distinctive: line 54
NEVER: use Zod v3 or Express v4 assumptions.
- Very specific: line 58
ALWAYS: add/adjust tests under the owning package’s tests/ when changing behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
@Context (Mission)
Build a single TypeScript codebase that runs interactive apps on MCP Apps and ChatGPT via a shared tool + UI model. Optimize for strict type-safety, clean public APIs, and backwards-compatible changes across packages.
@Stack (Technical DNA)
- Monorepo: pnpm workspaces + Nx (
nx run-many) - Language: TypeScript (strict,
noImplicitAny,noUncheckedIndexedAccess,verbatimModuleSyntax) - Runtime: Node.js >= 18 (runtime packages), >= 20 (development/CLI/CI; don't change without updating engines/tooling)
- Schema/validation: Zod v4 (not v3)
- Server: Express v5 (not v4) via
@mcp-apps-kit/core - Testing: Vitest; repo-level coverage thresholds enforced (50% lines/functions/branches/statements)
- Lint/format: ESLint (flat config) + Prettier; pre-commit runs
lint-staged - Build: tsup per package; TypeDoc for docs (
pnpm docs)
@Knowledge Graph (Context Links)
@Map (File Structure)
packages/core/: server framework (createApp, adapters, middleware, plugins, OAuth). Public API is re-exported fromsrc/index.ts.packages/ui/: client SDK (protocol detection, adapters, theming helpers). Must support both MCP Apps + ChatGPT host shapes.packages/ui-react/: React bindings (provider + hooks). Hooks must be usable without host-specific branching in app code.packages/ui-react-builder/: build tooling to bundle React components into self-contained HTML; includes optional Vite plugin.packages/testing/: test utilities (test server/client, matchers, property/behavior/LLM eval helpers). Clean up servers in tests.packages/create-app/: CLI scaffolder (templates + integration tests). Generated projects intentionally avoid pnpm workspace coupling.examples/: reference integrations; use for manual smoke checks (don’t copy docs into core packages).
@Workflow (How To Work Here)
- Build:
pnpm build - Test:
pnpm test(or faster:pnpm -C packages/<pkg> test) - Lint:
pnpm lint - Format:
pnpm format(check) /pnpm format:write(fix) - Type-check:
pnpm typecheck - Run example:
pnpm -C examples/minimal dev
@Rules (Dos & Don’ts)
- ALWAYS run
pnpm build && pnpm test && pnpm lint && pnpm typecheckbefore finishing any task (repo policy; broken builds block everyone). - NEVER use Zod v3 or Express v4 assumptions; this repo is Zod 4 + Express 5.
- NEVER introduce
anyin production code; useunknown+ narrowing (ESLint enforces@typescript-eslint/no-explicit-any). - NEVER bypass the export contract: public APIs must flow through each package’s
src/index.ts(avoid deep imports across packages). - ALWAYS
await next()in Koa-style middleware; failing to do so silently breaks the middleware chain. - ALWAYS add/adjust tests under the owning package’s
tests/when changing behavior; coverage thresholds are enforced at the repo level. - AVOID cross-package circular dependencies; prefer moving shared types/utilities “down” (or into a dedicated package) instead of importing “up”.
@Memory (Self-Correction Loop)
If you encounter repeated errors (for example, failing commands, misused scripts, incorrect imports, or configuration pitfalls) or discover a new best practice while working in this repository, you MUST update this file. Add the specific failure case and its correct resolution to @Rules or @Workflow so future agents do not repeat the same mistake.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

