TablePro
TablePro is a database client for browsing, querying, and managing databases. Protocol Launcher allows you to generate TablePro URL scheme links.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
Notes
TablePro documents the tablepro:// scheme for GUI navigation and integration bootstrap flows. The scheme covers navigating to a connection, table, or query tab, plus MCP pairing and integration bootstrapping. Data exchange is not part of the URL scheme.
Connection paths use the connection UUID, not the display name. TablePro removed older tablepro://connect/<name>/... paths in version 0.37, so this module only generates UUID-keyed URLs.
The query URL opens a new query tab with SQL pre-filled; TablePro shows a confirmation dialog and does not auto-execute the SQL. TablePro documents a 51,200-character cap for SQL passed through the URL scheme. Connection import URLs never accept passwords.
Connect
Open a saved TablePro connection by UUID.
import { connect } from 'protocol-launcher/tablepro'
const url = connect({
connectionId: '9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1',
})Open Table
Open a table in the current database, in a specific database, or in a specific database and schema.
import { openTable } from 'protocol-launcher/tablepro'
const currentDatabaseUrl = openTable({
connectionId: '9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1',
table: 'users',
})
const databaseUrl = openTable({
connectionId: '9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1',
database: 'analytics',
table: 'events',
})
const schemaUrl = openTable({
connectionId: '9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1',
database: 'app',
schema: 'reporting',
table: 'daily_events',
})Open Query
Open a new query tab with SQL pre-filled.
import { openQuery } from 'protocol-launcher/tablepro'
const url = openQuery({
connectionId: '9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1',
sql: 'SELECT * FROM users LIMIT 10',
})Pair
Start a TablePro MCP pairing flow. TablePro returns a one-time code via the redirect URL after user approval. The requested scopes values documented by TablePro are readOnly, readWrite, and fullAccess. If omitted, scopes defaults to readOnly and connection-ids defaults to all. The query parameters are a request, not a grant.
import { pair } from 'protocol-launcher/tablepro'
const url = pair({
client: 'Raycast on macbook-pro',
challenge: 'REPLACE_WITH_PKCE_CHALLENGE',
redirect: 'raycast://extensions/ngoquocdat/tablepro/pair-callback',
scopes: ['readOnly', 'readWrite'],
connectionIds: ['9f1f0c3e-2e3d-4b14-9c3a-1d2f4ad1f6f1'],
})Start MCP
Lazy-start the TablePro MCP server. TablePro starts the server on a free port in the 51000-52000 range and writes a handshake file at ~/Library/Application Support/TablePro/mcp-handshake.json.
import { startMCP } from 'protocol-launcher/tablepro'
const url = startMCP()Import Connection
Create a saved connection from URL parameters and open TablePro's connection editor for review. Required parameters are name, host, and type.
import { importConnection } from 'protocol-launcher/tablepro'
const url = importConnection({
name: 'Staging',
host: 'db.example.com',
port: 5432,
type: 'postgresql',
username: 'admin',
database: 'mydb',
safeModeLevel: 'readOnly',
aiPolicy: 'askEachTime',
ssh: 1,
sshHost: 'bastion.example.com',
sshAuthMethod: 'privateKey',
sshPrivateKeyPath: '/Users/me/.ssh/id_ed25519',
sslMode: 'verify-full',
sslCaCertPath: '/Users/me/certs/ca.pem',
af_replicaSet: 'myrs',
})Core parameters from the official URL scheme are port, username, database, color, tagName, groupName, safeModeLevel, and aiPolicy. safeModeLevel accepts silent, alert, alertFull, safeMode, safeModeFull, or readOnly. aiPolicy accepts useDefault, alwaysAllow, askEachTime, or never.
SSH parameters from the official URL scheme are sshHost, sshPort, sshUsername, sshAuthMethod, sshPrivateKeyPath, sshUseSSHConfig, sshAgentSocketPath, sshJumpHosts, and sshTotpMode. Set ssh=1 to enable SSH tunneling. sshAuthMethod accepts password, privateKey, agent, or keyboardInteractive.
SSL parameters from the official URL scheme are sslMode, sslCaCertPath, sslClientCertPath, and sslClientKeyPath. sslMode accepts disabled, preferred, required, verify-ca, or verify-full.
Plugin-specific fields use the official af_ prefix. For example, af_replicaSet=myrs passes replicaSet to the MongoDB plugin.