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

codeigniter-mcp

v0.5.0

Published

MCP (Model Context Protocol) server that accelerates development of a custom PHP framework inspired by CodeIgniter: MVC + optional Services/Repository layer. Scaffolds controllers, services, repositories, entities, migrations and tests; validates routes a

Readme

codeigniter-mcp

npm npm downloads License: MIT CI Node Tests SemVer

MCP (Model Context Protocol) server that accelerates development of a PHP framework inspired by CodeIgniter: MVC + optional Services/Repository layer (lightweight Ports/Adapters), with native CodeIgniter 4 support (auto- detected from the project structure). Extreme development speed without sacrificing security.

Version: 0.5.0 — Semantic versioning: any input/output schema change breaks compatibility and must be versioned explicitly.

Highlights

  • 7 tools + 4 resources + 3 token-saving prompts for an LLM (Claude Code, Cursor, VS Code, Trae) to scaffold, validate and maintain idiomatic framework code without hallucinating structure.
  • CodeIgniter 4 native — BaseController + Model (Query Builder) + forge migrations + views; auto-detected, zero config needed.
  • Hard security by default: Zod input validation, path-traversal protection, explicit confirm/overwrite for destructive ops, rate limiting, prepared statements, no credential leaks.

Quickstart

npx -y codeigniter-mcp          # run directly over stdio (published package)
npm install -g codeigniter-mcp  # or install globally

From source (contributors): npm install && npm run build && npm test.

Configuration

The server reads environment variables (see mcp.json):

| Variable | Default | Description | |---|---|---| | APP_ROOT | — | Required. Absolute path to the target PHP framework root. All tools operate only inside this directory. | | RATE_LIMIT_PER_MINUTE | 20 | Write operations allowed per minute per session. | | MCP_TRANSPORT | stdio | stdio (local) or http (remote Streamable HTTP). | | MCP_PORT | 3000 | HTTP transport port. |

mcp.json (Claude Code / Cursor / Trae):

{
  "mcpServers": {
    "codeigniter-mcp": {
      "command": "npx",
      "args": ["-y", "codeigniter-mcp"],
      "env": {
        "APP_ROOT": "/path/to/mi-framework",
        "RATE_LIMIT_PER_MINUTE": "20"
      }
    }
  }
}

Project profiles (.codeigniter-mcp.json — optional): an explicit file always wins; without it the profile is auto-detected from the project structure (app/Config/Paths.php or spark → ci4; bin/migrate or app/Repositories → spec; unknown → spec). See docs/profiles.md.

Tools

| Tool | What it does | |---|---| | scaffold_full_resource | Full CRUD: Controller + Service + Repository (interface+impl) + Entity + Migration + tests (8 files, ~15 ms) | | scaffold_controller | Controller only; zero SQL allowed (build-time check) | | scaffold_service | Service: business logic + validation, contract-first DI (ci4: Service that injects the Model) | | scaffold_repository | Repository interface + PDO implementation, always together (ci4: no-op, Models handle data) | | validate_route | Read-only route collision detection against app/Config/Routes.php | | run_migration | Runs the native migration runner (spec: bin/migrate; ci4: spark migrate). Requires explicit confirm; failures are interpreted (no raw stack traces) | | lint_against_framework_rules | Lints PHP files against the profile conventions |

Prompts

Token-saving templates: compact input → exact tool arguments.

| Prompt | What it does | |---|---| | create_full_resource | resource + compact fields → exact scaffold_full_resource arguments | | run_migration | direction + confirm → exact run_migration arguments | | lint_file | filePath → exact lint_against_framework_rules arguments |

Resources

| URI | Content | |---|---| | convention://naming | PascalCase / camelCase / kebab-case, mandatory suffixes | | convention://architecture | MVC + Service + Repository (lightweight Ports/Adapters) | | convention://folder-structure | Framework folder tree | | convention://security-rules | Hard security rules of the tools |

Docs

Roadmap

  • ci3 profile — CodeIgniter 3 (legacy) support behind the same .codeigniter-mcp.json / auto-detection mechanism (CI3 is still active on a large legacy base but is EOL: no security patches).
  • Recipe prompts — high-level feature templates (auth, file uploads, REST CRUD) that chain the existing tools.

Contributing

Contributions are welcome! Read CONTRIBUTING.md to set up the development environment, run the tests and open a pull request. Security issues should be reported privately — see SECURITY.md. Release history is tracked in CHANGELOG.md.

License

MIT © 2026 X-Gunner