Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[KDM-TEST-FIX-309] fix: complete MCP initialization handshake - #309

Merged
utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
harbinresearcher:fix/mcp-initialize
Sep 13, 2026
Merged

[KDM-TEST-FIX-309] fix: complete MCP initialization handshake#309
utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
harbinresearcher:fix/mcp-initialize

Conversation

@harbinresearcher

Copy link
Copy Markdown
Contributor

Summary

  • add an MCP 2024-11-05 initialization response with the existing tools capability and installed package version
  • suppress stdout responses for parsed JSON-RPC notifications without an id
  • add regression coverage for initialization and notification handling

Testing

  • npx vitest run src/__tests__/mcp.test.ts --pool=forks --maxWorkers=1 — 6 passed
  • npm run build — passed
  • npm test — 402 passed; 4 unrelated dashboard tests fail identically on the unmodified origin/main baseline in this Windows environment

Fixes #254

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: QUIET

Plan: Advanced

Run ID: 95b8d48e-13f1-4619-8368-f29ded8cfa3e

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

Parsing errors (2)
Validation error: Invalid input: expected string, received undefined at "reviews.path_instructions[3].path"; Invalid input: expected string, received undefined at "reviews.path_instructions[3].instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot changed the title fix: complete MCP initialization handshake [KDM-TEST-FIX-309] fix: complete MCP initialization handshake Sep 13, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@utkarsh232005 utkarsh232005 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks for handling the MCP initialization handshake and adding solid test coverage for both the initialize request and notification handling. Clean implementation.

LGTM — approved! 🚀

We’d love to have you continue contributing to the repo. Feel free to check out our open issues or pick up anything tagged good first issue or help wanted if you're looking for what to tackle next!

@utkarsh232005
utkarsh232005 merged commit 2c3cb30 into KDM-cli:main Sep 13, 2026
7 of 9 checks passed
@utkarsh232005

Copy link
Copy Markdown
Member

@all-contributors please add @harbinresearcher for code, test

@allcontributors

Copy link
Copy Markdown
Contributor

@utkarsh232005

I've put up a pull request to add @harbinresearcher! 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MCP server fails handshake with AI clients due to missing 'initialize' method and invalid notification replies

2 participants