Draft
Conversation
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Alexis Rico <sferadev@gmail.com>
This commit introduces support for different types of MCP (Managed Component Process) servers, allowing for remote server configurations in addition to the existing stdio-based ones.
Key changes:
1. **Schema Updates:**
* Added a new PostgreSQL enum `mcp_server_type` with values: `stdio`, `sse` (Server-Sent Events), and `streamable-http`.
* The `mcp_servers` table now includes:
* A `type` column (of `mcp_server_type`, defaulting to `stdio`).
* A nullable `url` column (text) to store the endpoint for remote servers.
* A database migration (`0009_mcp_server_type_and_url.sql`) has been added.
* `MCPServer` and `MCPServerInsert` types in `schema.ts` are updated accordingly.
2. **Backend Logic:**
* CRUD functions in `apps/dbagent/src/lib/db/mcp-servers.ts` (`addUserMcpServerToDB`, `updateUserMcpServer`) now handle the `type` and `url` fields.
* API routes under `apps/dbagent/src/app/api/mcp/servers/` have been updated:
* Request bodies and responses now include `type` and `url`.
* Zod validation schemas are in place for these new fields, including logic to require `url` for `sse` and `streamable-http` types.
3. **UI Enhancements:**
* The MCP server management table (`mcp-table.tsx`) now displays the `type` and `url` of each server.
* The MCP server creation/editing form (`mcp-view.tsx`):
* Includes a dropdown to select the server `type`.
* Conditionally displays a `url` input field only when `type` is `sse` or `streamable-http`.
* Handles client-side logic to clear/nullify `url` when `type` is `stdio`.
* The `name` field is now editable only during server creation.
* Server actions in `action.ts` have been updated to support the new fields.
These changes enable you to configure and manage MCP servers that operate via stdio, SSE, or streamable HTTP, providing greater flexibility in deploying and integrating managed components.
Signed-off-by: Alexis Rico <sferadev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Alexis Rico sferadev@gmail.com