Prototype Kit MCP Server
An MCP server that creates and manages GOV.UK Prototype Kit projects, enabling agents to scaffold kits, plan and generate multi-page journeys as Nunjucks macros, and run the dev server with embedded GOV.UK design conventions and accessibility guidelines.
README
Prototype Kit MCP Server
An MCP server that creates and manages GOV.UK Prototype Kit projects. Agents can scaffold kits, plan and generate multi-page journeys as Nunjucks macros, manage version folders, and run npm run dev — following the embedded AI guidelines in ai-context.md (GOV.UK Design System conventions, content design, and accessibility).
Getting started
Prerequisites
- Python 3.12+
- Node.js LTS (required for
npx govuk-prototype-kit createandnpm run dev) - uv recommended
1. Install the server
git clone <your-repo-url> prototypekit-mcp
cd prototypekit-mcp
make install # creates .venv, installs deps + pre-commit hooks
cp .env.example .env
Optional: edit .env and set where prototypes should be created:
PROTOTYPE_ROOT=~/Documents/prototypes
PROTOTYPE_DEFAULT_PORT=3000
ENABLE_AUTH=False
2. Run the MCP server
make local # http://localhost:5001
Check it is up:
curl http://localhost:5001/health
<details> <summary>Manual run (without Make)</summary>
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
cp .env.example .env
prototypekit-mcp
</details>
3. Connect Cursor
Add this to your Cursor MCP settings (replace paths with your machine):
{
"mcpServers": {
"prototypekit": {
"command": "/Users/YOU/Documents/prototypekit-mcp/.venv/bin/prototypekit-mcp",
"env": {
"ENABLE_AUTH": "False",
"COMPATIBLE_WITH_CURSOR": "True",
"PROTOTYPE_ROOT": "/Users/YOU/Documents/prototypes",
"MCP_HOST": "localhost",
"MCP_PORT": "5001"
}
}
}
}
If the server is already running via make local, you can point Cursor at the HTTP endpoint instead: http://localhost:5001/mcp.
Restart Cursor (or reload MCP servers) and confirm the prototypekit tools appear.
4. Create your first prototype
In Cursor chat, ask the agent to use the tools, for example:
Using the prototypekit MCP tools: create a prototype named
juggling-licencefor “Apply for a juggling licence”, plan a journey that asks how many balls you can juggle, generate it as v1, then start it.
The agent should roughly:
get_ai_guidelines— load GOV.UK / ai-context rulescreate_prototype— scaffold the kit underPROTOTYPE_ROOTplan_journey→generate_journey— writeapp/views/v1/pages and routesstart_prototype— openhttp://localhost:3000
Then open the returned URL in a browser. Later iterations: create_version, create_page, add_route.
For a step-by-step page example, see the tutorial.
MCP tools
| Tool | Purpose |
|---|---|
get_ai_guidelines |
Return ai-context conventions (full or by section) |
create_prototype |
Scaffold a new Prototype Kit project |
list_prototypes |
List projects under PROTOTYPE_ROOT |
plan_journey |
Draft structured journey JSON from a description |
generate_journey |
Write versioned Nunjucks pages and Express routes |
create_page |
Add one page (start / question / check-answers / …) |
add_route |
Append simple or branching POST routes |
create_version |
Copy vN → vN+1 (never deletes old versions) |
list_pages |
Inventory views and routes |
start_prototype |
Run npm run dev |
stop_prototype |
Stop a tracked process |
prototype_status |
Running status / ports |
Generators emit only Nunjucks macros and govuk-* classes. Unsupported custom UI returns an explicit gap error (ai-context rule 5).
Configuration
| Variable | Default | Description |
|---|---|---|
MCP_HOST |
localhost |
Server bind address |
MCP_PORT |
5001 |
Server port |
MCP_TRANSPORT_PROTOCOL |
http |
http, sse, or streamable-http |
ENABLE_AUTH |
False in .env.example |
OAuth (off for local prototyping) |
PROTOTYPE_ROOT |
~/Documents/prototypes |
Where kits are created |
PROTOTYPE_KIT_VERSION |
latest |
npm dist-tag / version for the kit |
PROTOTYPE_DEFAULT_PORT |
3000 |
Default npm run dev port |
PYTHON_LOG_LEVEL |
INFO |
Logging level |
AI guidelines
The server ships prototypekit_mcp/src/assets/ai-context.md based on HM Land Registry / MoJ GOV.UK Prototype Kit AI context. Every new prototype receives a copy at {prototype}/ai-context.md.
Core rules enforced by generators:
- Pages extend
layouts/main.html - Use Nunjucks macros (
govukButton,govukInput, …) - Only GOV.UK classes — no custom CSS
- Accessibility via Design System components
- Flag gaps when something is not possible with existing components
Documentation
| Guide | Description |
|---|---|
| Architecture | System diagrams and tool layout |
| Development | Setup, testing, code quality |
| Deployment | Container / OpenShift |
| Authentication | Optional OAuth |
| Tutorial | Add a page via create_page |
| Examples | FastMCP and LangGraph clients |
License
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。