Skip to main content
Glama

KCF โ€” the open knowledge-coding standard

License: Apache 2.0 CI Python 3.10+

An open standard from Composable Holdings Inc.

The new vibe coding is knowledge coding = semantic modeling + vibe coding. Give the LLM a complete, machine-checked model of your domain first, then let it vibe-code from that spec instead of guessing from prose.

๐Ÿ‘‰ Start here: Knowledge Coding โ€” get running in 3 minutes

Connect KCF to Claude, ChatGPT, VS Code, or Cursor and build your first app by just describing it.

KCF turns domain knowledge โ€” entities, relationships, lifecycles, actions, events โ€” into a normalized semantic IR: a single JSON model that is valid (no dangling references), complete (every entity has an identity, every required obligation met), and traceable (nothing is silently dropped on the way to code). The LLM builds against that spec, not a vibe.

requirements โ”€โ”€โ–ถ checked model (IR) โ”€โ”€โ–ถ LLM โ”€โ”€โ–ถ app     (built from a spec)
                     โ–ฒ            โ”‚ kcf assess: valid? gaps? โ†’ guidance
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Why this exists

LLM code generators are only as good as the model of the domain they're given. Feed them a paragraph and they hallucinate fields, invent relationships, and drop half your lifecycle. KCF makes the model the artifact:

  • Well-formed? the grammar / compiler answers that (syntax).

  • Valid? the semantic analyzer answers that (no relationship points at a missing concept).

  • Complete enough to build from? kcf assess answers that with a single verdict: valid (analyzer-clean โ€” enough to generate) and ready (also complete: zero required coverage gaps, patterns proven, roles resolved).

You generate from a valid model; the coverage gaps travel to the LLM as enrichment guidance (ready is the completeness goal, not a hard gate). The generated code ends with a coverage self-audit proving nothing in the model was dropped (dropped: []).

Related MCP server: MCP Tool Factory

60-second quickstart

pip install kcf-oss        # provides the `kcf` command

# 1. compile a tiny domain model โ†’ semantic IR (grab the sample from the repo)
curl -O https://raw.githubusercontent.com/OWNER/kcf/main/kcf-oss/tests/domains/business-application.kcf
kcf compile business-application.kcf --output model-ir.json --validate

# 2. is it complete enough to generate from?
kcf assess model-ir.json
#  โ†’ { "valid": true, "ready": true,
#      "checks": { "coverage": { "requiredGaps": 0 } } }

Once ready: true, generate the application. KCF stops at the IR โ€” the IR is the durable specification; your own LLM turns it into code for whatever stack you choose, guided by a stack-agnostic system prompt and a single-shot example.

# 3. generate โ€” with any LLM, for any stack (codegen/). Two tiers meet at OpenAPI:
#    BACKEND  โ†’ generate-backend.md  + a backend stack  โ†’ a service with Swagger by default
#               (fastapi-sqlmodel-postgres ยท typescript-express-prisma ยท django-drf-postgres)
#    FRONTEND โ†’ generate-frontend.md + the backend's /openapi.json + a frontend stack
#               (react-typescript-openapi) โ†’ a UI bound to that contract

The LLM returns the implementation plus a coverage self-audit proving every IR identity was realized and nothing dropped (dropped: []). See kcf-oss/codegen/ and, for the full requirements-to-code tour, kcf-oss/docs/WALKTHROUGH.md.

KCF stops at the IR โ€” a complete, machine-checked model is the deliverable. Turning it into running code is the LLM codegen pack's job (deterministic emitters are part of the separate commercial platform).

From source instead: git clone https://github.com/OWNER/kcf.git && cd kcf && pip install -e . A source checkout also gives you the contributor gate (kcf check) and the full-stack tooling, which need the bundled semantic-core.

Use it in your chat LLM (MCP)

The easiest way to use KCF is to plug it into the chat LLM you already use. The MCP server lets Claude, ChatGPT, or VS Code build a complete, machine-checked model of your domain and generate the app from it โ€” instead of vibe-coding against prose.

pip install "kcf-oss[mcp]"      # provides the `kcf-mcp` command
claude mcp add kcf -- kcf-mcp   # Claude Code; see kcf-oss/mcp/README.md for Claude Desktop / VS Code / ChatGPT

Then just describe your domain โ€” or invoke a guided prompt (model_domain end to end, build_model to model only, generate_app to generate only). The assistant drafts a .kcf, checks it, lets you approve anything it inferred (bulk-accept the confident gaps, or review them one by one), then generates the backend and a matching frontend โ€” each proving nothing in your model was dropped. See Knowledge Coding for the full five-step flow.

Try it in the browser

Prefer a UI? The playground is a zero-persistence web app: paste a .kcf model and see its IR, readiness verdict, and the ready-to-paste LLM code-generation prompt for your chosen stack โ€” the whole loop, live.

pip install "kcf-oss[playground]"
uvicorn app:app --app-dir kcf-oss/playground   # โ†’ http://127.0.0.1:8000
# or: docker build -f kcf-oss/playground/Dockerfile -t kcf-playground . && docker run -p 8000:8000 kcf-playground

What's in the box

Piece

What it is

Grammars

29 ISO/IEC 14977 EBNF modules โ€” one primary semantic dimension each (ENTITY, ACTOR, WORK, EVENT, LIFECYCLE, RULE, โ€ฆ) rooted in the KCF metagrammar

Compiler

.kcf text โ†’ normalized semantic IR with source spans

Analyzer

validity + coverage + pattern-proof + role-resolution checks

IR schema

versioned model-ir-v1 JSON contract you can target from any tool

Presets

6 composable foundational profiles (business-application, event-driven-system, analytics-platform, โ€ฆ)

Codegen pack

codegen/ โ€” a stack-agnostic system prompt + single-shot examples across backend (FastAPI, Express/Prisma, Django โ€” each with Swagger) and frontend (React/TS bound to the backend's OpenAPI) tiers, plus a full per-construct coverage audit

MCP server

mcp/ โ€” plug the toolchain into Claude / ChatGPT / VS Code; model a domain and generate code conversationally (kcf-mcp)

LLM workflow

an ordered 16-step prompt package (kcf-oss/workflows/) for going from requirements to a validated IR

Learn more

  • Knowledge Coding โ€” get started โ€” connect KCF to your LLM and build your first app (start here).

  • QUICKSTART โ€” the hello-world above, annotated.

  • codegen/ โ€” generate an app from the IR with your LLM, for any stack.

  • WALKTHROUGH โ€” requirements โ†’ ready IR โ†’ generated app.

  • CONCEPTS โ€” the mental model and the four semantic layers.

  • kcf-oss/README โ€” full architecture, IR contract, and toolchain reference.

  • EXTENDING โ€” how to change or add a grammar (and the Grammar RFC process).

  • CHANGELOG โ€” releases, tagged by which contract moved.

Open core

KCF is open under Apache-2.0 โ€” the standard, compiler, analyzer, IR schema, foundational presets, and the codegen pack are free to use and always will be. A separate commercial platform builds on top of this standard; it never subtracts from it. See OPEN_CORE.md for the exact promise.

Contributing

Issues and PRs welcome โ€” start with CONTRIBUTING.md and the good first issues. The whole project is gated by kcf check (runs in CI on every PR). Changing or adding a grammar? Read EXTENDING and open a Grammar RFC first.

License

Apache-2.0. ยฉ 2026 Composable Holdings Inc. KCF is created and maintained by Composable Holdings Inc.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikec-chi/kcf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server