-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add Hosted MCP server authoring, deploy pipeline, and CLI scaffolding #1930
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
base: main
Are you sure you want to change the base?
Conversation
|
@MagellaX is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR introduces comprehensive hosted MCP server infrastructure, enabling users to author, version, and deploy Model Context Protocol servers directly within Sim. The implementation includes:
Key Implementation Details:
Technical Concerns:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant UI as Workspace UI
participant API as REST API
participant DB as Database
participant TriggerDev as Trigger.dev
participant Orchestrator as Hosted Orchestrator
participant McpService as MCP Service
User->>UI: Create MCP Project
UI->>API: POST /api/mcp/projects
API->>DB: Insert mcp_server_project
DB-->>API: Project Created
API-->>UI: Project Details
User->>UI: Create Version & Deploy
UI->>API: POST /api/mcp/projects/{id}/versions
API->>DB: Insert mcp_server_version
DB-->>API: Version Created (status: queued)
UI->>API: POST /api/mcp/projects/{id}/deployments
API->>DB: Insert mcp_server_deployment (status: pending)
DB-->>API: Deployment Created
API->>TriggerDev: Trigger mcp-server-deploy task
API-->>UI: Deployment Initiated
TriggerDev->>DB: Update version status to 'building'
TriggerDev->>DB: Update deployment status to 'deploying'
TriggerDev->>Orchestrator: buildHostedBundle()
Orchestrator-->>TriggerDev: artifactUrl, runtimeMetadata, logsUrl
TriggerDev->>Orchestrator: activateHostedDeployment()
Orchestrator-->>TriggerDev: endpointUrl, logsUrl
TriggerDev->>DB: Upsert mcp_servers (kind: hosted)
DB-->>TriggerDev: Server ID
TriggerDev->>DB: Update version (status: ready, artifactUrl)
TriggerDev->>DB: Update deployment (status: active, endpointUrl)
TriggerDev->>McpService: clearCache(workspaceId)
TriggerDev-->>User: Deployment Complete
Note over User,McpService: Hosted server now appears in MCP discovery
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
33 files reviewed, 2 comments
|
Any thoughts @waleedlatif1 |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
eb74eb2 to
6a80571
Compare
|
let me know @waleedlatif1 |
Summary
Adds end-to-end hosted MCP support: new schema/migrations for MCP projects/versions/deployments/tokens, REST + Trigger.dev deploy pipeline that spins up hosted servers and wires them into the existing MCP discovery/execution flow, a workspace UI at
/workspace/:id/mcpto manage projects, and asimstudio mcp initCLI command that scaffolds a ready-to-use Reddit/arXiv MCP template. Hosted deployments now show up as first-class MCP servers the moment they go live.Fixes #1553
Type of Change
Testing
bun test apps/sim/lib/mcp/project-service.test.ts(slug normalization/unit coverage)drizzle-kit generate.Checklist