Skip to content

Add optional RPC URLS and improve build reliability#284

Merged
codebycarson merged 8 commits intomainfrom
feature/mcp-configurable-rpc
Aug 6, 2025
Merged

Add optional RPC URLS and improve build reliability#284
codebycarson merged 8 commits intomainfrom
feature/mcp-configurable-rpc

Conversation

@codebycarson
Copy link
Copy Markdown
Collaborator

@codebycarson codebycarson commented Aug 5, 2025

  • Add ability to override RPC url for each chain
  • Remove node-fetch (force node version with native fetch)
  • Add documentation for troubleshooting common errors
  • Adjusted building for node only environments

- Add ability to override RPC url for each chain
- Increment node-fetch versions to get correct typescript types
- Add documentation around these changes
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Aug 5, 2025

🦋 Changeset detected

Latest commit: 4868746

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sei-js/mcp-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codebycarson codebycarson requested a review from Copilot August 5, 2025 23:59

This comment was marked as outdated.

Comment thread packages/mcp-server/src/core/services/clients.ts Outdated
…ith node

- Removed all uses of node-fetch
- Updated docs to explain how to force version 18
@codebycarson codebycarson changed the title Add optional RPC URLS and update node-fetch versions Add optional RPC URLS and force node version 18 Aug 6, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3179b0a) to head (983fdaa).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #284   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           70        70           
  Lines          844       846    +2     
  Branches       139       142    +3     
=========================================
+ Hits           844       846    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codebycarson codebycarson requested review from besated and Copilot August 6, 2025 01:58

This comment was marked as outdated.

- Added valid urls as examples in docs
- Added node@18 prompt to claude cli docs
- Added variables to .env.example
- Added new docs page for support
- Changed module resolution to node
- Added dependency for noble hashes to resolve conflicts
-
@codebycarson codebycarson requested a review from Copilot August 6, 2025 16:36
@codebycarson codebycarson changed the title Add optional RPC URLS and force node version 18 Add optional RPC URLS and improve build reliability Aug 6, 2025

This comment was marked as outdated.

codebycarson and others added 2 commits August 6, 2025 10:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codebycarson codebycarson requested a review from Copilot August 6, 2025 16:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves build reliability and adds RPC customization capabilities for the MCP server by modernizing the build setup and removing node-fetch dependency in favor of native fetch.

  • Replace node-fetch with native fetch (requires Node.js 18+)
  • Add environment variable support for custom RPC URLs per chain
  • Update TypeScript configuration for Node.js-only environments
  • Add comprehensive troubleshooting documentation

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/mcp-server/tsconfig.json Updated compiler options for Node.js environments
packages/mcp-server/package.json Removed node-fetch dependency and simplified build script
packages/mcp-server/src/tests/core/tools.test.ts Switched from mocking node-fetch to global fetch
packages/mcp-server/src/mintlify/search.ts Removed node-fetch import
packages/mcp-server/src/docs/server.ts Removed node-fetch import
packages/mcp-server/src/core/chains.ts Added environment variable support for RPC URLs
packages/mcp-server/.env.example Added RPC URL environment variables
docs/mcp-server/troubleshooting.mdx Added comprehensive troubleshooting guide
docs/mcp-server/setup.mdx Updated environment variables documentation
docs/mcp-server/introduction.mdx Updated configuration examples
docs/mcp-server/tools.mdx Updated npx command example
docs/docs.json Added troubleshooting page to navigation

Comment thread packages/mcp-server/src/core/chains.ts
Comment thread docs/mcp-server/tools.mdx Outdated
"sei": {
"command": "npx",
"args": ["-y", "@sei-js/mcp-server"],
"args": ["--node-version=18@18", "@sei-js/mcp-server"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be hardcoded to 18? can it just use >18 or LTS?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this, good catch

@codebycarson codebycarson merged commit 977328b into main Aug 6, 2025
3 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.

4 participants