kcf-mcp

kcf-mcp

MCP server that lets Claude, ChatGPT, or VS Code build a complete, machine-checked model of your domain and generate an app from it.

Category
访问服务器

README

KCF — The Semantic Framework for Making Knowledge Executable

License: Apache 2.0 CI Python 3.10+

The open Knowledge Coding Framework from Composable Holdings Inc.

KCF helps you encode and capture business knowledge — entities, relationships, lifecycles, rules, and actions — so that it can be made executable. Knowledge Coding is the new Vibe Coding: you model your domain into a complete, machine-checked semantic spec, then let an LLM build the application from that spec instead of guessing from prose — knowledge coding = semantic modeling + vibe coding.

👉 Start here: Knowledge Coding — get running in 3 minutes

Two ways in: 🌱 no install — point your chat LLM at the hosted connector and just describe your app; or 🛠️ build for real — pip install + kcf init a project where the model stays the source of truth.

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: []).

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/mikec-chi/kcf-oss/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.

From source instead: git clone https://github.com/mikec-chi/kcf-oss.git && cd kcf-oss && 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)

Plug KCF into the chat LLM you already use and it builds a complete, machine-checked model of your domain, then generates the app from it — instead of vibe-coding against prose.

🌱 No install — connect to the hosted server. Point your LLM at the hosted connector https://kcf-mcp.onrender.com/mcp:

claude mcp add --transport http kcf https://kcf-mcp.onrender.com/mcp   # Claude Code
# ChatGPT: Settings → Connectors → add that URL. (Read-only demo; free tier, sleeps when idle.)

🛠️ Building for real — install locally and seed a project:

pip install "kcf-oss[mcp]"      # the `kcf` CLI + the `kcf-mcp` server
kcf init my-app                 # a project where the model is the source of truth
claude mcp add kcf -- kcf-mcp   # local Claude Code; see kcf-oss/mcp/README.md for other hosts

Either way, 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 both paths, step by step.

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
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, 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

KCF gets better the more people model with it. Two tracks — start with CONTRIBUTING.md:

  • Build on KCF — share in the community/ area: .kcf models you built, prompt packs (elicitation guides + codegen overrides) that tuned the MCP for you, techniques for eliciting and generating well, a showcase of apps you shipped, and experimental grammars. Each area has a template and a quick check (models must be valid — python community/models/validate.py).
  • Improve the core — new codegen stacks, analyzer rules, integrations, or grammar changes (read EXTENDING and open a Grammar RFC first). The core is gated by kcf check (runs in CI on every PR).

New here? A model of a domain you know, or a technique that worked for you, is a great first PR. See the good first issues.

License

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选