diff --git a/apps/cloud/src/web/shell.tsx b/apps/cloud/src/web/shell.tsx
index a8f4825d9..53cdd4656 100644
--- a/apps/cloud/src/web/shell.tsx
+++ b/apps/cloud/src/web/shell.tsx
@@ -101,7 +101,7 @@ function SourceList(props: { pathname: string; onNavigate?: () => void }) {
].join(" ")}
>
- {s.name}
+ {s.name}
{s.kind}
diff --git a/packages/plugins/mcp/src/sdk/plugin.ts b/packages/plugins/mcp/src/sdk/plugin.ts
index ed7d3b811..7bbd031df 100644
--- a/packages/plugins/mcp/src/sdk/plugin.ts
+++ b/packages/plugins/mcp/src/sdk/plugin.ts
@@ -719,7 +719,7 @@ export const mcpPlugin = definePlugin((options?: McpPluginOptions) => {
);
const existing = yield* ctx.storage.getSource(namespace, scope);
- const sourceName = manifest.server?.name ?? existing?.name ?? namespace;
+ const sourceName = existing?.name ?? manifest.server?.name ?? namespace;
yield* ctx
.transaction(
@@ -782,13 +782,24 @@ export const mcpPlugin = definePlugin((options?: McpPluginOptions) => {
...(input.auth !== undefined ? { auth: input.auth } : {}),
...(input.queryParams !== undefined ? { queryParams: input.queryParams } : {}),
};
+ const nextName = input.name?.trim() || existing.name;
- yield* ctx.storage.putSource({
- namespace,
- scope,
- name: input.name?.trim() || existing.name,
- config: updatedConfig,
- });
+ yield* ctx.transaction(
+ Effect.gen(function* () {
+ yield* ctx.storage.putSource({
+ namespace,
+ scope,
+ name: nextName,
+ config: updatedConfig,
+ });
+ yield* ctx.core.sources.update({
+ id: namespace,
+ scope,
+ name: nextName,
+ url: updatedConfig.endpoint,
+ });
+ }),
+ );
}).pipe(
Effect.withSpan("mcp.plugin.update_source", {
attributes: { "mcp.source.namespace": namespace },