nhs-frontend-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nhs-frontend-mcpshow me the button component template and styles"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nhs-frontend-mcp
An MCP server for the NHS.UK frontend design system. Plug it into Claude, Cursor, or any MCP-compatible client and your AI assistant can look up real component templates, SCSS, macro options, and usage examples directly from the source — no hallucinated class names.
Tools
Tool | What it does |
| Lists all 43 components |
| Full component details: template, styles, API, examples, and JS |
| Nunjucks template only |
| SCSS only |
| Macro options reference with types, required flags, and descriptions |
| Fixture examples for all variants |
| The base HTML page template |
| Keyword search across component names and descriptions |
| Manual git pull + cache clear |
Related MCP server: UK Government Technology Standards MCP Server
Resources
Every component is also exposed as an MCP resource at nhs://component/{name}.
Auto-sync
On startup the server runs git pull on the nhsuk-frontend repo, then repeats every 6 hours (configurable). No manual pulls needed.
Setup
1. Clone nhsuk-frontend
git clone https://github.com/nhsuk/nhsuk-frontend.git2. Clone this repo next to it
git clone https://github.com/EmmaExcel/nhs-frontend-mcp.git
cd nhs-frontend-mcp
npm install
npm run build3. Add to your MCP client
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"nhs-frontend": {
"command": "node",
"args": ["/path/to/nhs-frontend-mcp/dist/index.js"],
"env": {
"NHS_FRONTEND_PATH": "/path/to/nhs-frontend"
}
}
}
}Or via npx (no clone needed):
{
"mcpServers": {
"nhs-frontend": {
"command": "npx",
"args": ["nhs-frontend-mcp"],
"env": {
"NHS_FRONTEND_PATH": "/path/to/nhs-frontend"
}
}
}
}Environment variables
Variable | Description | Default |
| Path to your nhsuk-frontend clone |
|
| How often to pull updates. Set to |
|
Development
npm run build # compile
npm start # run
node test.mjs # run tests (65 assertions)Project structure
src/
index.ts # server entry, tool handlers, resource handlers
components.ts # component discovery, file reading, macro option parsing
format.ts # markdown output formatting
sync.ts # git pull on startup + interval
types.ts # shared interfacesLicence
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Find UI components and themes, retrieve code, and generate with hosted 21st AI when enabled.
Serves your design system and coding standards to coding agents, so they stop guessing.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
AlicenseCqualityDmaintenanceProvides AI assistants with comprehensive access to Grafana's React component library, including TypeScript source code, MDX documentation, Storybook examples, test files, and design system tokens for building Grafana-compatible interfaces.17 npm9MIT- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with access to 102 curated UK Government technology standards, enabling context-aware recommendations for accessibility, APIs, security, cloud strategy, and more.-
- AlicenseAqualityCmaintenanceProvides AI coding assistants with on-demand access to component specs, test scenarios, accessibility requirements, and build guides from the Web UI Component Specification.10MIT
- AlicenseNot gradedqualityCmaintenanceExposes GOV.UK Frontend components and Design System patterns and styles as MCP resources for use with AI assistants.1 npmMIT