Skip to content

Conversation

@manusa
Copy link
Member

@manusa manusa commented Oct 21, 2025

Fixes #219

@manusa manusa force-pushed the feat/go-sdk branch 2 times, most recently from e112c07 to 1e24411 Compare October 23, 2025 14:11
@manusa manusa force-pushed the feat/go-sdk branch 4 times, most recently from 9455a33 to 7c0fd25 Compare November 5, 2025 10:43
@manusa manusa force-pushed the feat/go-sdk branch 3 times, most recently from 0643f1c to a48decd Compare November 5, 2025 16:50
@manusa manusa force-pushed the feat/go-sdk branch 2 times, most recently from c8ee9bf to 77d3ce7 Compare November 11, 2025 14:16
@manusa manusa force-pushed the feat/go-sdk branch 2 times, most recently from 2b821b0 to 523baff Compare November 12, 2025 09:48
@manusa manusa changed the title WIP: feat(mcp): refactor to use go-sdk feat(mcp): refactor to use go-sdk Nov 12, 2025
@manusa manusa marked this pull request as ready for review November 12, 2025 11:12
@manusa manusa added this to the 0.1.0 milestone Nov 12, 2025
@manusa manusa requested review from Cali0707 and matzew November 12, 2025 11:13
github.com/fsnotify/fsnotify v1.9.0
github.com/go-jose/go-jose/v4 v4.1.3
github.com/google/jsonschema-go v0.3.0
github.com/mark3labs/mcp-go v0.43.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

some of the tests still have reference to this. Will that clean-up follow in a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests are still running using the Mark3Labs MCP client.
We can eventually move to just use the official go-sdk mcp client, but I find it more reliable this way though.

Comment on lines +150 to +151
// TODO: No option to perform a full replacement of tools.
// Remove tools that are no longer applicable
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is also to follow up, w/ upstream?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, I think we discussed this earlier today or yesterday in a different PR or chat.
Once this is in I'll open an issue upstream and see if they are receptive to a SetTools implementation (comments in their code don't suggest they might want it, so better to provide a real use-case/scenario).

Comment on lines +187 to +188
// For clients to be able to listen to tool changes, we need to set the server stateful
// https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#listening-for-messages-from-the-server
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering: was the old impl than not "compliant" to latest spec?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think mark3labs was more lenient in this regard.
I'm not sure that the MCP protocol states that listening for tool changes is something that requires a session id, but in the go-sdk implementation it does.

@matzew
Copy link
Collaborator

matzew commented Nov 12, 2025

I want to test with w/ the checked in keycloak scripts

@matzew
Copy link
Collaborator

matzew commented Nov 13, 2025

I1113 08:35:06.331469   44005 middleware.go:38] "mcp tool call: namespaces_list(map[])"
I1113 08:35:06.331516   44005 manager.go:244] "Authorization header found (Bearer), using provided bearer token"
I1113 08:35:06.342283   44005 middleware.go:29] "POST /mcp 200 20.15874ms"

tested the keycloak setup from the docs folder and it worked!

@matzew
Copy link
Collaborator

matzew commented Nov 13, 2025

LGTM 🎉

@manusa
Copy link
Member Author

manusa commented Nov 14, 2025

Merging 🚀

@manusa manusa merged commit b4c20f9 into containers:main Nov 14, 2025
10 of 11 checks passed
@manusa manusa deleted the feat/go-sdk branch November 14, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NFR] Migrate to Go-SDK

2 participants