Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# MCP Bundle
# MCP Bundle [WIP]

Symfony integration bundle for [Model Context Protocol](https://modelcontextprotocol.io/) using the unofficial
PHP SDK [php-llm/mcp-sdk](https://github.com/php-llm/mcp-sdk) library.

**Currently only supports tools as server via Server-Sent Events (SSE) and STDIO.**

## Installation

```bash
Expand All @@ -14,30 +16,41 @@ composer require php-llm/mcp-bundle
At first, you need to decide whether your application should act as a MCP server or client. Both can be configured
in the `mcp` section of your `config/packages/mcp.yaml` file.

### Act as Server

**Currently only supports tools.**

To use your application as an MCP server, exposing tools to clients like [Claude Desktop](https://claude.ai/download),
you need to configure in the `client_transports` section the transports you want to expose to clients.
You can use either STDIO or SSE.

### Act as Client

To use your application as a MCP client, integrating other MCP servers, you need to configure the `servers` you want to
**Not implemented yet.**

To use your application as an MCP client, integrating other MCP servers, you need to configure the `servers` you want to
connect to. You can use either STDIO or Server-Sent Events (SSE) as transport methods.

You can find a list of example Servers in the [MCP Server List](https://modelcontextprotocol.io/examples).

Tools of those servers are available in your [LLM Chain Bundle](https://github.com/php-llm/llm-chain-bundle)
configuration and usable in your chains.

### Act as Server

To use your application as an MCP server, exposing tools to clients like [Claude Desktop](https://claude.ai/download),
you need to configure in the `client_transports` section the transports you want to expose to clients.
You can use either STDIO or SSE.

## Configuration

```yaml
mcp:
app: 'app' # Application name to be exposed to clients
version: '1.0.0' # Application version to be exposed to clients

# Configure this application to act as an MCP server
# Currently exposes tools registered in LLM Chain
client_transports:
stdio: true # Enable STDIO via command
sse: true # Enable Server-Sent Event via controller

# Configure MCP servers to be used by this application
# Not implemented yet
servers:
name:
transport: 'stdio' # Transport method to use, either 'stdio' or 'sse'
Expand All @@ -46,9 +59,5 @@ mcp:
arguments: [] # Arguments to pass to the command
sse:
url: 'http://localhost:8000/sse' # URL to SSE endpoint of MCP server

# Configure this application to act as an MCP server
client_transports:
stdio: true # Enable STDIO via command
sse: true # Enable Server-Sent Event via controller

```