You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ Features
27
27
-[x] Revive transports
28
28
-[x] Streamable Transport https://github.com/modelcontextprotocol/php-sdk/issues/7
29
29
-[ ]~~Http/SSE-based Transport https://github.com/modelcontextprotocol/php-sdk/issues/8~~
30
+
-[x] MCP Logging with auto-injection https://github.com/modelcontextprotocol/php-sdk/issues/70
30
31
-[ ] Support pagination
31
32
-[ ] Support Schema validation
32
33
-[ ] Support multiple versions of the MCP specification https://github.com/modelcontextprotocol/php-sdk/issues/14
@@ -113,6 +114,33 @@ Your AI assistant can now call:
113
114
114
115
## Documentation
115
116
117
+
### MCP Logging
118
+
119
+
The SDK provides comprehensive logging capabilities following the [MCP logging specification](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging):
120
+
121
+
-**Auto-injection**: `McpLogger` automatically injected into capability handlers
122
+
-**Client-controlled filtering**: Clients can set log levels to control verbosity
123
+
-**Centralized logging**: All server logs flow to client for unified debugging
124
+
-**Fallback support**: Compatible with existing PSR-3 loggers
125
+
126
+
**Quick example:**
127
+
```php
128
+
#[McpTool(name: 'my_tool')]
129
+
public function myTool(string $input, McpLogger $logger): array {
0 commit comments