Download the PHP package josbeir/cakephp-synapse without Composer

On this page you can find all versions of the php package josbeir/cakephp-synapse. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cakephp-synapse

PHPStan Level 8 Build Status codecov License: MIT PHP Version CakePHP Version Packagist Downloads

Synapse: a CakePHP MCP-Server plugin

Expose your CakePHP application functionality via the Model Context Protocol (MCP).

Table of Contents

Overview

Synapse is a CakePHP plugin that implements the Model Context Protocol (MCP), allowing AI assistants and other MCP clients to interact with your CakePHP application through a standardized interface.

[!WARNING] This plugin uses the MCP PHP SDK which is currently in active development. Features and APIs may change as the SDK evolves.

The Model Context Protocol is an open protocol that enables seamless integration between AI assistants (like Claude) and your application's data and functionality. With Synapse, you can expose:

Features

Installation

Requirements

Installing the Plugin

Install via Composer as a development dependency:

[!NOTE] This plugin is typically used as a development tool to allow AI assistants to interact with your application during development. It should not be installed in production environments.

The plugin will automatically register itself and discover MCP elements in your application.

[!TIP] After updating the plugin, it's recommended to re-index the documentation to ensure all features work correctly:

Quick Start

  1. Install the plugin (see above)

  2. Configure your MCP-enabled client:

To connect Claude Code/Desktop or other MCP clients (VSCode/Zed/...):

  1. Configure the client to use stdio transport
  2. Point it to your CakePHP bin directory: bin/cake synapse server
  3. The client will communicate with your app via the MCP protocol

Most clients require a command wich will be your cake executable bin/cake followed by arguments: synapse server

Or run when using DDEV instance

Configuration

Various configuration options are available for Synapse. Refer to config/synapse.php in this plugin for details on available settings and customization.

Built-in Tools

Synapse includes several built-in tools and resources for common operations:

Category Name Description
System system_info Get CakePHP version, PHP version, debug mode, etc.
System config_read Read configuration values
System debug_status Check if debug mode is enabled
System list_env_vars List all available environment variables
Code Execution tinker Execute arbitrary PHP code with full application context
Database database_connections List all configured database connections
Database database_schema Get detailed schema information for tables (view all tables, inspect columns, constraints, indexes, understand foreign key relationships)
Routes list_routes List all routes with filtering and sorting
Routes get_route Get detailed information about a specific route
Routes match_url Find which route matches a given URL
Routes detect_route_collisions Find potential route conflicts
Documentation search_docs Search documentation with relevance ranking, fuzzy matching, and filtering
Documentation get_doc Retrieve full document content by document ID (format: source::path)
Documentation docs_stats View index statistics and available sources
Documentation docs://search/{query} Search CakePHP documentation and return formatted results
Documentation docs://content/{documentId} Retrieve full document content by document ID (format: source::path)
Commands list_commands List all available CakePHP console commands with optional filtering and sorting
Commands get_command_info Get detailed information about a specific console command (options, arguments, help)
Commands run_command Run a registered CakePHP console command in a subprocess with configurable timeout
Logs log_list List all log files in the application logs directory with size and modification time
Logs log_read Read the last N lines from a log file, optionally filtered by log level (error, warning, info, debug, …)
Cache cache_configs List all configured CakePHP cache configurations with engine information
Cache cache_read Read a value from a cache configuration by key
Cache cache_write Write a string value to a cache configuration
Cache cache_delete Delete a key from a cache configuration
Cache cache_clear Clear all entries from a cache configuration
ORM orm_describe Describe a CakePHP ORM Table: associations, behaviors, display field, primary key, entity class
ORM orm_find Run a find query (all, first, or count) on an ORM Table with a configurable row limit

[!WARNING] The tinker tool executes arbitrary code in your application. Use responsibly and avoid modifying data without explicit approval.

[!TIP] The tinker tool can be used to query the database using CakePHP's ORM. The tinker context provides access to $this->fetchTable() for easy database operations.

[!NOTE] Documentation is indexed from the official CakePHP markdown documentation. The index is built locally using SQLite FTS5 for fast, dependency-free full-text search.

Built-in Prompts

Synapse includes pre-defined prompt workflows that guide LLMs through common CakePHP development tasks. Prompts combine multiple tools (search docs, read documentation, tinker) into structured, best-practice workflows.

