Connect to the MCP Server Using Token-Based Authentication
To connect the Cline extension for VS Code to your MCP Server using
mcp-remote with a registered Public Client, you need to
configure the server within VS Code and then complete the authentication flow
through a browser prompt.
-
Install
mcp-remote.Use the following command :
npm install -g mcp-remote -
Edit the
cline_mcp_settings.jsonfile:{ "mcpServers": { "dbtools-mcp-server": { "disabled": false, "timeout": 60, "type": "stdio", "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.…./actions/invoke", "8080", "--transport", "http-only", "--static-oauth-client-metadata", "{ \"scope\": \"https://mcp." }", "--static-oauth-client-info", "{ \"client_id\": \"xxxx\" }" ] } } }Ensure your OAuth Public Client is configured with this redirect URI:
http://localhost:8080/oauth/callback.Note
The port (8080) must match the port number you pass to mcp-remote in the JSON configuration file.After you sign in, mcp-remote stores tokens locally on your machine.
Example:
~/.mcp-auth/mcp-remote-N.N.NN/xxxxx_tokens.json -
Restart VS Code, then connect to dbtools-mcp-server in Cline. Your browser opens to complete the sign-in and approve access.