MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

Modular MCP server with for sharing AI coding assistant rules across projects, tech stacks, and languages.

创建于 1/26/2026
更新于 29 days ago
Repository documentation and setup instructions

Rulekit MCP

A modular MCP (Model Context Protocol) server for sharing AI coding assistant rules for different projects and tech stacks.

The goal is to make it easy to share rules across different projects and support a wide range of use cases and tools. These could be AI assisted coding with different editors, bootstrapping new projects, automated code reviews and so on.

Highlights

  • Modular structure with different scopes for rules: projects, groups, techs, and languages. So e.g. asking to load rules in Bürokratt Service-Module repo will load repo-specific rules (project), general Bürokratt DSL/SQL rules (group), general React rules (tech) and general TypeScript rules (language). See editing rules for more details.
  • Only the rules you ask for are loaded into context.
  • Support for different editors. MCP features are also implemented in a way to allow this.
  • Support for lazy-loaded assets. These can be bigger code snippets, helper scripts, YAML/JSON that are not loaded into context immediately — but only when actually needed based on user prompts.
  • CI checks, including a script to check that merged rules for techs/projects do not exceed safe token context limits.
  • Basic set of NestJS rules. Can bootstrap you a NestJS project from a starter repo, will create/modify GitHub Actions CI workflows based on the project structure.
  • Comprehensive set of rules for Bürokratt projects. Can synchronise forks, test Service-Module services by calling them directly, open browser and log in for debugging and much more!

Setup

1. Start the server

docker compose up -d

2. Configure your editor

In your project(s) folder, run the command for your editor. Pro tip: this can be a folder with multiple projects/repositories.

The script adds MCP server config and a small instruction bootstrap file. It checks for existing configuration and only appends if needed.

Cursor:

curl -sSL https://raw.githubusercontent.com/IgorKrupenja/rulekit-mcp/main/scripts/setup.sh | bash -s -- cursor

VS Code:

curl -sSL https://raw.githubusercontent.com/IgorKrupenja/rulekit-mcp/main/scripts/setup.sh | bash -s -- vscode

JetBrains:

curl -sSL https://raw.githubusercontent.com/IgorKrupenja/rulekit-mcp/main/scripts/setup.sh | bash -s -- jetbrains

Claude Code:

curl -sSL https://raw.githubusercontent.com/IgorKrupenja/rulekit-mcp/main/scripts/setup.sh | bash -s -- claude

Manual install:

If you do not want to use the script, you can also set up manually. See docs/setup.md.

Prompting

If you followed the setup instructions above, your AI assistant will automatically use the get_mcp_instructions tool to learn how to interact with this MCP server. This means you can use natural language prompts like:

  • "Get NestJS rules from MCP"
  • "Load React rules"
  • "What projects are available in MCP?"
  • "Show available tech stacks"
  • "Find rules about testing in MCP"
  • "Load Service-Module rules"
  • "Get rules for this project in MCP" (provided you have selected a file belonging to the project)
  • "Sync fork" or "Sync with upstream" (In Buerokatt repos)
  • "Create me a NestJS starter in api folder"

Editing rules

The rules are in the rules/ folder. Rules are loaded fresh on every request, so no server restart is needed after you edit rules or manifest.

Folder Structure

rules/
├── manifest.yml
├── general.md
├── projects/
│   ├── buerokratt/
│   │   ├── general.md
│   │   ├── css.md
│   │   ├── react.md
│   │   ├── ruuter.md
│   │   ├── sql.md
│   │   ├── sql-restrictions.md
│   │   ├── sync-upstream.sh
│   │   └── Service-Module/
│   │   │   └── rules.md
│   │   │   └── ...
│   │   └── ...
│   └── ...
└── techs/
    ├── css/
    │   └── tailwind/
    │   │   └── rules.md
    │   └── ...
    ├── java/
    │   ├── rules.md
    │   └── spring/
    │   │   └── rules.md
    │   └── ...
    ├── typescript/
    │   ├── nestjs/
    │   │   └── rules.md
    │   ├── react/
    │   │   └── rules.md
    │   ├── rules.md
    │   └── ...
    └── ...

Manifest

rules/manifest.yml defines available keys (for projects, groups, techs, and languages) and relationships between them. Having these defined allows for a modular structure. Keys are used for topic-based prompting, e.g. "Get NestJS rules from MCP".

dependsOn is used to declare dependencies between keys. E.g. if you decalre that react depends on typescript, then when you ask for "Get React rules from MCP" you will also get typescript rules.

The defaults.globalGroup entry is applied on every request unless USE_GLOBAL_RULES environment variable is set to false.

Rule format

Rules are Markdown files with frontmatter. Use appliesTo in frontmatter to declare which keys the rule applies to. Keys are defined in the manifest.

Example:

---
appliesTo:
  projects:
    - buerokratt/Service-Module
  groups:
    - buerokratt
  techs:
    - react
  languages:
    - typescript
description: Description of the rule
---

## Some rule set

... rule set content ...

⚠️ Important note on context size. To ensure the MCP server works correctly, merged projects/techs should not exceed:

  • Safe < 50 KB
  • Warning < 100 KB

This can be checked in CI and with an npm script, see checks below.

Assets

Assets are files that are not rules, but are bundled with them. They are not immediately loaded into context but can be loaded when required. This way you can include larger code examples, helper scripts, JSON examples, etc — without bloating the prompt context.

One example is the sync-upstream.sh script for the Bürokratt — or really any other open-source — projects. See projects/buerokratt/general.md for more details.

Development

Running the project

# 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

You can debug the rules using MCP Inspector too: pnpm inspect.

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 (manifest structure + rule frontmatter + rule markdown syntax)
  • check-context-size: Checks merged projects/techs against 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 <project-key> <tech-key>
pnpm test

MCP Server Features

The MCP server provides:

  • Resources:
    • Rules: rules://{scope}/{key} (e.g., rules://project/buerokratt/Service-Module)
    • Assets: assets://{path} (e.g., assets://projects/buerokratt/sync-upstream.sh).
  • Tools:
    • get_rules - Fetch rules for a scope/key pair
    • get_mcp_instructions - Show server usage guidance
    • list_scope_keys - List keys for a given scope
    • search_rules - Search rules by keyword
    • list_assets - List bundled asset paths
    • get_asset - Fetch asset contents by path
  • Prompts:
    • development_rules - Get development rules as a system prompt for a scope/key pair
快速设置
此服务器的安装指南

安装包 (如果需要)

npx @modelcontextprotocol/server-modular-mcp

Cursor 配置 (mcp.json)

{ "mcpServers": { "igorkrupenja-modular-mcp": { "command": "npx", "args": [ "igorkrupenja-modular-mcp" ] } } }