codeigniter-mcp

codeigniter-mcp

A Model Context Protocol server that accelerates CodeIgniter-inspired PHP framework development by generating, validating, and maintaining idiomatic MVC plus Services/Repository code via 7 tools and 4 resources.

Category
Visit Server

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured