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
+64-2Lines changed: 64 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ klp_mcp_server:
98
98
99
99
The project includes a Docker setup that can be used for development. The Docker setup includes Nginx, PHP-FPM with Redis extension, and Redis server.
100
100
101
-
For detailed instructions on how to set up and use the Docker containers, please refer to the [Development Guidelines](docs/guidelines.md#docker-setup).
101
+
For detailed instructions on how to set up and use the Docker containers, please refer to the [Development Guidelines](docs/development_guidelines.md#docker-setup).
102
102
103
103
## Strongly Recommended
104
104
Enhance your application's security by implementing OAuth2 Authentication. You can use the [klapaudius/oauth-server-bundle](https://github.com/klapaudius/FOSOAuthServerBundle) or any other compatible OAuth2 solution.
@@ -211,11 +211,73 @@ klp_mcp_server:
211
211
ttl: 100 # Message TTL in seconds
212
212
```
213
213
214
+
## Resources
215
+
216
+
The package provides a flexible resource management system that allows you to store and retrieve resources from different providers (file system, database, etc.).
217
+
218
+
### Configuration
219
+
220
+
Configure resources in your `config/packages/klp_mcp_server.yaml` file:
221
+
222
+
```yaml
223
+
klp_mcp_server:
224
+
# ...
225
+
resources:
226
+
- App\MCP\Resources\MyCustomResource
227
+
resources_templates:
228
+
- App\MCP\Resources\MyCustomResourceTemplate
229
+
```
230
+
231
+
### Usage
232
+
233
+
### Creating Custom Resource
234
+
235
+
```php
236
+
use KLP\KlpMcpServer\Services\ResourceService\ResourceInterface;
237
+
238
+
class MyCustomResource implements ResourceInterface
239
+
{
240
+
// Resource implementation
241
+
}
242
+
```
243
+
Then register your resource in the configuration:
244
+
245
+
```yaml
246
+
klp_mcp_server:
247
+
# ...
248
+
resources:
249
+
- App\MCP\Resources\MyCustomResource
250
+
```
251
+
252
+
### Creating Custom Resource Template
253
+
254
+
You can create custom resource templates by implementing the `ResourceTemplateInterface`:
255
+
256
+
```php
257
+
use KLP\KlpMcpServer\Services\ResourceService\ResourceTemplateInterface;
258
+
259
+
class MyCustomResourceTemplate implements ResourceTemplateInterface
260
+
{
261
+
// Implement the required methods
262
+
}
263
+
```
264
+
265
+
Then register your resource template in the configuration:
266
+
267
+
```yaml
268
+
klp_mcp_server:
269
+
# ...
270
+
resources_templates:
271
+
- App\MCP\Resources\MyCustomResourceTemplate
272
+
```
273
+
274
+
**For deep diving into resources' management, please take a look at dedicated documentation [Here](https://github.com/klapaudius/symfony-mcp-server/blob/master/docs/building_resources.md)**
275
+
214
276
## Roadmap
215
277
We are committed to actively pursuing the following key initiatives to enhance the package's functionality and ensure compliance with evolving standards.
216
278
217
279
- **Core Features:**
218
-
- Resources implementation compliant with MCP specification.
280
+
- ✅ Resources implementation compliant with MCP specification.
219
281
- Prompts implementation compliant with MCP specification.
220
282
- Support for Streamable HTTP (as specified in MCP 2025-03-26 version).
0 commit comments