Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

fix(use-mcp): connect to mcp fails with handleMessage function#9

Closed
ksankaran wants to merge 1 commit intomodelcontextprotocol:mainfrom
ksankaran:main
Closed

fix(use-mcp): connect to mcp fails with handleMessage function#9
ksankaran wants to merge 1 commit intomodelcontextprotocol:mainfrom
ksankaran:main

Conversation

@ksankaran
Copy link
Copy Markdown
Contributor

I'm trying to use the library to connect to the MCP Tools. However, I noticed that, handleMessage is not part of the client in typescript sdk and hence, the call fails when trying to initialize the same.

Motivation and Context

Without this change, the MCP Client wont be initialized.

How Has This Been Tested?

In vite app, where I'm trying to load the library.

Breaking Changes

No.

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

image

@geelen
Copy link
Copy Markdown
Collaborator

geelen commented Jun 30, 2025

I'll have a look at this tomorrow. I've found that downgrading to SDK 1.13.1 fixed this issue, but didn't actually look at what changed yet (or the fix, is it really only one character? lol).

I'm building a proper E2E test suite (first bit is merged) cause I was getting such weird transient errors like this and I needed to get some hard data. So once that's ready I'll grab this commit and update the SDK to latest and see if everything passes.

For now, I think if you use use-mcp@latest with @modelcontextprotocol/typescript-sdk@1.13.1 you should avoid this issue. Thanks for the PR tho!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants