UK Government Technology Standards MCP Server
Provides AI assistants with access to 102 curated UK Government technology standards, enabling context-aware recommendations for accessibility, APIs, security, cloud strategy, and more.
README
UK Government Technology Standards MCP Server
A Model Context Protocol (MCP) server providing access to 102 curated UK Government technology standards for AI assistants. Get context-aware recommendations for accessibility, APIs, security, cloud strategy, and more.
What This Provides
- 102 Curated Standards: Carefully selected UK Government tech standards URLs
- Context-Aware Recommendations: Get standards based on your work type and project phase
- Hybrid Search: Combines exact keyword matching with semantic understanding
- Multiple Access Methods: MCP protocol, HTTP API, and command-line tools
- Real-time Updates: Keep standards current with automated refresh capabilities
Quick Start
Prerequisites
- Node.js 18+
- npm (comes with Node.js)
Installation
# Clone the repository
git clone <repository-url>
cd uk-gov-tech-standards-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Setup database with curated standards (takes 2-3 minutes)
npm run setup
Usage
Start MCP Server:
npm run serve
Start HTTP API Server:
npm run serve:http
# API available at http://localhost:3001
Docker Deployment
Prerequisites
- Docker and Docker Compose
Quick Start with Docker
# Clone the repository
git clone <repository-url>
cd uk-gov-tech-standards-mcp
# Copy environment template
cp docker.env.template .env
# Build and start services
docker-compose up -d
# Check status
docker-compose ps
The setup includes:
- MCP Server:
localhost:3000 - HTTP API:
localhost:8080 - ChromaDB:
localhost:8000(vector database)
Docker Services
MCP Server (default):
docker-compose up -d uk-gov-standards-mcp
HTTP Server (alternative):
docker-compose --profile http-only up -d
Both servers:
docker-compose up -d uk-gov-standards-mcp uk-gov-standards-http
Data Persistence
Docker volumes persist data in:
./data/- SQLite database./logs/- Application logs./models/- ML models cachechromadb_data- Vector embeddings
Docker Configuration
Environment Variables (.env file):
NODE_ENV=production
LOG_LEVEL=info
DB_PATH=/app/data/standards.db
CHROMA_HOST=chromadb
CHROMA_PORT=8000
Health Checks:
# Check MCP server health
curl http://localhost:3000/health
# Check HTTP API health
curl http://localhost:8080/health
# Check ChromaDB health
curl http://localhost:8000/api/v1/heartbeat
Logs:
# View all logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f uk-gov-standards-mcp
docker-compose logs -f chromadb
MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"uk-gov-standards": {
"command": "node",
"args": ["/absolute/path/to/uk-gov-tech-standards-mcp/dist/index.js"],
"env": {
"DATABASE_URL": "sqlite:/absolute/path/to/uk-gov-tech-standards-mcp/standards.db",
"NODE_ENV": "production",
"LOG_LEVEL": "info"
}
}
}
}
Other MCP Clients
The server implements the full MCP specification. Use these connection details:
- Command:
node - Args:
["/path/to/dist/index.js"] - Working Directory: Project root
- Environment: Set
DATABASE_URLto your database path
🛠 MCP Tools
The server provides 8 context-aware tools:
Core Search Tools
search_uk_gov_standards
- Search across all 102 curated standards
- Hybrid search: exact keywords + semantic understanding
- Parameters:
query(required),category,organisation
get_standard_by_id
- Get detailed information about a specific standard
- Parameters:
standardId(required)
list_categories
- Get all available categories with counts
- No parameters required
get_recent_updates
- Get recently updated standards
- Parameters:
daysBack(default: 30)
Context-Aware Tools
get_applicable_standards
- Get standards for specific work context
- Parameters:
workType[],serviceType[],developmentPhase[]
get_mandatory_standards
- Get all mandatory/critical standards
- No parameters required
get_standards_by_priority
- Filter by priority level
- Parameters:
priority(critical, high, medium, low)
get_category_hierarchy
- Get hierarchical category structure
- Parameters:
categoryId(optional)
Compliance Tool
check_compliance
- Generate compliance checklist for your service
- Parameters:
serviceDescription(required)
HTTP API
When running npm run serve:http, access these endpoints:
Search & Discovery
GET /api/search?q=<query>&category=<category>&org=<organisation>
GET /api/standards/<id>
GET /api/categories
GET /api/recent?days=<days>
Context-Aware Endpoints
POST /api/applicable
{
"workType": ["frontend", "backend"],
"serviceType": ["citizen-facing"],
"developmentPhase": ["development", "testing"]
}
GET /api/mandatory
GET /api/priority/<level>
GET /api/hierarchy?categoryId=<id>
POST /api/compliance
{
"serviceDescription": "Description of your service"
}
Curated Standards Categories
102 standards across 11 focused categories:
| Category | Count | When to Use |
|---|---|---|
| Design and Build Government Services | 30 | Any government service development |
| Standards | 21 | General compliance and best practices |
| Secure By Design | 14 | Security-focused development |
| Accessibility | 10 | Frontend/UI development |
| Open source and open standards | 8 | Technology selection and architecture |
| APIs | 5 | REST, SOAP, GraphQL development |
| Legacy Technologies | 3 | Modernization projects |
| Native or Hybrid Apps | 3 | Mobile app development |
| Cloud Strategy | 2 | Cloud adoption and migration |
| Data | 2 | Data management and GDPR |
| Application Development | 1 | General development guidance |
🔍 Search Capabilities
Hybrid Search System
- FTS Search: Fast exact/partial keyword matching
- Semantic Search: Understanding meaning and context (when available)
- Graceful Fallback: Works even if semantic features unavailable
Context-Aware Recommendations
Get relevant standards based on your specific work:
| Work Context | Example Results |
|---|---|
| Frontend + Citizen-facing | Accessibility standards, WCAG guidelines |
| Backend + APIs | API technical standards, security guidelines |
| Mobile + Native apps | iOS/Android security, app store guidelines |
| Cloud + Data | GDPR compliance, cloud-first policy |
Advanced Usage
Custom Database Path
DATABASE_URL="sqlite:/custom/path/standards.db" npm run setup
Update Existing Database
npm run update # Refresh standards content
Development Mode
npm run dev # Run with hot reload
npm test # Run test suite
Logging Configuration
Set LOG_LEVEL environment variable:
error: Errors onlywarn: Warnings and errorsinfo: General information (default)debug: Detailed debugging
System Architecture
Focused Approach
This system uses a curated approach rather than broad discovery:
- ✅ 102 specific URLs from carefully selected UK Government standards
- ✅ 11 focused categories with clear applicability context
- ✅ Context-aware recommendations based on your work context
- ✅ Priority-based filtering (critical, high, medium, low)
- ✅ Mandatory vs. optional clearly identified
- ✅ Faster, predictable setup (2-3 minutes vs 10+ minutes)
Technology Stack
- Database: SQLite with FTS5 full-text search
- Search: Hybrid FTS + semantic similarity (optional)
- Web Scraping: Puppeteer with intelligent content processing
- API: Express.js HTTP server
- MCP: Full Model Context Protocol implementation
- Embeddings: Transformers.js with local models (optional)
Data Sources
All 102 standards are sourced from official UK Government websites:
- GDS Service Manual: Design and accessibility standards
- NCSC Guidance: Security and cyber security standards
- Cabinet Office: Digital service and open standards
- Gov.UK Guidance: APIs, cloud, and technical standards
- ICO Resources: Data protection and GDPR compliance
Troubleshooting
Common Issues
Database corruption:
rm -f standards.db*
npm run setup
Port already in use:
# Change port in src/http-server.ts or kill existing process
pkill -f "http-server"
Semantic search unavailable:
- This is normal - the system gracefully falls back to FTS search
- Full semantic search requires additional vector database setup
Getting Help
- Check the logs in
logs/server.log - Verify Node.js version:
node --version(requires 18+) - Ensure database exists:
ls -la standards.db - Test basic functionality:
npm test
##� License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Updates
The system automatically tracks when standards are updated. Run npm run update periodically to refresh content.
Built for AI assistants to provide accurate, up-to-date UK Government technology guidance.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。