Skip to content

Removed axios dependency#271

Merged
codebycarson merged 4 commits into
mainfrom
fix/mcp-axios
Jul 8, 2025
Merged

Removed axios dependency#271
codebycarson merged 4 commits into
mainfrom
fix/mcp-axios

Conversation

@codebycarson

Copy link
Copy Markdown
Collaborator

The previous release of the MCP server used axios and causes errors on some environments. This is fixed by using the native fetch from node itself.

@codebycarson
codebycarson requested a review from besated July 8, 2025 19:43
@changeset-bot

changeset-bot Bot commented Jul 8, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 266949d

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 July 8, 2025 19:45

Copilot AI left a comment

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.

Pull Request Overview

This PR removes the axios dependency from the MCP server and replaces it with Node’s native fetch, while simplifying error formatting.

  • Removed Axios-specific utilities and imports
  • Updated fetchMintlifyConfig to use fetch and explicit response.ok handling
  • Adjusted the changeset to reflect dependency removal

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/mcp-server/src/mintlify/utils.ts Removed axios types/utilities and simplified formatErr
packages/mcp-server/src/mintlify/search.ts Switched from axios.get to fetch and inline status checks
.changeset/sharp-chicken-follow.md Added a patch changeset entry for dependency removal
Comments suppressed due to low confidence (2)

packages/mcp-server/src/mintlify/search.ts:12

  • The new fetchMintlifyConfig function handles HTTP statuses but lacks tests covering non-200 responses (e.g., 404 vs 500). Please add unit tests for these scenarios to ensure correct error handling.
const fetchMintlifyConfig = async (subdomain: string): Promise<MintlifySearchConfig> => {

.changeset/sharp-chicken-follow.md:5

  • [nitpick] The changeset summary is too generic. It would be clearer to mention the removal of axios and migration to native fetch, e.g., 'Remove axios dependency and migrate to native fetch'.
Removed unnecessary dependencies

Comment thread packages/mcp-server/src/mintlify/search.ts Outdated
@codecov-commenter

codecov-commenter commented Jul 8, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (96d3a73) to head (266949d).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #271   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           73        73           
  Lines          855       855           
  Branches       139       139           
=========================================
  Hits           855       855           

☔ 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 merged commit d421249 into main Jul 8, 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