Bürokratt MCP Server
Provides AI coding assistant rules and guidelines for Bürokratt modules, including expertise in DSL-based backend (Ruuter YAML, SQL), frontend development, browser debugging, fork synchronization, and service testing capabilities.
README
Bürokratt MCP Server
MCP (Model Context Protocol) server for sharing AI coding assistant rules for Bürokratt modules.
Rationale: The Buerokratt tech stack, especially the DSL-based backend, is quite unique and is difficult to use with AI coding assistants. This MCP server provides a way to share rules and guidelines for different Bürokratt modules in a way that is easy to use with different IDEs and AI coding assistants. It is based on an initial .cursorrules setup that is also provided in this repo for legacy purposes.
Currently available rules:
global- Global rules that apply to all modulesService-Module- Service Module specific rulesshared-backend- Shared backend rules (SQL, Ruuter)shared-frontend- Shared frontend rules (React, CSS)
Highlights
- Backend expertise: Knows how to write migrations, SQL queries, and Ruuter YAML DSL.
- Browser debugging: Can open browser to debug frontend issues with full console access and automatic cookie authentication. For now, this only works with Cursor!
- Fork synchronization: Can sync Bürokratt module forks with upstream repositories.
- Service testing: in Service Module, can test and debug services directly (similar to the test widget on service edit page).
- Frontend testing: Knows how to write frontend tests for Service Module.
Planned
- [ ] Add support for more modules.
- [ ] Add OAuth2 support for authentication.
- [ ] Consider using several MCP servers for different modules if context size is an issue. There is a CI check for this, see checks below.
- [ ] Cache rules in memory if needed. Check with
measure-load-timescript.
Usage
In this repo folder:
docker-compose up -d
In your project folder:
Note that <project-root> can also be a folder with several Bürokratt modules.
Cursor:
<project-root>/.cursor/mcp.json
{
"mcpServers": {
"buerokratt-mcp": {
"url": "http://localhost:3627/mcp"
}
}
}
You might also want to add a simple rule to load the rules for the module based on path. See .cursor/rules/buerokratt-mcp.mdc for an example. Place it in <project-root>/.cursor/rules/buerokratt-mcp.mdc.
VS Code:
<project-root>/.vscode/settings.json
{
"mcp.servers": {
"buerokratt-mcp": {
"url": "http://localhost:3627/mcp",
"transport": {
"type": "sse"
}
}
}
}
JetBrains:
<project-root>/.idea/mcp.json
{
"mcpServers": {
"buerokratt-mcp": {
"url": "http://localhost:3627/mcp",
"transport": {
"type": "sse"
}
}
}
}
MCP Server Features
Once configured, the MCP server provides:
- Resources: Access to module-specific rules via
rules://{module}(e.g.,rules://Service-Module) - Tools:
get_rules- Get rules for a specific modulelist_modules- List all available modulessearch_rules- Search rules by keyword
- Prompts:
development-rules- Get development rules as a system prompt for a specific module
- Testing with MCP Inspector:
pnpm inspect.
Development
Editing rules
Simply edit the rules in the rules/ folder and commit. Rules are loaded fresh on every request, so no server restart is needed to get the changes.
These rules are in Markdown format with frontmatter. modules field in frontmatter is required and should be an array of module names. Module names should match Bürokratt repository folder names exactly (e.g., Service-Module, Training-Module, Analytics-Module, Buerokratt-Chatbot). Other fields are optional. An example:
---
modules:
- Service-Module
- Training-Module
- Analytics-Module
- Buerokratt-Chatbot
tags:
- backend
- sql
- database
description: Description of the rule
---
## Some rule set
... rule set content ...
⚠️ Important note on context size. To ensure the MCP server works correctly, the rule set should not exceed the following limits:
- Individual files: Safe < 10 KB, Warning < 20 KB
- Merged modules: Safe < 50 KB, Warning < 100 KB
This can be with an npm script, see checks below.
Project Structure
buerokratt-mcp/
├── src/ # Typescript source code
├── rules/ # Rule files (markdown with frontmatter)
│ ├── global/ # Global rules that apply to all modules
│ │ ├── common.md
│ │ └── typescript.md
│ ├── Service-Module/ # Service Module specific rules
│ │ └── rules.md
│ ├── ...other-modules... # Other modules specific rules
│ │ └── rules.md
│ ├── shared-backend/ # Shared backend rules (SQL, Ruuter)
│ │ ├── sql-rules.md
│ │ ├── sql-restrictions.md
│ │ └── ruuter-rules.md
│ └── shared-frontend/ # Shared frontend rules (React, CSS)
│ ├── react-rules.md
│ └── css-rules.md
└── ...
Running the project for local development
# Install the correct Node version
nvm install
# Install the correct pnpm version
corepack enable pnpm
corepack use
pnpm install
pnpm start
After you are done with the code changes, rebuild the image and restart the container:
docker compose up -d --build --force-recreate
Checks
CI
The following checks run automatically in CI on push and pull requests:
- format: Checks code formatting with Prettier
- lint: Runs ESLint to check code quality and style
- lint-markdown: Lints markdown files (rules and README) using markdownlint
- typecheck: Validates TypeScript types without emitting files
- validate: Validates rule files (frontmatter structure, markdown syntax, and module names against GitHub repositories)
- check-context-size: Checks that rule files don't exceed safe token limits
- test: Runs tests
Local
These can also be run manually with npm scripts:
pnpm format
pnpm lint
pnpm lint:markdown
pnpm typecheck
pnpm validate
pnpm check-context-size
pnpm check-context-size <module-name>
pnpm test
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。