-
Notifications
You must be signed in to change notification settings - Fork 18
fix: move MCP server creation logic to mcp-server.ts to resolve circular dependency issue #11
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
Conversation
Thanks @hongfeiyang ! Let me give it a try tomorrow morning. |
Hi @hongfeiyang, This is a reminder that, as stated in our CONTRIBUTING guide, all contributions to any @InditexTech repositories require signing our Contributor License Agreement (CLA) first. Here you can find the Contributor License Agreement and a detailed guide on how to proceed. Please note that this is a prerequisite for contributions, and any contributions will be blocked until the CLA is signed. Thank you for your understanding and cooperation. |
Hi @hongfeiyang, First of all, sorry for the delay in the response. I can confirm that the CLA has been signed, and this PR is no longer blocked. Thank you for your patience and contribution. It is now in @arturonaredo's hands to approve. |
Sorry @hongfeiyang , last thing I promise... you need to verify your commits. Here is how: ✅ How to Sign and Re-sign Commits for GitHub (GPG)1. Generate a GPG KeyIf you don’t already have a GPG key: gpg --full-generate-key
2. Find Your GPG Key IDgpg --list-secret-keys --keyid-format=long Example output:
Copy the part after 3. Tell Git to Use That Keygit config --global user.signingkey ABCD1234EFGH5678
git config --global commit.gpgsign true 4. Add Your Public Key to GitHubExport your public key: gpg --armor --export ABCD1234EFGH5678 Copy the full output and go to: 👉 GitHub > Settings > SSH and GPG keys > New GPG key Paste it and save. 5. Re-sign Specific CommitsTo re-sign the two commits: git rebase --exec 'git commit --amend --no-edit -S' -i a65b492ccc090b5351b2bdb605a1be910b4d17bd~1 When the editor opens, leave both commits as Git will re-sign them using your GPG key. 6. Force Push the Signed Commitsgit push --force-with-lease After pushing, GitHub will show a "Verified" badge next to each commit. ✅ . We will be able to merge your PR. |
…lar dependency issue
|
Ok done thanks for the guidance |
Overview
This pull request resolves a circular dependency issue by relocating the MCP server creation logic from
index.ts
tomcp-server.ts
. The circular dependency was occurring becauseindex.ts
was exporting the server creation function while also importing frommcp-server.ts
, andmcp-server.ts
was importing fromindex.ts
.Changes
createMCPServer()
function fromsrc/index.ts
tosrc/mcp/mcp-server.ts
Technical Details
Before this change, we had a circular dependency where:
index.ts
was exportingcreateMCPServer()
but importingmcpServer
frommcp-server.ts
mcp-server.ts
was importingcreateMCPServer()
fromindex.ts
This circular dependency caused initialisation issues and was addressed by: