Skip to content

Install for OpenCode

Add the server to opencode.json in a project root, or ~/.config/opencode/opencode.json for a global install:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"persql": {
"type": "remote",
"url": "https://mcp.persql.com",
"enabled": true
}
}
}

OpenCode connects over remote MCP and runs the OAuth flow on the first tool call — sign in, pick a workspace, and the token is stored automatically. No header to paste.

If your OpenCode build doesn’t drive interactive OAuth for remote servers yet, create a psql_live_… token under console.persql.comAPI tokens and pass it as a header:

{
"mcp": {
"persql": {
"type": "remote",
"url": "https://mcp.persql.com",
"enabled": true,
"headers": {
"Authorization": "Bearer psql_live_…"
}
}
}
}

About sixty SQL-shaped tools. The full list is in the MCP reference.