Download the PHP package projectsaturnstudios/superconductor-core without Composer
On this page you can find all versions of the php package projectsaturnstudios/superconductor-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download projectsaturnstudios/superconductor-core
More information about projectsaturnstudios/superconductor-core
Files in projectsaturnstudios/superconductor-core
Package superconductor-core
Short Description A Laravel package for implementing the Machine Control Protocol (MCP) v20241105
License MIT
Informations about the package superconductor-core
Superconductor Core
Transform any Laravel 12+ application into a powerful Model Context Protocol (MCP) server with elegant Laravel patterns.
Each GitHub โญ๏ธ helps the community grow. Thanks for the support!
NOTE! AI wrote this documentation, it's mostly solid and factual, but a human generated README will be available soon!
Table of Contents
- ๐ฏ Introduction
- โจ Features
- ๐ Roadmap
- ๐ Getting Started
- Requirements
- Installation
- Configuration
- ๐ Core Concepts
- Schema & Protocol Versions
- Session Management
- Capability Registration
- ๐ ๏ธ Usage
- Getting Started with Defaults
- Creating Tools
- Working with Resources
- Building Prompts
- ๐ Implemented Methods
- ๐ Transport Integration
- ๐งช Testing
- ๐ค Contributing
- ๐ Security
- ๐ License
Introduction
Superconductor Core brings the Model Context Protocol to Laravel with an architecture that feels native to the framework. Create AI-powered tools, expose resources, and build prompts using familiar Laravel patterns with Laravel Data for type safety and automatic schema generation.
Creating MCP capabilities follows familiar Laravel patterns using attributes and class registration:
Register it in your config:
Your Laravel app is now MCP-capable via transport layers!
Features
- Laravel Data Integration - Type-safe schema objects with automatic JSON-RPC serialization
- Multi-Protocol Support - Compatible with MCP versions 2024-11-05 and 2025-03-26
- Transport Agnostic - Core logic works with any transport layer (HTTP, SSE, STDIO)
- Elegant API Design - Familiar Laravel patterns with Facades, Actions, and Service Providers
- Comprehensive Capabilities - Full support for Tools, Resources, and Prompts
- Flexible Session Management - Cache-based and database drivers included
- Zero-Configuration Start - Works out of the box with sensible defaults
- Attribute-Based Registration - Clean, declarative capability definitions
- Laravel Actions Integration - Built with Lorisleiva Laravel Actions for clean architecture
- Spatie Laravel Data - Type-safe data objects with automatic validation
Roadmap
Here's what's coming next to make Superconductor even more powerful:
Enhanced Developer Experience ๐ ๏ธ
- Artisan Commands for Rapid Development (Planned)
make:mcp-tool
- Generate tool classes with ready-to-use stubsmake:mcp-resource
- Create resource classes with proper structuremake:mcp-prompt
- Scaffold prompt implementationsmcp:list-capabilities
- List all registered capabilitiesmcp:validate-config
- Validate MCP configuration
Advanced Capabilities ๐ง
- Dynamic Capability Discovery - Runtime capability registration
- Enhanced Resource Templates - URI template support with dynamic parameters
- Batch Operations - Execute multiple tools in parallel
- Streaming Support - Real-time streaming for long-running operations
- Capability Metadata - Rich annotations and documentation
Additional Transports ๐
- STDIO Transport - For local development and CLI integration (Not Ready Yet)
- StreamableHttp Transport - For Local & Remote HTTP-based communication (Ready!)
Stay tuned! We're constantly working on making Superconductor the most versatile MCP framework for Laravel.
Getting Started
Requirements
- PHP 8.2 or higher
- Laravel 11.x or higher
- Spatie Laravel Data ^4.11
- Lorisleiva Laravel Actions ^2.6
Installation
Install the package via Composer:
Publish the configuration file:
The package will automatically register its service providers and you're ready to go!
Configuration
The package works with zero configuration, but you can customize it by editing config/mcp.php
:
Core Concepts
Schema & Protocol Versions
Superconductor automatically handles multiple MCP protocol versions using Laravel Data objects. Access schema information using the available facades:
Protocol versions are handled through inheritance in the Schema namespace:
Session Management
Sessions maintain state between MCP interactions. The default driver uses Laravel's native cache:
Session drivers available:
cached
(default) - Uses Laravel's cache system with 300-minute expirydatabase
- Stores sessions in database (requires migration)
Capability Registration
The default hardcoded driver registers capabilities from your config file. To add new capabilities:
-
Publish the MCP config:
-
Add your capability classes to the nested config structure:
- Ensure your classes use the required attributes (see Usage section below)
Usage
Getting Started with Defaults
Superconductor works immediately with sensible defaults:
The Laravel cache is used as the default session storage, and the hardcoded driver loads capabilities from your config file.
Creating Tools
Tools are the primary way to expose functionality. Use the #[ToolCall]
attribute and extend the BaseTool
class:
Advanced Tool Example:
Working with Resources
Resources expose readable data using the #[ReadableResource]
attribute:
Dynamic Resource Example:
Building Prompts
Prompts provide reusable templates with argument support:
Complex Prompt Example:
Implemented Methods
Superconductor Core includes implementations for core MCP methods:
Server Information
initialize
- Initialize the MCP connection and establish protocol versionping
- Health check endpoint for connection verification
Tool Operations
tools/list
- List all available tools with their schemas and descriptionstools/call
- Execute a specific tool with provided arguments
Resource Operations
resources/list
- List all available resources with their URIs and metadataresources/read
- Read content from a specific resource URI
Prompt Operations
prompts/list
- List all available prompts with their argument schemasprompts/get
- Retrieve a prompt with specific arguments and generate messages
Helper Functions
The package provides convenient helper functions for capability access:
All methods return properly typed Laravel Data objects that automatically serialize to valid JSON-RPC responses according to the configured MCP protocol version.
Transport Integration
Superconductor Core is designed to be transport-agnostic. The core logic works with any transport layer through a clean interface.
Available Transports
Transport | Package | Status | Description |
---|---|---|---|
Streamable HTTP | superconductor-streamable-http |
โ Available | HTTP POST + optional SSE (SSE incomplete) |
STDIO | superconductor-stdio |
๐ง Coming Soon | Standard input/output |
Installing a Transport
Transport packages integrate automatically with Superconductor Core through the middleware pipeline and method registration system.
Testing
Test your MCP capabilities using standard Laravel testing patterns:
bash composer require projectsaturnstudios/superconductor-core composer require superconductor-mcp/streamable-http
*Your Laravel application is now AI-ready! ๐*
All versions of superconductor-core with dependencies
spatie/laravel-data Version ^4.11
superconductor/rpc Version ^0.3.0
lorisleiva/laravel-actions Version ^2.6
illuminate/support Version ^10.0|^11.0|^12.0
projectsaturnstudios/quickuuid Version ^0.2.0
superconductor/stdio-transport Version ^20241105.5.0
projectsaturnstudios/laravel-design-patterns Version ^0.1.0
superconductor/streamable-http-transport Version ^20241105.5.0