Skip to content

Conversation

@sd2k
Copy link
Contributor

@sd2k sd2k commented Mar 19, 2025

Description

This commit separates the main logic into a separate file, now marked as the binary entry point for the package, and updates the index to export the server instance. This allows the package to be used as a library, enabling the server to be used with custom transports in other projects.

Server Details

  • Server: Github
  • Changes to: library

Motivation and Context

I'd like to be able to import the server in my own main.ts and provide a custom transport, rather than just stdio/SSE.

How Has This Been Tested?

I've tested this with Claude Desktop using the Docker image & command, but I can't tell what the incantation is to test the local checkout with npx unfortunately. Any advice would be great.

Breaking Changes

I don't think so, since the docs for npx state:

... npm will attempt to determine the executable name from the package specifier provided as the first positional argument according to the following heuristic:

  1. If the package has a single entry in its bin field in package.json, or if all entries are aliases of the same command, then that command will be used.

So I'm pretty sure anyone with the npx command configured will get the same usage as before.

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 Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

This only changes one server to reduce the scope of the PR, but I'm happy to go through all the others and make a similar change, if that's agreeable. Let me know 👍

This commit separates the `main` logic into a separate file, now marked
as the binary entry point for the package, and updates the index to
export the server instance. This allows the package to be used as a
library, enabling the server to be used with custom transports in other
projects.
@olaservo olaservo added enhancement New feature or request server-github labels Mar 27, 2025
@cliffhall
Copy link
Member

Deprecation Notice: Development for the github-server has been moved to GitHub in the http://github.com/github/github-mcp-server repo. PRs to github-server in this repo are no longer being merged.

@cliffhall cliffhall closed this Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants