How authentication works
What happens when an assistant connects to the Datasentinel MCP server: you sign in once in your browser and the assistant keeps the session alive; scripts use a user token instead.
The Datasentinel MCP server is protected by OAuth 2.1, the authorization standard every MCP-capable assistant implements. You never paste a token and you never type a password into a conversation. You sign in once, in your browser, on the Datasentinel login page, and the assistant takes it from there.
What you see
The assistant asks to authenticate
The first time an assistant uses the Datasentinel MCP server, the server tells it that authentication is needed. Each assistant shows this in its own way: an Authenticate action in Claude Code's /mcp panel, a Connect button in the Claude connector settings, a sign-in card in Copilot, a prompt next to the server in an IDE.
You sign in on the Datasentinel login page
The assistant opens the Datasentinel login page in your browser. The page names the assistant that is asking and where you will be sent back afterwards. Sign in with your platform login and password, the same ones you use for the Datasentinel web interface. Your password goes to that page only: the assistant never sees it.

You are back in the assistant
The browser hands the assistant back a code, the assistant exchanges it for a token, and every tool call from then on is made as you. Your instances, your communication style (TECHNICAL or PLAIN) and your real-time access follow from the account you signed in with. Run whoami at any time to see who the session is connected as.
Behind the scenes
The assistant registers itself with the platform once, then identifies itself on every sign-in.
The access token is a Datasentinel user token that lives one hour; it carries your email, so the platform applies your rights to every call.
The refresh token lets the assistant renew the access token without you. It lives ten days and is renewed at every refresh, so an assistant you use at least every ten days never sends you back to the login page.
Every sign-in, renewal and refusal is recorded in the platform's MCP log under your email.
What it looks like in each assistant
Claude Code
/mcp, select the Datasentinel server, Authenticate
Claude desktop app, Claude web, Claude mobile
Settings → Connectors → Connect (or Reconnect) on the Datasentinel connector
Codex CLI, Copilot CLI, other CLIs
The client's own MCP login command or the sign-in prompt shown next to the server
Mistral Vibe CLI
vibe mcp add starts it; later, /mcp login <server> inside Vibe
Google Antigravity CLI
/mcp, select the server, Authenticate; paste back the code shown after the sign-in
Deep Agents Code, Hermes Agent
dcode mcp login <server> or hermes mcp login <server>; both accept the redirect address pasted back
Visual Studio Code
The authentication prompt when the server starts, after the trust prompt
Cursor
Needs login next to the server on the MCP page
ChatGPT
The sign-in step of the custom app
Microsoft 365 Copilot, Copilot Studio
The Sign in card shown in the chat
Google Gemini app
The sign-in step when you add the custom app in the Gemini web app
Each configuration guide in this section shows the exact step for its assistant.
Sign in from a server without a browser
A CLI running on a server over SSH cannot open a browser, but the sign-in still works: the browser runs on your laptop, and only the way back to the assistant needs help.
Start the sign-in in the mode that prints the link instead of opening a browser:
The assistant prints the sign-in URL.
Open it in the browser of your laptop and sign in.
The browser is sent to a
localhostaddress that fails to load on the laptop. That is expected: copy the complete URL from the address bar.Paste it at the prompt in the terminal. The assistant completes the sign-in and stores the session on the server.
The link is valid ten minutes, so do the copy and paste in one go. From then on every run of the assistant on that server reuses the session.
Most other CLIs, and every Python agent, only know how to wait for the browser on localhost. Make the laptop's localhost reach the server with a port forward, using a fixed port on both sides:
The assistant prints the sign-in URL; open it in the laptop's browser and sign in. The way back to localhost:8080 travels through the tunnel to the assistant on the server, with nothing to paste.
Scripts and scheduled jobs
A scheduled job, a Python agent or a CI pipeline has nobody to sign in. For them, use a user token instead of the sign-in: the same token the platform API uses, obtained in one of two ways and valid 24 hours.
From the web interface: the button in the top right corner of the Datasentinel interface copies your user token.
From the API, with your platform login and password:
The response is { "user-token": "<token>" }. Configure that value in the client as an Authorization: Bearer <token> header, always through an environment variable or a secret store, never as a literal in a file. The MCP server accepts it exactly like a token obtained by signing in: the job runs with your rights, and its calls are recorded under your email.
A user token is not renewed by the server: after 24 hours the calls answer 401 and a fresh token is needed. The Developers section provides a script that keeps a valid token cached for scheduled runs, and shows a Python agent that uses it.
A scheduled run does not always need a token. A CLI assistant started by cron on a host where you already signed in reuses that session, and so does an assistant's own scheduler. See Run recurring analyses.
Security notes
Your login and password go to the Datasentinel login page only, served by your platform. No assistant, and no assistant vendor, ever sees them.
An assistant holds a token that identifies you: your instances, your communication style and your real-time access apply to everything it does, and the platform's audit trail records it under your email.
Every analysis stays read-only and transits through the platform. No PostgreSQL credential is ever known to an assistant.
An administrator can end a session at any time (see Manage assistant sessions), and deleting a platform user takes effect immediately.
Last updated