What it does
The MCP server exposes KERN's backend language and analysis tooling as MCP tools. KERN is a typed language that compiles to both TypeScript (Express) and Python (FastAPI) from a single .kern specification, eliminating the need to maintain parallel backend schemas and route handlers. It also includes static analysis — 240 AST-based security and code-quality rules for reviewing existing TypeScript and Python code. The server provides 46 tools covering compilation to multiple targets, type checking, code review, schema generation, and project context extraction.
Who it's for
Backend engineers maintaining TypeScript and Python services who want to stop rewriting route and schema definitions twice. Teams adopting KERN for multi-language backend parity. Security-focused developers who need to run comprehensive static analysis on existing codebases without writing custom linters.
Common use cases
- Compile a
.kernschema to both Express and FastAPI route handlers and type definitions - Run the 240-rule static analyzer against TypeScript or Python backends to catch security bugs, unguarded effects, and prompt-injection vulnerabilities
- Type-check a KERN schema to verify class hierarchies and call-site safety before compilation
- Generate a whole-project context map (AST summary) for feeding to an LLM or agent
- Scaffold a fullstack project or MCP server with built-in security guards
Setup pitfalls
- 20 secrets were flagged in the codebase — review the server's code and any included examples before deploying in sensitive environments
- Requires Node.js and
npm; generated TypeScript and Python still depend on standard library imports (express,fastapi, typing modules) which must be available at compile-target runtime - The
.kernimport command (TypeScript →.kernreverse inference) has limitations — complex generics and decorators may not round-trip cleanly - Some advanced language features are rejected at compile time for both targets to guarantee parity; schemas using these patterns will fail type-check