Skip to content

Add support to build the MCP SDK using Linux #59

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

Closed
wants to merge 2 commits into from

Conversation

tib
Copy link

@tib tib commented Apr 7, 2025

This PR aims to solve build issues under Linux regarding import Darwin & fcntl.

Motivation and Context

Users should be able to build the SDK using Linux.

How Has This Been Tested?

Added a simple Dockerfile to run the tests.

Breaking Changes

Hopefully none.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@stallent
Copy link

stallent commented Apr 7, 2025

Thank you for doing this. I have been using a fork with the transports removed completely since they were unneeded with a Hummingbird Docker instance.

@tib
Copy link
Author

tib commented Apr 7, 2025

Oh that's nice, do you have a public example of a HB transport using SSE? 🤔

@stallent
Copy link

stallent commented Apr 7, 2025

Its not in a public repo at the moment but pretty easy to move to one. I'll try to get that whipped up today.

@mattt
Copy link
Contributor

mattt commented Apr 9, 2025

Oh, hey @tib! Thanks for opening this PR. It'd be great to expand support for Linux as well.

It's too bad that Swift System doesn't yet support fcntl.

I was curious whether we could conditionally compile our way around the problem, so I opened up #61 as a potential alternative. Still have to update CI to test on Linux to know for sure, but can you think of any deal-breakers to that approach?

@tib
Copy link
Author

tib commented Apr 10, 2025

Your PR looks good, the only thing that comes to my mind, is the static Linux SDK support. See this guide, but I don't think my PR supports it, so either solution could work.

Anyway let's get the SDK working on Linux first and then add Musl support afterwards. 😉

@mattt
Copy link
Contributor

mattt commented Apr 10, 2025

Thanks again for opening this PR, @tib. I just merged #61 and opened #63 to add support for Alpine Linux.

@mattt mattt closed this Apr 10, 2025
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.

None yet

3 participants