npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-project-rules

v0.1.0

Published

MCP server for generating project rules and best practices

Downloads

15

Readme

Project Rules MCP Server

An MCP server implementation that generates comprehensive project rules and best practices prompts for AI coding assistants like Cursor.

Features

  • Generate high-quality analysis prompts for project code review
  • Identify project purpose, scope, and boundaries
  • Analyze technology stack and frameworks
  • Document code style and formatting conventions
  • Map architecture and structural patterns
  • Identify components and API design patterns
  • Document build and deployment processes
  • Support both single-file and multi-file output formats
  • Customizable analysis sections

Tool

generate_project_rules

Creates comprehensive prompts that guide AI tools to analyze your project and generate specific rules based on your codebase patterns.

Inputs:

  • outputPath (string, optional): Output directory path (default: .pingancoder/rules)
  • format (string, optional): Output format - "single" or "multiple" (default: "single")
  • includeProjectPurpose (boolean, optional): Include project purpose analysis (default: true)
  • includeTechStack (boolean, optional): Include technology stack analysis (default: true)
  • includeCodeStyle (boolean, optional): Include code style analysis (default: true)
  • includeArchitecture (boolean, optional): Include architecture analysis (default: true)
  • includeComponents (boolean, optional): Include components analysis (default: true)
  • includeBuildSteps (boolean, optional): Include build/deployment analysis (default: true)

Output:

  • Creates detailed analysis prompts in markdown format
  • Prompts include instructions for AI assistants to save results in .pingancoder/rules/ directory
  • No files are created by the MCP tool itself - it only generates the analysis prompts

Usage

The Project Rules tool generates comprehensive analysis prompts that guide AI assistants to:

  • Generate project-specific analysis prompts
  • Help AI assistants understand your codebase patterns
  • Create consistent coding guidelines across your project
  • Maintain architectural consistency
  • Provide detailed instructions for code analysis

Workflow

  1. Generate Analysis Prompts: Use the MCP tool to create comprehensive analysis prompts
  2. Copy Prompts to Cursor: Copy the generated prompts and paste them into Cursor
  3. Run Analysis: Cursor will scan your codebase and create specific rules based on the prompts
  4. Save Rules: Cursor will automatically save the generated rules in the .pingancoder/rules/ directory

How to Use

  1. Generate prompts using the MCP tool
  2. Copy the generated prompts from the tool output
  3. Paste the prompts into Cursor and run the analysis
  4. Cursor will automatically save the analysis results in your project's .pingancoder/rules/ directory

The prompts include specific instructions for where to save the generated rules, so you don't need to manually specify the output location.

Configuration

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "project-rules": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-project-rules"
      ]
    }
  }
}

Usage with VS Code

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code:

{
  "mcp": {
    "servers": {
      "project-rules": {
        "command": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-project-rules"
        ]
      }
    }
  }
}

Local Development

For development, you can run the server locally:

npm run build
node dist/index.js

Output Structure

The tool generates analysis prompts in markdown format that instruct AI assistants to save their analysis results in the .pingancoder/rules/ directory:

Single Format (format: "single")

  • Generates one comprehensive prompt covering all analysis areas
  • AI will save results as .pingancoder/rules/project-rules.md

Multiple Format (format: "multiple")

  • Generates separate specialized prompts for each analysis area
  • AI will save results as separate files:
    • .pingancoder/rules/project-rules.md - Overall project analysis
    • .pingancoder/rules/tech-stack.md - Technology stack analysis
    • .pingancoder/rules/code-style.md - Code style and standards
    • .pingancoder/rules/architecture.md - Architecture and structure
    • .pingancoder/rules/components.md - Components and APIs
    • .pingancoder/rules/build-deploy.md - Build and deployment

Example Usage

Generate Single Comprehensive Prompt

echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_project_rules","arguments":{"format":"single"}}}' | node dist/index.js

Generate Multiple Specialized Prompts

echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_project_rules","arguments":{"format":"multiple"}}}' | node dist/index.js

Generate with Custom Sections

echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_project_rules","arguments":{"includeBuildSteps":false,"includeArchitecture":false}}}' | node dist/index.js

Usage with Cursor

  1. Run one of the above commands to generate analysis prompts
  2. Copy the generated prompt text from the output
  3. Paste the prompt into Cursor
  4. Cursor will analyze your project and save the results in .pingancoder/rules/

Development

Building

npm run build

Testing

npm test

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.