Skip to content

Conversation

SferaDev
Copy link
Member

Signed-off-by: Alexis Rico [email protected]

Signed-off-by: Alexis Rico <[email protected]>
Copy link

vercel bot commented May 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
agent ❌ Failed (Inspect) May 21, 2025 6:51am

Signed-off-by: Alexis Rico <[email protected]>
google-labs-jules bot and others added 2 commits May 20, 2025 19:25
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 <[email protected]>
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.

1 participant