Skip to content

boneframework/mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp

Build Status Code Coverage Scrutinizer Code Quality
MCP for Bone Framework

Installation

Install via composer:

composer require boneframework/mcp

Configuration

1. Register the Package

Enable the package in your config/packages.php:

<?php

return [
    'packages' => [
        Bone\BoneDoctrine\BoneDoctrinePackage::class,
        App\AppPackage::class,
        Bone\MCP\MCPPackage::class,
    ],
];

2. Configure MCP Server (Optional)

Create config/mcp.php to customize the MCP server:

<?php

return [
    'mcp' => [
        'server_name' => 'Your Application MCP',
        'server_version' => '1.0.0',
        'instructions' => 'MCP server for managing your application features.',
    ],
];

Usage

The MCP server is now available at /mcp endpoint in your application.

Access the MCP Endpoint

  • GET /mcp - Health check / connection test
  • POST /mcp - Send JSON-RPC requests to the MCP server

Example JSON-RPC Request

POST /mcp
Content-Type: application/json

{
    "jsonrpc": "2.0",
    "method": "initialize",
    "params": {
        "protocolVersion": "2024-11-05",
        "capabilities": {},
        "clientInfo": {
            "name": "MyClient",
            "version": "1.0.0"
        }
    },
    "id": 1
}

MCP Capabilities

The Bone Framework MCP package provides:

  • Tools - Executable functions that AI agents can call
  • Resources - Data sources that can be read
  • Prompts - Pre-defined templates for AI interactions
  • Server-initiated Communication - Elicitations, sampling, logging, progress notifications

Development

Running Tests

vendor/bin/codecept run

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

License

MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages