Skip to content

Commit 072f4d6

Browse files
committed
Extend demo readme for MCP example testing
1 parent f097b2d commit 072f4d6

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

demo/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,26 @@ You can test the MCP server by running the following command to start the MCP cl
119119
symfony console mcp:server
120120
```
121121

122-
Then, paste `{"method":"tools/list","jsonrpc":"2.0","id":1}` to list the tools available on the MCP server.
122+
**With plain JSON RPC requests**
123+
124+
Then, you can initialize the MCP session with the following JSON RPC request:
125+
126+
```json
127+
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "demo-client", "version": "dev" } } }
128+
```
129+
130+
And, to request the list of available tools:
131+
132+
```json
133+
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
134+
```
135+
136+
**With MCP Inspector**
137+
138+
For testing, you can also use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
139+
140+
```shell
141+
npx @modelcontextprotocol/inspector php bin/console mcp:server
142+
```
143+
144+
Which opens a web UI to interactively test the MCP server.

0 commit comments

Comments
 (0)