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
This helps you rapidly develop and debug tools by:
164
163
165
-
- Showing the tool's input schema and validating inputs
166
-
- Executing the tool with your provided input
164
+
- Showing the item's input schema and validating inputs
165
+
- Executing the item with your provided input
167
166
- Displaying formatted results or detailed error information
168
-
- Displaying progress notifications for streaming tool
167
+
- Displaying progress notifications for a streaming tool
169
168
- Supporting complex input types including objects and arrays
170
169
171
-
**For deep diving into tools creation please take a look at dedicated documentation [Here](https://github.com/klapaudius/symfony-mcp-server/blob/master/docs/building_tools.md)**
170
+
**For deep diving into tools creation: please take a look at dedicated documentation [Here](https://github.com/klapaudius/symfony-mcp-server/blob/master/docs/building_tools.md)**
The package provides convenient commands to generate new prompts:
174
+
## Resources
176
175
177
-
```bash
178
-
php bin/console make:mcp-prompt MyCustomPrompt
179
-
```
176
+
The package provides a flexible resource management system that allows you to store and retrieve resources from different providers (file system, database, etc.).
180
177
181
-
This command:
178
+
### Configuration
182
179
183
-
- Handles various input formats (spaces, hyphens, mixed case)
184
-
- Automatically converts the name to the proper kebab-case format
185
-
- Creates a properly structured prompt class in `src/MCP/Prompts`
186
-
- Offers to automatically register the prompt in your configuration
180
+
Configure resources in your `config/packages/klp_mcp_server.yaml` file:
181
+
182
+
```yaml
183
+
klp_mcp_server:
184
+
# ...
185
+
resources:
186
+
- App\MCP\Resources\MyCustomResource
187
+
resources_templates:
188
+
- App\MCP\Resources\MyCustomResourceTemplate
189
+
```
187
190
188
-
You can also manually create and register prompts in `config/packages/klp_mcp_server.yaml`:
191
+
### Usage
192
+
193
+
### Creating Custom Resource
189
194
190
195
```php
191
-
use KLP\KlpMcpServer\Services\PromptService\PromptInterface;
192
-
use KLP\KlpMcpServer\Services\PromptService\Message\TextPromptMessage;
196
+
use KLP\KlpMcpServer\Services\ResourceService\ResourceInterface;
193
197
194
-
class MyCustomPrompt implements PromptInterface
198
+
class MyCustomResource implements ResourceInterface
195
199
{
196
-
// Prompt implementation
200
+
// Resource implementation
197
201
}
198
202
```
203
+
Then register your resource in the configuration:
199
204
200
-
### Testing MCP Prompts
205
+
```yaml
206
+
klp_mcp_server:
207
+
# ...
208
+
resources:
209
+
- App\MCP\Resources\MyCustomResource
210
+
```
201
211
202
-
The package includes a command for testing your MCP prompts without needing a real MCP client:
212
+
### Creating Custom Resource Template
203
213
204
-
```bash
205
-
# Test a specific prompt interactively
206
-
php bin/console mcp:test-prompt MyCustomPrompt
214
+
You can create custom resource templates by implementing the `ResourceTemplateInterface`:
207
215
208
-
# List all available prompts
209
-
php bin/console mcp:test-prompt --list
216
+
```php
217
+
use KLP\KlpMcpServer\Services\ResourceService\ResourceTemplateInterface;
**For deep diving into prompts creation please take a look at dedicated documentation [Here](https://github.com/klapaudius/symfony-mcp-server/blob/master/docs/building_prompts.md)**
234
+
**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)**
224
235
225
236
### Visualizing with Inspector
226
237
@@ -272,7 +283,6 @@ This architecture enables:
272
283
273
284
A Redis adapter can be configured as follows:
274
285
275
-
276
286
```yaml
277
287
klp_mcp_server:
278
288
# ...
@@ -284,67 +294,15 @@ klp_mcp_server:
284
294
ttl: 100 # Message TTL in seconds
285
295
```
286
296
287
-
## Resources
288
-
289
-
The package provides a flexible resource management system that allows you to store and retrieve resources from different providers (file system, database, etc.).
290
-
291
-
### Configuration
292
-
293
-
Configure resources in your `config/packages/klp_mcp_server.yaml` file:
294
-
295
-
```yaml
296
-
klp_mcp_server:
297
-
# ...
298
-
resources:
299
-
- App\MCP\Resources\MyCustomResource
300
-
resources_templates:
301
-
- App\MCP\Resources\MyCustomResourceTemplate
302
-
```
303
-
304
-
### Usage
305
-
306
-
### Creating Custom Resource
307
-
308
-
```php
309
-
use KLP\KlpMcpServer\Services\ResourceService\ResourceInterface;
310
-
311
-
class MyCustomResource implements ResourceInterface
312
-
{
313
-
// Resource implementation
314
-
}
315
-
```
316
-
Then register your resource in the configuration:
317
-
318
-
```yaml
319
-
klp_mcp_server:
320
-
# ...
321
-
resources:
322
-
- App\MCP\Resources\MyCustomResource
323
-
```
324
-
325
-
### Creating Custom Resource Template
297
+
## Roadmap
326
298
327
-
You can create custom resource templates by implementing the `ResourceTemplateInterface`:
299
+
Our development roadmap outlines the planned enhancements and features for upcoming releases:
328
300
329
-
```php
330
-
use KLP\KlpMcpServer\Services\ResourceService\ResourceTemplateInterface;
301
+
- **Enhanced Protocol Support**: Continued improvements to StreamableHTTP implementation and stay up to date with newer specifications
302
+
- **Sampling Feature Implementation**: Taking advantage of Client's Sampling Capability
331
303
332
-
class MyCustomResourceTemplate implements ResourceTemplateInterface
333
-
{
334
-
// Implement the required methods
335
-
}
336
-
```
337
-
338
-
Then register your resource template in the configuration:
339
-
340
-
```yaml
341
-
klp_mcp_server:
342
-
# ...
343
-
resources_templates:
344
-
- App\MCP\Resources\MyCustomResourceTemplate
345
-
```
346
-
347
-
**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)**
304
+
For detailed discussions about upcoming features and to contribute your ideas, please visit the [Discussion section](https://github.com/klapaudius/symfony-mcp-server/discussions).
305
+
Community feedback plays a crucial role in shaping our development priorities.
0 commit comments