Skip to content

Add support to build the MCP SDK using Linux#59

Closed
tib wants to merge 2 commits into
modelcontextprotocol:mainfrom
tib:main
Closed

Add support to build the MCP SDK using Linux#59
tib wants to merge 2 commits into
modelcontextprotocol:mainfrom
tib:main

Conversation

@tib

@tib tib commented Apr 7, 2025

Copy link
Copy Markdown

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

stallent commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

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

tib commented Apr 7, 2025

Copy link
Copy Markdown
Author

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

@stallent

stallent commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

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

mattt commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

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

tib commented Apr 10, 2025

Copy link
Copy Markdown
Author

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

mattt commented Apr 10, 2025

Copy link
Copy Markdown
Contributor

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.

3 participants