{"record":{"id":"0f835d61a35a6113","repo":"FlowiseAI/Flowise","slug":"no-postgres-url-provided","errorCode":null,"errorMessage":"No postgres url provided","messagePattern":"No postgres url provided","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/MCP/PostgreSQL/PostgreSQLMCP.ts","lineNumber":92,"sourceCode":"        const _mcpActions = nodeData.inputs?.mcpActions\n        let mcpActions = []\n        if (_mcpActions) {\n            try {\n                mcpActions = typeof _mcpActions === 'string' ? JSON.parse(_mcpActions) : _mcpActions\n            } catch (error) {\n                console.error('Error parsing mcp actions:', error)\n            }\n        }\n\n        return tools.filter((tool: any) => mcpActions.includes(tool.name))\n    }\n\n    async getTools(nodeData: INodeData, options: ICommonObject): Promise<Tool[]> {\n        const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n        const postgresUrl = getCredentialParam('postgresUrl', credentialData, nodeData)\n\n        if (!postgresUrl) {\n            throw new Error('No postgres url provided')\n        }\n\n        const packagePath = getNodeModulesPackagePath('@modelcontextprotocol/server-postgres/dist/index.js')\n\n        const serverParams = {\n            command: 'node',\n            args: [packagePath, postgresUrl]\n        }\n\n        const toolkit = new MCPToolkit(serverParams, 'stdio')\n        await toolkit.initialize()\n\n        const tools = toolkit.tools ?? []\n\n        return tools as Tool[]\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/MCP/PostgreSQL/PostgreSQLMCP.ts#L74-L110","documentation":"Thrown by PostgreSQLMCP.getTools when the bound credential has no 'postgresUrl'. The node spawns the @modelcontextprotocol/server-postgres stdio process passing the URL as an argument, so an empty URL would start the server with no database and is rejected up front.","triggerScenarios":"The PostgreSQL_MCP node's credential is missing or its 'postgresUrl' field is empty when getTools/init runs.","commonSituations":"No credential selected; credential selected but postgresUrl blank; credential was created from a different schema; connection string field renamed/migrated.","solutions":["Open the PostgreSQL_MCP node and bind a PostgreSQL credential.","In that credential, set postgresUrl to a full connection string (e.g. postgresql://user:pass@host:5432/db).","Confirm the package @modelcontextprotocol/server-postgres is installed so packagePath resolves.","Save and retry."],"exampleFix":"// before: postgresUrl is empty\n// after:  postgresql://user:password@localhost:5432/mydb","handlingStrategy":"validation","validationCode":"const credentialData = await getCredentialData(nodeData.credential ?? '', options)\nconst postgresUrl = getCredentialParam('postgresUrl', credentialData, nodeData)\nif (!postgresUrl || !postgresUrl.trim()) {\n    throw new Error('No postgres url provided')\n}","typeGuard":"function isPostgresUrl(s: string): boolean {\n    return /^postgres(?:ql)?:\\/\\/.+/i.test(s.trim())\n}","tryCatchPattern":"try { await pgMcp.getTools(nodeData, options) }\ncatch (e) { if (e instanceof Error && e.message === 'No postgres url provided') { /* bind postgresUrl credential */ } }","preventionTips":["Make postgresUrl required in the credential component and validate the scheme on save.","Test the connection string against the database during credential setup."],"tags":["postgres","database","mcp","credentials","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}