Skip to content

Use ai-sdk/mcp package for new mint doc endpoint#1749

Merged
maor-rozenfeld merged 6 commits intomainfrom
lb/aimcp
Dec 10, 2025
Merged

Use ai-sdk/mcp package for new mint doc endpoint#1749
maor-rozenfeld merged 6 commits intomainfrom
lb/aimcp

Conversation

@bigfluffycookie
Copy link
Copy Markdown
Contributor

Fixes OPS-2911

@linear
Copy link
Copy Markdown

linear Bot commented Dec 9, 2025

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 9, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lb/aimcp

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 and usage tips.

@bigfluffycookie bigfluffycookie marked this pull request as ready for review December 9, 2025 10:30
Copilot AI review requested due to automatic review settings December 9, 2025 10:30
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

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 migrates the documentation MCP (Model Context Protocol) server integration from a local stdio-based transport to an HTTP-based transport using the new @ai-sdk/mcp package. The change updates the connection method from executing a local Node.js process to making HTTP requests to a hosted MCP endpoint.

Key changes:

  • Updated the docs MCP server configuration from a local file path to an HTTPS URL
  • Migrated from stdio transport to HTTP transport using the @ai-sdk/mcp package
  • Improved tool discovery logic to handle both Map and Object return types from the MCP client

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
packages/server/shared/src/lib/system/system.ts Changed default DOCS_MCP_SERVER_PATH from local path to HTTPS URL
packages/server/api/src/app/ai/mcp/docs-tools.ts Refactored to use HTTP transport with @ai-sdk/mcp package and improved tool discovery
package.json Added @ai-sdk/mcp@0.0.11 dependency
THIRD_PARTY_LICENSES.txt Added license information for new dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

transport: {
type: 'http',
url: mcpServerUrl,
} as Parameters<typeof createMCPClient>[0]['transport'],
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The type assertion as Parameters<typeof createMCPClient>[0]['transport'] suggests a type mismatch. Consider defining a proper type for the HTTP transport configuration or verifying that the @ai-sdk/mcp package correctly types the HTTP transport option.

Copilot uses AI. Check for mistakes.
Comment thread packages/server/api/src/app/ai/mcp/docs-tools.ts
Comment thread packages/server/api/src/app/ai/mcp/docs-tools.ts Outdated

const tools = await client.tools();
const searchTool = tools['search'];
const toolsObject = tools instanceof Map ? Object.fromEntries(tools) : tools;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the changes here are needed because the new package could return it as a map, so we cast it to an object

'https://raw.githubusercontent.com/openops-cloud/openops/main/ai-prompts',
[AppSystemProp.SUPERSET_MCP_SERVER_PATH]: '/root/.mcp/superset',
[AppSystemProp.DOCS_MCP_SERVER_PATH]: '/root/.mcp/docs.openops.com',
[AppSystemProp.DOCS_MCP_SERVER_PATH]: 'https://docs.openops.com/mcp',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@bigfluffycookie bigfluffycookie changed the title Use ai-sdk/mcp package for new mint mcp endpoint Use ai-sdk/mcp package for new mint doc endpoint Dec 9, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 9, 2025

@maor-rozenfeld maor-rozenfeld merged commit 9127a62 into main Dec 10, 2025
24 checks passed
@maor-rozenfeld maor-rozenfeld deleted the lb/aimcp branch December 10, 2025 10:57
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