1
- # MCP Bundle
1
+ # MCP Bundle [ WIP ]
2
2
3
3
Symfony integration bundle for [ Model Context Protocol] ( https://modelcontextprotocol.io/ ) using the unofficial
4
4
PHP SDK [ php-llm/mcp-sdk] ( https://github.com/php-llm/mcp-sdk ) library.
5
5
6
+ ** Currently only supports tools as server via Server-Sent Events (SSE) and STDIO.**
7
+
6
8
## Installation
7
9
8
10
``` bash
@@ -14,30 +16,41 @@ composer require php-llm/mcp-bundle
14
16
At first, you need to decide whether your application should act as a MCP server or client. Both can be configured
15
17
in the ` mcp ` section of your ` config/packages/mcp.yaml ` file.
16
18
19
+ ### Act as Server
20
+
21
+ ** Currently only supports tools.**
22
+
23
+ To use your application as an MCP server, exposing tools to clients like [ Claude Desktop] ( https://claude.ai/download ) ,
24
+ you need to configure in the ` client_transports ` section the transports you want to expose to clients.
25
+ You can use either STDIO or SSE.
26
+
17
27
### Act as Client
18
28
19
- To use your application as a MCP client, integrating other MCP servers, you need to configure the ` servers ` you want to
29
+ ** Not implemented yet.**
30
+
31
+ To use your application as an MCP client, integrating other MCP servers, you need to configure the ` servers ` you want to
20
32
connect to. You can use either STDIO or Server-Sent Events (SSE) as transport methods.
21
33
22
34
You can find a list of example Servers in the [ MCP Server List] ( https://modelcontextprotocol.io/examples ) .
23
35
24
36
Tools of those servers are available in your [ LLM Chain Bundle] ( https://github.com/php-llm/llm-chain-bundle )
25
37
configuration and usable in your chains.
26
38
27
- ### Act as Server
28
-
29
- To use your application as an MCP server, exposing tools to clients like [ Claude Desktop] ( https://claude.ai/download ) ,
30
- you need to configure in the ` client_transports ` section the transports you want to expose to clients.
31
- You can use either STDIO or SSE.
32
-
33
39
## Configuration
34
40
35
41
``` yaml
36
42
mcp :
37
43
app : ' app' # Application name to be exposed to clients
38
44
version : ' 1.0.0' # Application version to be exposed to clients
45
+
46
+ # Configure this application to act as an MCP server
47
+ # Currently exposes tools registered in LLM Chain
48
+ client_transports :
49
+ stdio : true # Enable STDIO via command
50
+ sse : true # Enable Server-Sent Event via controller
39
51
40
52
# Configure MCP servers to be used by this application
53
+ # Not implemented yet
41
54
servers :
42
55
name :
43
56
transport : ' stdio' # Transport method to use, either 'stdio' or 'sse'
46
59
arguments : [] # Arguments to pass to the command
47
60
sse :
48
61
url : ' http://localhost:8000/sse' # URL to SSE endpoint of MCP server
49
-
50
- # Configure this application to act as an MCP server
51
- client_transports :
52
- stdio : true # Enable STDIO via command
53
- sse : true # Enable Server-Sent Event via controller
62
+
54
63
```
0 commit comments