Skip to content

Fix Cline MCP configuration by adding required transportType field #162

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

MrityunjayBhardwaj
Copy link

Problem

Current versions of Cline strictly validate MCP server configurations and require a transportType field that was missing from our configuration. Users attempting to connect Cline to GitMCP receive an "invalid mcp settings schema" error.

Solution

This PR adds the required transportType: "sse" field to the Cline MCP configuration in both:

  1. The README.md documentation
  2. The app/components/content.tsx file that generates configuration code examples

Testing

Tested with Cline v3.16.3 in VS Code v1.99.3:

  • Without the transportType field: "invalid mcp settings schema" error
  • With the transportType: "sse" field: works correctly

References

  • Cline issue #3705 - Schema validation errors requiring transportType field
  • Cline issue #1937 - Original issue adding SSE transport support
  • Cline PR #3700 - MCP hub type fixes in v3.16.3 release

Recent versions of Cline (v3.16.3) require the transportType field in their MCP server configuration. Without this field, we encounter an "invalid mcp settings schema" error when attempting to connect to GitMCP.

This commit adds the required "transportType": "sse" field to the Cline configuration generated in app/components/content.tsx to ensure compatibility with current Cline versions.

References:
- Cline issue #3705[cline/cline#3705] - Schema validation errors
- Cline PR #3700[cline/cline#3700] - MCP hub type fixes in v3.16.3
Updates the Cline MCP configuration example in README.md to include the required "transportType": "sse" field. This field is now mandatory in recent versions of Cline (v3.16.3) and without it, users encounter "invalid mcp settings schema" errors.

The update ensures documentation accuracy and aligns with the actual code requirements for connecting Cline to GitMCP servers.
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 17:39
Copy link
Contributor

@Copilot 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 addresses schema validation errors in Cline by adding the required transportType field to example configurations.

  • Adds transportType: "sse" to the generated config snippet in content.tsx
  • Updates the README example to include transportType: "sse"

Reviewed Changes

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

File Description
app/components/content.tsx Fixed missing comma after autoApprove and inserted the required transportType field
README.md Added transportType property to the MCP configuration example
Comments suppressed due to low confidence (1)

app/components/content.tsx:403

  • There are no tests verifying that the generated configuration snippet includes the new transportType field; consider adding a unit or snapshot test for Content to assert that transportType: "sse" appears in the output.
"transportType": "sse"

@@ -145,7 +145,8 @@ Update your Cline configuration file at `~/Library/Application Support/Code/User
"gitmcp": {
"url": "https://gitmcp.io/{owner}/{repo}",
"disabled": false,
"autoApprove": []
"autoApprove": [],
"transportType": "sse"
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief description of the transportType field in the README to explain its purpose and valid values for readers reviewing the configuration example.

Copilot uses AI. Check for mistakes.

@idosal
Copy link
Owner

idosal commented May 22, 2025

Thanks for the contribution! Does it work in older versions?

@MrityunjayBhardwaj
Copy link
Author

MrityunjayBhardwaj commented May 22, 2025

Hey @idosal,

First of all, huge thanks to everyone who made this project a reality — truly grateful!

Short answer: Yes, it is backwards compatible up to v3.8.5. Before that, we'll need to use the old command/args format.

Long Answer:

SSE (Server-Sent Events) support with the url field was added to Cline around version 3.8.5(see release notes) based on issue #1937 from Feb 2025 and before this, user need to use command/args format.

New Changes Compatibility

After Testing, the new changes (adding transportType: "sse") will work from v3.8.5 onwards just like our current implementation ( To be more precise, before v3.16.3 it will ignore "transportType": "sse" entry and will work as its currently working).

For Cline versions before v3.8.5, users need to use this different config format:

{
  "gitmcp": {
    "command": "npx",
    "args": [
      "mcp-remote",
      "https://gitmcp.io/{owner}/{repo}"
    ],
    "disabled": false,
    "autoApprove": []
  }
}

This command/args format was the only way to connect to remote MCP servers in early Cline versions. The mcp-remote utility handles the SSE connection internally, bypassing the need for direct URL field support in the Cline configuration schema.

Hope it helps.

@MrityunjayBhardwaj
Copy link
Author

maybe we need to also explicitly add a comment on README.md regarding minimum cline version requirement. what do you think?

@idosal
Copy link
Owner

idosal commented May 28, 2025

Thanks @MrityunjayBhardwaj! Did this fix by Cline resolve the broken config?

@MrityunjayBhardwaj
Copy link
Author

@idosal Yes it does!, I'll close this now.

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.

2 participants