-
Notifications
You must be signed in to change notification settings - Fork 81
IBX-11536: MCP Servers #3106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adriendupuis
wants to merge
96
commits into
5.0
Choose a base branch
from
mcp
base: 5.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
IBX-11536: MCP Servers #3106
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
148d07c
MCP Servers doc draft
adriendupuis 7307f02
Fix MkDocs variable VS `cards`
adriendupuis c2215e5
composer.json: Add ibexa/mcp
adriendupuis d1b50e2
mcp_config.md: Fix spelling authentification → authentication
adriendupuis 3b4d89f
mcp_config.md: Continue example intro
adriendupuis a40d3dc
mcp.md: Short intro to the cards
adriendupuis 9ba2f81
Replace backticks with '$()' syntax for command substitution.
adriendupuis 618984f
Group AI features
adriendupuis 81def20
Apply suggestion from @adriendupuis
adriendupuis acd9291
ai_actions_guide.md: Fix link to REST API Ref
adriendupuis c3dca5f
mcp.md: Update links after move to ai/
adriendupuis fff74f7
Merge branch '5.0' into mcp
adriendupuis c0e0b7e
extend_ai_actions.md: Fix link to REST API Ref
adriendupuis ad3cc47
PHP API Ref
adriendupuis 0836df3
Move to tools in server config
adriendupuis 736edd1
Move to tools in server config
adriendupuis 6107946
PHP & JS CS Fixes
adriendupuis a6953e1
Add MCP Inspector test
adriendupuis a73386b
Add MCP Inspector test
adriendupuis ec27fdf
Merge branch '5.0' into mcp
adriendupuis b588db3
Apply suggestion from @adriendupuis
adriendupuis 266ea8b
Apply suggestions from code review
adriendupuis 910c49c
Continue MCP servers doc
adriendupuis d101b58
ExampleTools.php: move servers to top
adriendupuis 71e80cb
MCP: Continue with prompts
adriendupuis c9e1c82
Merge branch '5.0' into mcp
adriendupuis 181fb77
PHP & JS CS Fixes
adriendupuis d8cc209
Fix missingType.iterableValue
adriendupuis a5ba48b
mcp_guide.md: Fix anchor
adriendupuis f4d55f8
Rework JWT doc for REST and MCP
adriendupuis 12a15be
Rework JWT doc for REST and MCP
adriendupuis e568133
Added code for testing YAML samples
mnocon 546acd6
Rework JWT doc for REST and MCP
adriendupuis 05f0f5c
Rework JWT doc for REST and MCP
adriendupuis 686c428
Generated baseline
mnocon b201298
Rework JWT doc for MCP
adriendupuis 90c44f2
Rework JWT doc for MCP
adriendupuis 39b4645
Rework JWT doc for MCP
adriendupuis 71f5890
Fixes - first batch
mnocon b144d93
Fixes - batch 2
mnocon ad17a4b
fixup! Added code for testing YAML samples
mnocon 648fa58
Selfreview
mnocon 5806a08
Copilot CLI example
adriendupuis a116dea
MCP servers: change menu entry
adriendupuis 781e516
Rename example PHP class
adriendupuis 8284cc9
Update example to illustrate outputSchema
adriendupuis 6399410
Merge branch '5.0' into mcp
adriendupuis 6e90953
PHP & JS CS Fixes
adriendupuis d5615d9
security_checklist.md + JWT
adriendupuis 2fd9ba5
ai.md: apply some vale suggestions, rewording
adriendupuis 29bf219
mcp_config.md: apply some vale suggestions, rewording
adriendupuis bdee1e1
MCP server practice
adriendupuis 208b65e
MCP server user account
adriendupuis 1c58dcc
More about tool inputSchema
adriendupuis 24b2b81
More about icons and _meta
adriendupuis a214f9f
PHP & JS CS Fixes
adriendupuis 1e881eb
Merge branch '5.0' into mcp
adriendupuis f3185a3
Merge remote-tracking branch 'origin/test-yamls' into mcp
adriendupuis 5ea4811
About storage
adriendupuis f986db5
About repo
adriendupuis 3f4a393
start moving config samples from Markdown to a YAML file
adriendupuis a52c164
finish moving config samples from Markdown to a YAML file
adriendupuis 3fa7efb
Revert "Merge remote-tracking branch 'origin/test-yamls' into mcp"
adriendupuis 282a02c
More verbose curl script
adriendupuis 178ca6a
mcp_config: remove repetition
adriendupuis adb2947
Merge branch '5.0' into mcp
adriendupuis 56c2261
include_file → include_code
adriendupuis a28ab1e
meta desc
adriendupuis 80a7de9
REST doc example to get a JWT token
adriendupuis 7b3fca4
cURL → curl
adriendupuis 5f6b1e9
Merge branch '5.0' into mcp
adriendupuis df84f07
mcp_config: split MCP Inspector test into sub-sections
adriendupuis 83abc90
mcp_config: Emphasis on cache clearing
adriendupuis ebe4a8b
development_security.md: About JWT keys
adriendupuis c610438
development_security.md: About JWT_PASSPHRASE
adriendupuis 84d8251
Apply suggestions from code review
adriendupuis 62b4929
api.md: Add MCP, split Web|PHP
adriendupuis cacad72
MCP = LTS Update
adriendupuis c7937ee
Rework server options descriptions, add links
adriendupuis 7eef300
Enlarge your tool
adriendupuis cf82940
Enh. McpTool args descriptions
adriendupuis c16c815
Let's be clear about which args must be strings
adriendupuis e17866f
Move REST live doc & GraphiQL usage examples
adriendupuis f9bbccd
Add links in Tools configuration
adriendupuis e5c50f8
mcp_config.md: Rework Authentication section intro
adriendupuis 4d366d5
Cut mcp_config.md in half
adriendupuis 23b6f80
Fix anchors after cut
adriendupuis cd737f6
ai.md: Rework with more links
adriendupuis 70a7fad
Merge branch '5.0' into mcp
adriendupuis 0d5be8f
Dunno what to do 'bout `/mcp add`
adriendupuis 2ab0696
Apply suggestions from code review
adriendupuis 7d2cdbe
recommend psr16
adriendupuis 24a69e5
Merge branch '5.0' into mcp
adriendupuis f6d12d8
mcp_guide.md: Reword
adriendupuis 50f362f
vocabulary
adriendupuis 943f85b
More about cache pools
adriendupuis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ibexa: | ||
| repositories: | ||
| default: | ||
| mcp: | ||
| example: | ||
| path: /mcp/example | ||
| enabled: true | ||
| description: 'Example MCP Server' | ||
| instructions: 'Use this server to greet someone.' | ||
| discovery_cache: cache.tagaware.filesystem | ||
| session: | ||
| type: psr16 | ||
| directory: cache.tagaware.filesystem | ||
| system: | ||
| default: | ||
| mcp: | ||
| servers: | ||
| - example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "mcpServers": { | ||
| "ibexa-example": { | ||
| "type": "http", | ||
| "url": "http://localhost/mcp/example", | ||
| "headers": { | ||
| "Authorization": "Bearer <JWT token>" | ||
| }, | ||
| "tools": ["*"] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| baseUrl='http://localhost' # Adapt to your test case | ||
|
|
||
| jwtToken=$(curl -s -X 'POST' \ | ||
| "$baseUrl/api/ibexa/v2/user/token/jwt" \ | ||
| -H 'Content-Type: application/vnd.ibexa.api.JWTInput+json' \ | ||
| -H 'Accept: application/vnd.ibexa.api.JWT+json' \ | ||
| -d '{ | ||
| "JWTInput": { | ||
| "_media-type": "application/vnd.ibexa.api.JWTInput+json", | ||
| "username": "ibexa-example", | ||
| "password": "Ibexa-3xample" | ||
| } | ||
| }' | jq -r .JWT.token) | ||
|
|
||
| exec npx -y supergateway \ | ||
| --streamableHttp "$baseUrl/mcp/example" \ | ||
| --oauth2Bearer "$jwtToken" \ | ||
| --logLevel none | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| ibexa: | ||
| repositories: | ||
| <repository_identifier>: | ||
| mcp: | ||
| <server_identifier>: | ||
| path: <server_route_path> | ||
| enabled: true | ||
| # Server options… | ||
| tools: | ||
| - Ibexa\Mcp\Tool\TranslationTools | ||
| - Ibexa\Mcp\Tool\SeoTools | ||
| discovery_cache: <cache_pool_service> | ||
| session: | ||
| type: <psr16|file|memory> | ||
|
adriendupuis marked this conversation as resolved.
|
||
| # Session options… | ||
| mcp_psr16: | ||
| discovery_cache: cache.redis.mcp | ||
| session: | ||
| type: psr16 | ||
| service: cache.redis.mcp | ||
| prefix: 'mcp_<server_identifier>_' | ||
| mcp_file: | ||
| session: | ||
| type: file | ||
| directory: '%kernel.cache_dir%/mcp/sessions' | ||
| mcp_memory: | ||
| session: | ||
| type: memory | ||
| system: | ||
| <siteaccess_scope>: | ||
| mcp: | ||
| servers: | ||
| - <server_identifier> | ||
| services: | ||
| cache.redis.mcp: | ||
| public: true | ||
| class: Symfony\Component\Cache\Adapter\RedisTagAwareAdapter | ||
| parent: cache.adapter.redis | ||
| tags: | ||
| - name: cache.pool | ||
| clearer: cache.app_clearer | ||
| provider: 'redis://mcp.redis:6379' | ||
| namespace: 'mcp' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| set +x | ||
|
|
||
| baseUrl='http://localhost' # Adapt to your test case | ||
| username='ibexa-example' | ||
| password='Ibexa-3xample' | ||
|
|
||
| curl -s -X 'POST' \ | ||
| "$baseUrl/api/ibexa/v2/user/token/jwt" \ | ||
| -H 'Content-Type: application/vnd.ibexa.api.JWTInput+json' \ | ||
| -H 'Accept: application/vnd.ibexa.api.JWT+json' \ | ||
| -d "{ | ||
| \"JWTInput\": { | ||
| \"_media-type\": \"application/vnd.ibexa.api.JWTInput+json\", | ||
| \"username\": \"$username\", | ||
| \"password\": \"$password\" | ||
| } | ||
| }" > response.tmp.txt | ||
|
|
||
| cat response.tmp.txt | jq | ||
| jwtToken=$(cat response.tmp.txt | jq -r .JWT.token) | ||
| rm response.tmp.txt | ||
|
|
||
| curl -s -i -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 1, | ||
| "method": "initialize", | ||
| "params": { | ||
| "protocolVersion": "2025-03-26", | ||
| "capabilities": {}, | ||
| "clientInfo": { | ||
| "name": "test-curl-client", | ||
| "version": "1.0.0" | ||
| } | ||
| } | ||
| }' > response.tmp.txt | ||
|
|
||
| sed '$d' response.tmp.txt | ||
| tail -n 1 response.tmp.txt | jq | ||
| mcpSessionId=$(cat response.tmp.txt | grep 'Mcp-Session-Id:' | sed 's/Mcp-Session-Id: \([0-9a-f-]*\).*/\1/') | ||
| rm response.tmp.txt | ||
|
|
||
| curl -s -i -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -H "Mcp-Session-Id: $mcpSessionId" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "method": "notifications/initialized" | ||
| }' | ||
|
|
||
| curl -s -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -H "Mcp-Session-Id: $mcpSessionId" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 2, | ||
| "method": "tools/list" | ||
| }' | jq | ||
|
|
||
| curl -s -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -H "Mcp-Session-Id: $mcpSessionId" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 3, | ||
| "method": "tools/call", | ||
| "params": { | ||
| "name": "greet", | ||
| "arguments": { | ||
| "name": "World" | ||
| } | ||
| } | ||
| }' | jq | ||
|
|
||
| curl -s -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -H "Mcp-Session-Id: $mcpSessionId" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 4, | ||
| "method": "prompts/list" | ||
| }' | jq | ||
|
|
||
| curl -s -X 'POST' "$baseUrl/mcp/example" \ | ||
| -H "Authorization: Bearer $jwtToken" \ | ||
| -H "Mcp-Session-Id: $mcpSessionId" \ | ||
| -d '{ | ||
| "jsonrpc": "2.0", | ||
| "id": 5, | ||
| "method": "prompts/get", | ||
| "params": { | ||
| "name": "greet", | ||
| "arguments": { | ||
| "name": "Firstname Lastname" | ||
| } | ||
| } | ||
| }' | jq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| { | ||
| "JWT": { | ||
| "_media-type": "application/vnd.ibexa.api.JWT+json", | ||
| "_token": "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ.abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz1234567890ABCD.EFGHIJKL-MNOPQRSTUVWXYZ12345678901234567890", | ||
| "token": "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ.abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz1234567890ABCD.EFGHIJKL-MNOPQRSTUVWXYZ12345678901234567890" | ||
| } | ||
| } | ||
| HTTP/1.1 200 OK | ||
| Access-Control-Allow-Headers: Content-Type, Mcp-Session-Id, Mcp-Protocol-Version, Last-Event-ID, Authorization, Accept | ||
| Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS | ||
| Access-Control-Allow-Origin: * | ||
| Access-Control-Expose-Headers: Mcp-Session-Id | ||
| Cache-Control: no-cache, private | ||
| Content-Type: application/json | ||
| Date: Tue, 28 Apr 2026 09:53:27 GMT | ||
| Mcp-Session-Id: 12345678-9abc-def0-1234-56789abcdef0 | ||
| Server: Apache/2.4.66 (Debian) | ||
| Vary: cookie,authorization | ||
| X-Cache-Debug: 1 | ||
| X-Debug-Token: 123456 | ||
| X-Debug-Token-Link: http://localhost/_profiler/123456 | ||
| X-Powered-By: Ibexa Commerce v5 | ||
| X-Robots-Tag: noindex | ||
| Transfer-Encoding: chunked | ||
|
|
||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 1, | ||
| "result": { | ||
| "protocolVersion": "2025-06-18", | ||
| "capabilities": { | ||
| "logging": {}, | ||
| "completions": {}, | ||
| "prompts": { | ||
| "listChanged": true | ||
| }, | ||
| "resources": { | ||
| "listChanged": true | ||
| }, | ||
| "tools": { | ||
| "listChanged": true | ||
| } | ||
| }, | ||
| "serverInfo": { | ||
| "name": "example", | ||
| "version": "1.0.0", | ||
| "description": "Example MCP Server" | ||
| }, | ||
| "instructions": "Use this server to greet someone." | ||
| } | ||
| } | ||
| HTTP/1.1 202 Accepted | ||
| Access-Control-Allow-Headers: Content-Type, Mcp-Session-Id, Mcp-Protocol-Version, Last-Event-ID, Authorization, Accept | ||
| Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS | ||
| Access-Control-Allow-Origin: * | ||
| Access-Control-Expose-Headers: Mcp-Session-Id | ||
| Cache-Control: no-cache, private | ||
| Content-Length: 0 | ||
| Content-Type: text/html; charset=UTF-8 | ||
| Date: Fri, 24 Apr 2026 11:16:27 GMT | ||
| Server: Apache/2.4.66 (Debian) | ||
| Vary: cookie,authorization | ||
| X-Cache-Debug: 1 | ||
| X-Debug-Token: 7890ab | ||
| X-Debug-Token-Link: http://localhost/_profiler/7890ab | ||
| X-Powered-By: Ibexa Commerce v5 | ||
| X-Robots-Tag: noindex | ||
|
|
||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 2, | ||
| "result": { | ||
| "tools": [ | ||
| { | ||
| "name": "greet", | ||
| "inputSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "The name of the person to greet" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name" | ||
| ] | ||
| }, | ||
| "description": "Greet a user by name", | ||
| "annotations": { | ||
| "readOnlyHint": true, | ||
| "destructiveHint": false, | ||
| "idempotentHint": true, | ||
| "openWorldHint": false | ||
| }, | ||
| "icons": [ | ||
| { | ||
| "src": "https://openmoji.org/data/color/svg/1F44B.svg" | ||
| } | ||
| ], | ||
| "outputSchema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "general": { | ||
| "type": "string", | ||
| "description": "the safe way to greet someone" | ||
| }, | ||
| "close": { | ||
| "type": "string", | ||
| "description": "when you're close to the person, like friends or relatives" | ||
| }, | ||
| "morning": { | ||
| "type": "string", | ||
| "description": "when it's in the morning" | ||
| }, | ||
| "afternoon": { | ||
| "type": "string", | ||
| "description": "when it's the afternoon" | ||
| }, | ||
| "evening": { | ||
| "type": "string", | ||
| "description": "when it's late in the day" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 3, | ||
| "result": { | ||
| "content": [ | ||
| { | ||
| "type": "text", | ||
| "text": "{\n \"general\": \"Hello, World!\",\n \"close\": \"Hey, World!\",\n \"morning\": \"Good morning, World!\",\n \"afternoon\": \"Good afternoon, World!\",\n \"evening\": \"Good evening, World!\"\n}" | ||
| } | ||
| ], | ||
| "isError": false, | ||
| "structuredContent": { | ||
| "general": "Hello, World!", | ||
| "close": "Hey, World!", | ||
| "morning": "Good morning, World!", | ||
| "afternoon": "Good afternoon, World!", | ||
| "evening": "Good evening, World!" | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 4, | ||
| "result": { | ||
| "prompts": [ | ||
| { | ||
| "name": "greet", | ||
| "description": "Prompt to be greeted by the `greet` tool", | ||
| "arguments": [ | ||
| { | ||
| "name": "name", | ||
| "description": "The name you want to be greeted by", | ||
| "required": true | ||
| } | ||
| ], | ||
| "icons": [ | ||
| { | ||
| "src": "https://openmoji.org/data/color/svg/1F91D.svg" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 5, | ||
| "result": { | ||
| "messages": [ | ||
| { | ||
| "role": "user", | ||
| "content": { | ||
| "type": "text", | ||
| "text": "Hi. My name is Firstname Lastname. Please, greet me." | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.