different-ai/openwork · error

The selected MCP server "${server.name}" URL cannot contain

Error message

The selected MCP server "${server.name}" URL cannot contain credentials or a fragment.

What it means

Error "The selected MCP server "${server.name}" URL cannot contain credentials or a fragment." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts:117

  if (url.username || url.password || url.search || url.hash) {
    throw new Error("GitHub plugin URLs cannot include credentials, query parameters, or fragments.");
  }
  return url.toString();
}

function validateSelectedServerUrl(server: PluginImportServer): void {
  if (!server.url) throw new Error(`The selected MCP server "${server.name}" does not have a remote URL.`);
  let url: URL;
  try {
    url = new URL(server.url);
  } catch {
    throw new Error(`The selected MCP server "${server.name}" has an invalid URL.`);
  }
  if (url.protocol !== "https:") {
    throw new Error(`The selected MCP server "${server.name}" must use HTTPS.`);
  }
  if (url.username || url.password || url.hash || hasCredentialQuery(url)) {
    throw new Error(`The selected MCP server "${server.name}" URL cannot contain credentials or a fragment.`);
  }
}

export function parsePluginImportPreview(payload: unknown): PluginImportPreview {
  const item = isRecord(payload) && isRecord(payload.item) ? payload.item : null;
  if (!item) throw new Error("GitHub plugin import preview response was incomplete.");

  return {
    repositoryFullName: typeof item.repositoryFullName === "string" ? item.repositoryFullName : "",
    rootPath: typeof item.rootPath === "string" ? item.rootPath : "",
    servers: Array.isArray(item.servers)
      ? item.servers.flatMap((entry) => {
          if (!isRecord(entry) || typeof entry.name !== "string") return [];
          return [{
            name: entry.name,
            serverKey: typeof entry.serverKey === "string" ? entry.serverKey : `${entry.name}:${typeof entry.url === "string" ? entry.url : ""}`,
            url: typeof entry.url === "string" ? entry.url : null,
            supported: entry.supported === true,

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts:117 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/a8ca1b9ee79c7b61. Report an issue: GitHub.