Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the hand-rolled MCP implementation with the official github.com/modelcontextprotocol/go-sdk package, addressing issues in the original custom implementation that was built before third-party dependencies were available.
- Complete replacement of custom MCP protocol implementation with official SDK
- Refactoring of OpenAPI tool registration into separate internal package
- Updated test integration to handle proper MCP handshake protocol
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mcp/transport_test.go | Removed custom transport tests (functionality now handled by SDK) |
| mcp/transport.go | Removed custom transport implementation |
| mcp/server_test.go | Removed custom server tests (functionality moved to SDK) |
| mcp/server.go | Removed custom server implementation |
| mcp/protocol.go | Removed custom protocol definitions |
| main_test.go | Updated integration test to perform proper MCP handshake sequence |
| internal/openapi.go | Added new OpenAPI tool registration functionality using SDK types |
| go.mod | Added dependencies for official SDK and JSON schema library |
| cmd/emcee/main.go | Refactored to use SDK server with OpenAPI tool registration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
emcee was built early on, before there were any 3rd-party dependencies for MCP. It was also my first interaction with MCP. As a result, there are a bunch of things wrong with the original implementation.
This PR rips all of that out and replaces it with the official Go SDK.