Skip to content

MCP Demo #132

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

Merged
merged 1 commit into from
Jul 19, 2025
Merged

MCP Demo #132

merged 1 commit into from
Jul 19, 2025

Conversation

TomHart
Copy link

@TomHart TomHart commented Jul 15, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues Demo (not working) code for MCP
License MIT

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the README we should document how you are able to use this server then

@tom-hart-sky-uk
Copy link
Contributor

@OskarStark Thanks for your feedback, I've addressed the comments and also fixed the code standards failure

Copy link
Contributor

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TomHart for working on this - that was def missing 👍

I left a few comments, mostly minor stuff - please make sure to remove the security bundle - didn't comment on every changed caused by that change

@TomHart
Copy link
Author

TomHart commented Jul 18, 2025

Thanks @TomHart for working on this - that was def missing 👍

I left a few comments, mostly minor stuff - please make sure to remove the security bundle - didn't comment on every changed caused by that change

Thanks @chr-hertel. I've addressed the comments you left

@chr-hertel
Copy link
Contributor

Looks good on the first glance - how did you test this? which the inspector?

let's add information about that so users can check it out themselves?

@TomHart
Copy link
Author

TomHart commented Jul 18, 2025

I used the CLI to paste in some JSON to list the tools. I've added the steps in the README. Is that what you were thinking, or something else?

Symfony\AI\McpSdk\Capability\Tool\ToolExecutorInterface:
class: Symfony\AI\McpSdk\Capability\ToolChain
arguments:
- ['@App\MCP\Tools\CurrentTimeTool']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off topic, but it would be nice if this is configurable via the bundle config

cc @Nyholm

Copy link
Author

@TomHart TomHart Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pass a service reference in bundle config? E.g.

mcp:
  tools:
    - '@App\MCP\Tools\CurrentTimeTool'

Would a tag + compiler pass perhaps be a cleaner way of doing this?

  App\MCP\Tools\CurrentTimeTool:
    tags:
      - { name: mcp_tool_executor }
      - { name: mcp_tool_metadata }

or just name: mcp_tool

Copy link
Contributor

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now :)

@chr-hertel
Copy link
Contributor

@TomHart please squash the commits to a single one

Addressed comments

lint

Apply suggestion from @chr-hertel

Co-authored-by: Christopher Hertel <[email protected]>

revert .gitignore

Addressed comments

revert

README for testing

Update demo/README.md

Co-authored-by: Oskar Stark <[email protected]>

Update demo/README.md

Co-authored-by: Oskar Stark <[email protected]>

Update demo/README.md

Co-authored-by: Christopher Hertel <[email protected]>
@TomHart
Copy link
Author

TomHart commented Jul 19, 2025

Done! Do you have any thoughts on #132 (comment)? I'd be happy to take a stab at implementing

@chr-hertel
Copy link
Contributor

Thank you @TomHart.

@chr-hertel chr-hertel merged commit 1cdd1c1 into symfony:main Jul 19, 2025
12 checks passed
@chr-hertel
Copy link
Contributor

Do you have any thoughts on #132 (comment)? I'd be happy to take a stab at implementing

Hmm, on first thought, I think this would already be an improvement for now:

mcp:
  tools:
    - '@App\MCP\Tools\CurrentTimeTool'

@TomHart
Copy link
Author

TomHart commented Jul 19, 2025

@chr-hertel I couldn't get it to work referencing services manually but added a compiler pass. Happy to give the list another go if you'd prefer #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants