Download the PHP package wizardingcode/laravel-mcp-server without Composer

On this page you can find all versions of the php package wizardingcode/laravel-mcp-server. 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 laravel-mcp-server

Laravel MCP Package

A Laravel package for implementing MCP (Model Context Protocol) servers, compatible with Laravel 12 and PHP 8.4.

Installation

You can install the package via Composer:

Publishing Configuration

You can publish the configuration file using:

This will create a config/mcp.php file in your application where you can modify the MCP server settings.

Basic Usage

After installation, you can use the MCP facade to interact with the MCP service:

Real-World End-to-End Implementations

1. Enterprise Documentation System with Claude AI

This example shows a complete implementation of an MCP server that gives Claude AI access to your company's internal documentation, allowing employees to query company docs right from Claude.

Step 1: Create a new Laravel project (if needed)

Step 2: Install the MCP package

Step 3: Publish the configuration

Step 4: Create a database migration for storing documentation

Edit the migration file:

Run the migration:

Step 5: Create a Document model

Edit the model file:

Step 6: Create a DocumentationService

Create a new file app/Services/DocumentationService.php:

Step 7: Set up MCP resources and tools in a service provider

Create a new file app/Providers/MCPServiceProvider.php:

Step 8: Register the service provider in config/app.php

Add the following to the providers array:

Step 9: Create a seeder to populate the documentation database

Edit the seeder file:

Run the seeder:

Step 10: Configure Claude.ai to use your MCP server

  1. Start your Laravel server:

  2. In a production environment, make sure your server is accessible via the internet with a valid SSL certificate.

  3. In Claude.ai, go to Claude Labs, enable "Use Claude with other apps", and add your MCP server URL:

    • MCP Server URL: https://your-server.com/api/mcp
  4. Now you can ask Claude questions about your company documentation, such as:
    • "What are our company's work hours?"
    • "What is our deployment process?"
    • "Search for information about code reviews"

2. E-commerce Integration with Postgres and WhatsApp

This example demonstrates setting up an MCP server that connects to a PostgreSQL database for e-commerce order information and can send WhatsApp notifications to customers.

Step 1: Create a new Laravel project (if needed)

Step 2: Install the MCP package and other dependencies

Step 3: Set up the database

Configure your .env file with PostgreSQL connection details:

Step 4: Create migrations

Edit the migrations:

create_customers_table.php

create_products_table.php

create_orders_table.php

create_order_items_table.php

Run the migrations:

Step 5: Create models

Edit the models:

Customer.php

Product.php

Order.php

OrderItem.php

Step 6: Create a seeder to populate the database

Edit the seeder file:

Run the seeder:

Step 7: Create services for WhatsApp integration

Create a file app/Services/WhatsAppService.php:

Step 8: Update the config file to include WhatsApp settings

Add the following to config/services.php:

Update your .env file with:

Step 9: Create an E-commerce MCP Service Provider

Create a file app/Providers/EcommerceMCPServiceProvider.php:

Step 10: Register the EcommerceMCPServiceProvider in config/app.php

Add the following to the providers array:

Step 11: Configure and start the server

Now your MCP server is ready to be used by Claude or other AI assistants. Connect it using:

MCP Server URL: http://localhost:8000/api/mcp

You can now ask questions like:


3. Business Intelligence Dashboard Integration with n8n

This example shows how to build an MCP server that can connect to various data sources and trigger n8n workflows for business intelligence tasks.

Step 1: Create a new Laravel project

Step 2: Install the MCP package and required dependencies

Step 3: Create sample data services

Create the file app/Services/SalesDataService.php:

Create the file app/Services/N8NService.php:

Step 4: Update your config file to include n8n settings

Add to config/services.php:

Update your .env file:

Step 5: Create the MCP service provider

Create the file app/Providers/BIMCPServiceProvider.php:

Step 6: Register the BIMCPServiceProvider in config/app.php

Add the following to the providers array:

Step 7: Start the server

Now your business intelligence MCP server is ready for use. Connect it to Claude AI or other AI assistants using:

MCP Server URL: http://localhost:8000/api/mcp

You can now ask questions like:

Testing

Note: Feature tests are currently skipped and will be improved in future releases. Unit tests are fully functional and cover the core MCP service functionality.

License

This package is open-source software licensed under the MIT license.


All versions of laravel-mcp-server with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
laravel/framework Version ^12.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 wizardingcode/laravel-mcp-server contains the following files

Loading the files please wait ....