Skip to content

[FEATURE]:MCP with delete and update #4570

@wan-kong

Description

@wan-kong

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I love this project 👍
In MCP part ,has the statusand add function, so ,it looks can dynamically load mcp
Maybe can add update and delete to pretter manager it ?

here is my demo try:

// code in packages/opencode/src/mcp/index.ts

export async function update(key: string, mcp: Config.Mcp) {
  await remove(key)
  // shoule add rollback logic ?
  return await add(key, mcp)
}

export async function remove(key: string) {
  const s = await state()
  const existing = s.clients[key]

  if (!existing) {
    log.info("remove() client not found", { key })
    return true
  }
  await existing.close()
  delete s.clients[key]

  if (s.status[key]) {
    delete s.status[key]
  }

  log.info("remove() successfully removed client", { key })
  return true
}

if this idea can pass, i'm gald to padding other parts: Docs / API Server / JS SDK.

but i don't know how to add in golang sdk ,sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions