continue icon indicating copy to clipboard operation
continue copied to clipboard

fix: :bug: Add requestOptions to YAML config for mcp

Open chezsmithy opened this issue 6 months ago • 4 comments

Description

Add request options to mcp server YAML config. Without this in place you can't pass headers for example.

Checklist

  • [X] I've read the contributing guide
  • [X] The relevant docs, if any, have been updated or created
  • [X] The relevant tests, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ]

Tests

Confirmed the following configuration loads headers in:

https://github.com/chezsmithy/continue/blob/16ef20aeca9696f0b751e590671111eafc5fcda7/core/context/mcp/MCPConnection.ts#L352

name: SSE Server
version: 0.0.1
schema: v1
mcpServers:
  - name: sse-server
    type: sse
    url: https://www.example.com
    requestOptions:
      headers: { Authorization: "Bearer ABC", JWT: XXASDASDSAS }

chezsmithy avatar Jun 13 '25 05:06 chezsmithy

Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic.

cubic-dev-ai[bot] avatar Jun 13 '25 05:06 cubic-dev-ai[bot]

Deploy request for continuedev pending review.

Visit the deploys page to approve it

Name Link
Latest commit 81c20c11dbbce2eccefd00364c5b74b298b2f24f

netlify[bot] avatar Jun 13 '25 05:06 netlify[bot]

✨ No issues found! Your code is sparkling clean! ✨

recurseml[bot] avatar Jun 13 '25 20:06 recurseml[bot]

Edit: I see that this is potentially urgent for you. If you wanted to merge this in and make a follow up PR to address my comments, I would be okay with that

sestinj avatar Jun 16 '25 20:06 sestinj

@sestinj I think I would prefer to merge as is, given this is where the requestOptions are being pulled in. The contributor who made the original change based their work off the json config which had the requestOptions already included. I'd be cool if you want to open up a new issue and I can see how we can use the fetch override. https://github.com/continuedev/continue/blob/bb0490ad74fca80ba87a8d4d820d6d20744d4517/core/context/mcp/MCPConnection.ts#L364

chezsmithy avatar Jun 21 '25 00:06 chezsmithy

works for me. I made a follow up issue here @chezsmithy https://github.com/continuedev/continue/issues/6234

sestinj avatar Jun 21 '25 00:06 sestinj