Skip to content

Conversation

@Dogacel
Copy link

@Dogacel Dogacel commented Mar 27, 2025

Description

Implement the HTTP transport using SSE. The CLI tool automatically determines whether the connection is an http or stdio by checking the command's arguments. If it is only 1 argument and starts with http:// or https://, it uses HTTP instead of stdio.

Hi Fatih, this project looks pretty cool, MCP is relatively new and I wanted to contribute. It's been a while since I have written Go so let me know if anything looks odd.

Also, I have implemented the solution based on "Final" edition. The "Latest" version actually changed quite a bit of things, it is much more complicated and I couldn't find any example project that used the new protocol (TBH I did not search hard enough).

https://spec.modelcontextprotocol.io/specification/2025-03-26/basic/transports/

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I have run the "everything" MCP server using a docker image,

docker run -p 3001:3001 --rm -it tzolov/mcp-everything-server:v1

Later, I have conducted the test manually by calling the existing functionality,

Screen.Recording.2025-03-26.at.22.14.54.mov

Note that for some reason server exits when the connection is broken.

I belive there might be some kind of bug with tool calls in shell mode, I couldn't make it work.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Dogacel Dogacel force-pushed the dogac/add-http-sse-support branch from fdb3d65 to 3f37e72 Compare March 27, 2025 03:30
@f
Copy link
Owner

f commented Mar 27, 2025

Can you update the README as well?

@Dogacel Dogacel force-pushed the dogac/add-http-sse-support branch from 3f37e72 to af9546c Compare March 27, 2025 13:59
@Dogacel
Copy link
Author

Dogacel commented Mar 27, 2025

Can you update the README as well?

Done 👍 Also fixed the linter errors.

@Dogacel Dogacel force-pushed the dogac/add-http-sse-support branch from af9546c to 55c8682 Compare March 27, 2025 14:00
@f
Copy link
Owner

f commented Mar 27, 2025

Perfect!

@f
Copy link
Owner

f commented Mar 27, 2025

Can you fix the lint errors?

Signed-off-by: Doğaç Eldenk <dogac@carbonhealth.com>
@Dogacel Dogacel force-pushed the dogac/add-http-sse-support branch from 55c8682 to e74d14f Compare March 27, 2025 18:03
@Dogacel
Copy link
Author

Dogacel commented Mar 27, 2025

Can you fix the lint errors?

I also found that lint makefile command was failing and tried to fix it by,

  1. Fix makefile command
  2. Add comment to transport package

Let me know if you want to add lint as a required step to setup as well. I expected it to run after running make but seems like it doesn't.

@f f merged commit 03e484c into f:master Mar 27, 2025
2 checks passed
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.

2 participants