Available Prompts

Prompt Description Arguments
documentation-expert Get comprehensive guidance on CakePHP features with examples topic (required), depth (optional: basic/intermediate/advanced)
debug-helper Systematic debugging workflow for errors and issues error (required), context (optional: controller/model/database/view)
feature-builder Guide for implementing complete features following conventions feature (required), component (optional: controller/model/behavior/helper/middleware/command/full-stack)
database-explorer Explore database schema, relationships, and data table (required), show (optional: schema/data/relationships/all)
code-reviewer Review code against CakePHP conventions and best practices code (required), focus (optional: conventions/security/performance/testing/all)
migration-guide Help migrate code between CakePHP versions fromVersion, toVersion (required), area (optional: specific feature or general)
testing-assistant Generate test cases and testing guidance subject (required), testType (optional: unit/integration/fixture/all)
performance-analyzer Analyze and optimize performance issues concern (required), context (optional: code snippet or description)
orm-query-helper Build complex ORM queries with guidance queryGoal (required), tables (optional: comma-separated list)
tinker-workshop Interactive PHP exploration and testing guide goal (required: explore/test/debug), subject (optional)
quality-assurance Coding guidelines and QA best practices for CakePHP context (optional: guidelines/integration/troubleshooting/all), tools (optional: all or comma-separated list)

Prompts automatically:

Benefits:

Configuring Prompts

Prompts can reference a specific CakePHP version and use various quality tools. Configure both in config/synapse.php:

Creating Custom Tools, Resources, and Prompts

You can extend Synapse with your own tools, resources, and prompts using PHP attributes. Synapse automatically discovers classes in your src/ directory using MCP attributes.

Tools expose functions that AI assistants can call. Create them with #[McpTool]:

Resources expose data sources. Create them with #[McpResourceTemplate].

Prompts guide LLMs through workflows. Create them with #[McpPrompt].

For detailed documentation on all MCP capabilities, attributes, and implementation patterns, see the MCP PHP SDK documentation.

CLI usage

Use the CLI to manage and search the index:

Running the Server

[!NOTE] In most cases, you do not need to run the MCP server manually. The server is typically started automatically by your IDE or MCP-enabled client (such as Claude Desktop, VSCode, Zed, etc.) when you configure it to use your CakePHP app. The client will launch the server using the appropriate command (e.g., bin/cake synapse server) and handle the connection for you.

If you want to run the MCP server manually for testing or debugging purposes, you can use the following CLI commands:

Command Options

Option Short Description
--transport -t Transport type (currently only stdio is supported)
--no-cache -n Disable discovery caching for this run
--clear-cache -c Clear discovery cache before starting
--inspect -i Launch MCP Inspector to test the server interactively (requires Node.js/npx)
--verbose -v Enable verbose output (pipes logging to stderr)
--quiet -q Suppress all output except errors

Testing with MCP Inspector

The --inspect flag launches the MCP Inspector, a development tool that provides a web-based UI for testing your MCP server:

This will:

  1. Start the MCP Inspector (downloads automatically via npx if not installed)
  2. Launch the server in inspector mode
  3. Open a web browser with an interactive UI
  4. Allow you to test tools, resources, and prompts interactively

Requirements:

The inspector is invaluable during development for:

Transport Options

Currently, Synapse supports:

Future versions may include HTTP/SSE transport.

Discovery Caching

Discovery caching improves server startup performance by caching the discovered MCP elements (tools, resources, prompts).

Configuration

Synapse uses CakePHP's built-in PSR-16 cache system. Configure caching in config/synapse.php

Command Options

Testing

Run the test suite:

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Code Standards: Follow CakePHP coding standards
  2. Tests: Add tests for new features
  3. PHPStan: Ensure level 8 compliance
  4. Documentation: Update README for new features

Development Setup

License

This plugin is open-sourced software licensed under the MIT license.

Credits

[!NOTE] The MCP PHP SDK is in active development and APIs may change.


All versions of cakephp-synapse with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-sqlite3 Version *
cakephp/cakephp Version ^5.2
mcp/sdk Version ^0.5
symfony/filesystem Version ^7.0 || ^8.0
symfony/finder Version ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package josbeir/cakephp-synapse contains the following files

Loading the files please wait ...