Skip to content
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
24 changes: 23 additions & 1 deletion demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,26 @@ You can test the MCP server by running the following command to start the MCP cl
symfony console mcp:server
```

Then, paste `{"method":"tools/list","jsonrpc":"2.0","id":1}` to list the tools available on the MCP server.
**With plain JSON RPC requests**

Then, you can initialize the MCP session with the following JSON RPC request:

```json
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "demo-client", "version": "dev" } } }
```

And, to request the list of available tools:

```json
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
```

**With MCP Inspector**

For testing, you can also use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector):

```shell
npx @modelcontextprotocol/inspector php bin/console mcp:server
```

Which opens a web UI to interactively test the MCP server.