Skip to content

PoC: Migrate to Official Go MCP SDK - #1

Closed
zach-snell wants to merge 2 commits into
mainfrom
migrate-sdk-poc-16652907104557779702
Closed

PoC: Migrate to Official Go MCP SDK#1
zach-snell wants to merge 2 commits into
mainfrom
migrate-sdk-poc-16652907104557779702

Conversation

@zach-snell

Copy link
Copy Markdown
Owner

This PR initiates the migration to the official Go MCP SDK (github.com/modelcontextprotocol/go-sdk).

It serves as a Proof of Concept (PoC) demonstrating the benefits of the new SDK, particularly the type-safe, struct-based argument parsing which simplifies handler logic and improves safety.

Key Changes:

  1. SDK Switch: Replaced mark3labs/mcp-go with modelcontextprotocol/go-sdk.
  2. Server Initialization: Updated server startup logic to match the new SDK's patterns.
  3. Tool Migration (PoC): Fully migrated list-notes and write-note tools.
    • Defined ListNotesArgs and WriteNoteArgs structs for automatic validation.
    • Refactored handlers to accept these structs directly.
  4. Cleanup: Commented out un-migrated tools and tests to ensure a clean build for evaluation.

Next Steps (Post-Merge):

  • Migrate the remaining 60+ tools using the established pattern.
  • Update and re-enable internal/vault/editing_test.go and other tests.
  • Finalize go.mod cleanup.

PR created automatically by Jules for task 16652907104557779702 started by @zach-snell

Migrates the project to use `github.com/modelcontextprotocol/go-sdk` instead of `github.com/mark3labs/mcp-go`.

Changes:
- Replaced SDK dependency in `go.mod`.
- Refactored `cmd/server/main.go` and `internal/server/server.go` to initialize the new server.
- Implemented typed argument structs in `internal/vault/types.go` for `list-notes` and `write-note`.
- Updated `ListNotesHandler` and `WriteNoteHandler` in `internal/vault/vault.go` to use the new generic `mcp.AddTool` pattern with automatic argument unmarshaling and validation.
- Temporarily commented out other tool handlers and disabled `editing_test.go` to allow compilation and verification of the PoC.

Verification:
- Confirmed `list-notes` and `write-note` function correctly with the new SDK using a local test client.

Co-authored-by: zach-snell <10632545+zach-snell@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Migrates the project to use `github.com/modelcontextprotocol/go-sdk` instead of `github.com/mark3labs/mcp-go`.

Changes:
- Replaced SDK dependency in `go.mod` (downgraded to go 1.24 to match linter/env).
- Refactored `cmd/server/main.go` and `internal/server/server.go` to initialize the new server.
- Implemented typed argument structs in `internal/vault/types.go` for `list-notes` and `write-note`.
- Updated `ListNotesHandler` and `WriteNoteHandler` in `internal/vault/vault.go` to use the new generic `mcp.AddTool` pattern with automatic argument unmarshaling and validation.
- Temporarily commented out other tool handlers and disabled `editing_test.go` to allow compilation and verification of the PoC.

Verification:
- Confirmed `list-notes` and `write-note` function correctly with the new SDK using a local test client.
- Ran `golangci-lint` and `govulncheck`.

Co-authored-by: zach-snell <10632545+zach-snell@users.noreply.github.com>
@zach-snell

Copy link
Copy Markdown
Owner Author

Superseded by sdk-migration/ready-for-review branch which includes this work plus lint fixes and missing handler registrations.

@zach-snell zach-snell closed this Feb 16, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by sdk-migration/ready-for-review branch which includes this work plus lint fixes and missing handler registrations.

Acknowledged.

@zach-snell
zach-snell deleted the migrate-sdk-poc-16652907104557779702 branch February 18, 2026 20:11
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.

1 participant