feat: move MCP to /mcp and add teammate operations (#500)

* feat(operations): move MCP to /mcp and add search, comment, metadata, version, and upload operations

- Serve the MCP server at /mcp instead of /api/mcp
- Add search_assets, copy_assets, get_folder_instructions, list_comments,
  create_comment, resolve_comment, list_metadata_fields,
  update_asset_metadata, create_version_stack, list_versions, and
  remove_version on the agent, MCP, and CLI
- Add create_file and create_version (agent, MCP) with Creation Context
  metadata, and complete_upload (MCP) for presigned two-step uploads
- Replace the native agent create_file/create_version tools with
  Operation-backed ones
- Route the comment-complete, metadata, copy, version stack, and
  AGENTS.md read REST endpoints through their Operations

* docs(readme): add built-in MCP server and CLI to features list
This commit is contained in:
Yiling-J
2026-10-27 14:37:26 +08:00
committed by GitHub
parent 50fbd97953
commit b3cae4f2b0
81 changed files with 4111 additions and 1397 deletions
+8 -3
View File
@@ -42,11 +42,9 @@ const apiRoute = new Hono<{ Variables: { user: User } }>()
.route('/', localUploadRoute)
.route('/', mcpOauthCallbackRoute)
// Programmatic endpoints: API token required, session cookies not accepted
// Programmatic endpoint for the CLI: API token required, session cookies not accepted
.use('/ops/*', requireApiTokenMiddleware)
.use('/mcp', requireApiTokenMiddleware)
.route('/', operationsRoute)
.route('/', mcpServerRoute)
// Selected routes supporting API token authentication
.use('/projects', tokenAuthMiddleware)
@@ -82,6 +80,13 @@ const apiRoute = new Hono<{ Variables: { user: User } }>()
.route('/', kanbanRoute)
.route('/', mediaGenerationRoute)
// Shumai's MCP server lives at the root (`/mcp`), next to the API rather than inside it, so
// it can also be served from a dedicated host (e.g. `https://mcp.example.com/mcp`). It takes
// API tokens only. The `/api/mcp/servers` routes are a separate feature: external MCP servers
// that Shumai's own agent connects to.
app.use('/mcp', requireApiTokenMiddleware)
app.route('/', mcpServerRoute)
app.route('/files', s3Route)
// eslint-disable-next-line @typescript-eslint/no-unused-vars