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-prisma-php

v0.3.1

Published

Prisma PHP MCP CLI

Downloads

163

Readme

Prisma PHP MCP

Prisma PHP MCP is a toolkit and server for Model Context Protocol (MCP) projects using Prisma ORM in PHP environments. It provides a suite of tools for code generation, project management, and best practices enforcement, designed for AI-assisted development workflows.

Features

  • Component Management: Add PHPXUI and PPIcon components with catalog support.
  • Project Detection & Description: Detects and describes Prisma PHP projects, validating configuration and paths.
  • Swagger Docs Generation: Automates OpenAPI documentation if enabled.
  • Prisma ORM Integration: Prepares, migrates, and generates ORM code for PHP projects.
  • CRUD Guides: Built-in guides for Create, Read, Update, and Delete operations.
  • NPM Script Automation: Run dev servers and arbitrary scripts with Windows compatibility.
  • Filter & Route Listing: List components, routes, and update filter files.

AI Code Generation Rules

To ensure clean, maintainable, and robust code, AI agents must follow these rules:

1. Project Structure & Naming

  • Use clear, descriptive names for files, functions, and variables.
  • Organize code by feature and responsibility (e.g., tools, resources, utils).
  • Avoid unnecessary nesting and keep directory structure flat where possible.

2. Type Safety & Validation

  • Use Zod schemas for input validation and type inference.
  • Always validate external inputs and configuration files.
  • Prefer explicit types over implicit ones.

3. Error Handling

  • Handle errors gracefully and provide actionable messages.
  • Use try/catch blocks for async operations and file I/O.
  • Return structured error objects for MCP tools.

4. Best Practices

  • Follow PSR standards for PHP code and TypeScript conventions for tooling.
  • Keep functions pure where possible; avoid side effects.
  • Document all exported functions and tools with JSDoc or PHPDoc.
  • Prefer composition over inheritance.

5. Security & Environment

  • Never expose secrets or sensitive data in logs or errors.
  • Use environment variables for configuration, and validate their presence.
  • Sanitize all user inputs and outputs.

6. Automation & Tooling

  • Automate repetitive tasks (e.g., migrations, code generation, documentation).
  • Ensure all tools are registered in tools.json and documented in the README.
  • Prefer CLI commands that work cross-platform (Windows, Linux, Mac).

7. Testing & Validation

  • Write tests for critical logic and validation functions.
  • Use MCP tool output for integration testing.
  • Validate changes with linting and type checks before merging.

8. Documentation

  • Keep this README up to date with all available tools and features.
  • Document new tools and guides as they are added.
  • Provide usage examples for each tool where possible.

Available Tools

See tools.json for a full list. Key tools include:

  • addPHPXUIComponent — Add UI components
  • addPPIconComponent — Add icon components
  • describeConfig — Describe project config
  • detectProject — Detect project presence
  • generateSwaggerDocs — Generate Swagger docs
  • getConfig — Get raw config
  • listComponents — List UI components
  • listRoutes — List all routes
  • prismaGenerate — Generate ORM code
  • prismaPrepare — Prepare database and ORM
  • crudCreateGuide, crudReadGuide, crudUpdateGuide, crudDeleteGuide — CRUD operation guides
  • runNpmScript — Run dev server and scripts
  • updateFilterFiles, updateProject — Update filters and project
  • createRoute — Create a new route in the project
  • phpxuiComponentUsage — Analyze and report usage of PHPXUI components

Setup & Initialization

You can install and initialize MCP Prisma PHP either locally (per project) or globally:

Local (per-project)

npm i -D mcp-prisma-php
npx mcp-prisma-php init

Global

npm i -g mcp-prisma-php
cd your-project
mcp-prisma-php init

After installing, always run the initialization command to set up the required rules, settings, and MCP configuration for VSCode and AI agents. Use --force to overwrite any existing configuration if you need a clean setup:

mcp-prisma-php init --force

These commands will:

  • Copy the required rules, settings, and MCP configuration files into your project and VSCode editor.
  • Ensure the AI agent and code tools follow the Prisma PHP pattern and best practices.
  • Use --force to overwrite any existing configuration if you need a clean setup.

Always run these commands after installing or updating the package to enable full AI and MCP support.

Contributing

  • Follow all AI code generation rules above.
  • Register new tools in tools.json and document them here.
  • Submit PRs with clear descriptions and test coverage.

For more details, see the source code and comments in each tool. AI agents should always follow the rules above to ensure code quality and maintainability.

GitHub Repository

The complete source code for MCP Prisma PHP is hosted on GitHub:

TheSteelNinjaCode/mcp-prisma-php

Visit the repository for installation instructions, code samples, issue tracking, and contribution guidelines.