Configure Claude Code
Connect the Claude Code CLI to your Datasentinel MCP server, sign in, install the Datasentinel Skill, and verify the configuration.
This page shows how to wire the Claude Code CLI to your Datasentinel platform
Add the MCP server
Sign in once
Install the Skill that tells the assistant how to use it
Check that everything is connected.
The same pattern applies to other MCP-and-Skill-capable assistants; the commands below are specific to Claude Code.
Before you start
Claude Code is installed and you can run
claudefrom a terminal.Your Datasentinel MCP server is reachable over HTTPS at
https://<public-host>/mcp. See MCP Server Setup if it is not yet running.
Set it up
Add the Datasentinel MCP server
For the full reference, see Claude Code's Connect Claude Code to tools via MCP guide.
Register the server with the streamable-HTTP transport:
claude mcp add --transport http datasentinel-production https://<public-host>/mcpChoose where the configuration is stored with --scope:
local (default)
~/.claude.json
You, in the current project only
project
.mcp.json at the repo root
The whole team, via version control
user
~/.claude.json
You, across all your projects
For a server you want available everywhere, add --scope user:
claude mcp add --scope user --transport http datasentinel-production https://<public-host>/mcpSelf-signed or invalid certificate
If your platform serves the /mcp endpoint with a self-signed or otherwise invalid TLS certificate, Claude Code rejects the connection by default.
Trust your CA or certificate. When the certificate comes from an internal CA that is not in the system store, or is self-signed, point Claude Code at the PEM file with NODE_EXTRA_CA_CERTS. Validation stays on, and the public roots stay trusted:
export NODE_EXTRA_CA_CERTS=/path/to/ca-cert.pem
claudeSee Anthropic's Custom CA certificates reference.
NODE_TLS_REJECT_UNAUTHORIZED=0 claudeexport NODE_TLS_REJECT_UNAUTHORIZED=0{
"theme": "light",
"tui": "fullscreen",
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}
}Sign in to the platform
With a browser
Start an interactive claude session and open the MCP panel:
/mcpSelect the Datasentinel server, then choose Authenticate. Claude Code opens the Datasentinel login page in your browser: sign in with your platform login and password, the same ones as the Datasentinel web interface. The page names the assistant that is asking; after the sign-in the browser hands the session back to Claude Code, and the server shows as connected.
You sign in once. Claude Code renews the session by itself and asks again only after ten days without using the server, or when an administrator ends the session. Your password goes to the login page only; Claude Code never sees it and never asks for a token.
Without a browser
On a server without a browser (an SSH session, a build machine), run the sign-in from the shell. claude mcp login detects that no browser is available and prints the link instead of opening one; --no-browser forces that mode:
claude mcp login datasentinel-production --no-browserOpen the link on your laptop and sign in, then paste the full address you are redirected to (from the browser's address bar) back into the terminal. The paste step needs an interactive terminal, so open the SSH session with ssh -t. The full procedure, including the SSH port-forward alternative, is in How authentication works.
For a script or a scheduled run
Where nobody can sign in, register the server with a user token as an authorization header instead. The token is the 24-hour user token of the platform, read from an environment variable rather than written in the configuration:
claude mcp add --scope user --transport http datasentinel-production https://<public-host>/mcp \
--header 'Authorization: Bearer ${DS_TOKEN}'Keep the single quotes: they store the ${DS_TOKEN} reference itself in ~/.claude.json, and Claude Code expands it from its own environment each time it connects. With double quotes the shell would expand the variable first, and the token itself would be saved in the file. See Environment variable expansion in Anthropic's MCP guide.
A server registered with a header never opens the login page; when the token expires, the calls fail until a fresh one is set. See Refresh the user token automatically to keep it current.
Install the Datasentinel Skill
For how Claude Code discovers and manages Skills, see its Extend Claude with Skills reference.
The Datasentinel Skill is made of several files (a SKILL.md entrypoint plus supporting files) and ships as a single archive, datasentinel-skill.zip.
Download it from https://app.datasentinel.io/ds-api/download/datasentinel-skill.zip.
Skills in Claude Code are file-based: there is no install command.
Create the Skills directory if it does not exist yet, then unzip the archive into it so it produces a datasentinel/ folder. Claude Code picks up a Skill added to an existing Skills directory within the running session. If you just created the directory, run /reload-skills in the session (or start a new one) so Claude Code finds it.
mkdir -p ~/.claude/skills/
unzip datasentinel-skill.zip -d ~/.claude/skills/You should end up with ~/.claude/skills/datasentinel/SKILL.md (or .claude/skills/datasentinel/SKILL.md) alongside the Skill's supporting files. Each Skill lives in its own directory whose SKILL.md is the entrypoint. Its frontmatter carries the description the assistant uses to decide when to apply the Skill:
---
name: datasentinel
description: How to query Datasentinel metrics through the datasentinel-* MCP servers.
---
<instructions for using the Datasentinel MCP tools>Check your configuration
List the configured servers and their connection status:
claude mcp listA healthy entry shows ✔ Connected. A server you have not signed in to yet shows ! Needs authentication: go back to the sign-in step. Other states you might see are ✘ Failed to connect (check the URL and that the server is up), or ! Connected · tools fetch failed.
Inspect one server in detail (transport, URL, status, tool count):
claude mcp get datasentinel-productionInside an interactive claude session, you can also use the slash commands:
/mcpopens a panel listing connected servers, their status and tool counts, and lets you authenticate or reconnect./skillslists the loaded Skills, so you can confirmdatasentinelappears.
To remove a server, sign out first, then remove it (optionally pin the scope with --scope if it exists at several levels). claude mcp remove deletes the stored session on this host but does not end it on the platform; claude mcp logout does both:
claude mcp logout datasentinel-production
claude mcp remove datasentinel-productionApprove the Datasentinel tools
The first time the assistant calls a Datasentinel tool, Claude Code asks for permission. Choose Yes, and don't ask again to save a rule for that tool, or add one rule for the whole server so no Datasentinel tool ever prompts. Rules name the server as registered, prefixed with mcp__; open /permissions to add it, or put it in ~/.claude/settings.json for all your projects (.claude/settings.json for one project):
{
"permissions": {
"allow": ["mcp__datasentinel-production__*"]
}
}mcp__<server>__* covers every tool of the server; a single tool is mcp__datasentinel-production__get_platform_status. Since Claude Code 2.1.299 an allow rule reaches only the server it names, written with the server's whole name (dots and spaces in the name become _). The Datasentinel tools only read monitoring data, so allowing the whole server is safe. The same rule can be passed for one run with --allowedTools "mcp__datasentinel-production__*". --dangerously-skip-permissions skips the prompts for tools of every kind, including shell commands and file edits; Anthropic recommends it only in isolated environments such as containers or VMs. The rule syntax is in Claude Code's Configure permissions reference.
Once the server shows ✔ Connected and the Skill appears under /skills, run through the checks below to confirm the end-to-end flow.
How the Skill loads
The Datasentinel Skill loads on demand.
Claude Code reads every Skill's name and description at startup, and pulls in the full instructions automatically when your request relates to Datasentinel: asking about PostgreSQL performance, instances, sessions, or the platform itself is enough.
One Skill serves every platform, because it discovers all the datasentinel-* MCP servers you registered, so adding a second platform needs no Skill change.
If Claude answers generically instead (no Datasentinel tool calls in the response), load the Skill manually:
Invoke it directly as a slash command: type
/datasentinelfollowed by your request, for example/datasentinel status.Or name it in the prompt:
Use the datasentinel skill to check the platform status.
If /datasentinel does not autocomplete at all, the Skill is not discovered: re-check the unzip location from the setup step, then run /reload-skills or start a new session.
If you also enabled the Datasentinel Skill on claude.ai, Claude Code syncs that copy too: /datasentinel runs the local Skill, and the synced one answers as /anthropic-skills:datasentinel.
Test the MCP server and Skill
Run these checks inside an interactive claude session.
First, confirm the Skill is loaded:
datasentinel should appear in the list. If it does not, re-check the unzip location from the previous step, then run /reload-skills or start a new session.
Then exercise the MCP connection through the Skill's built-in commands. Run them in order:
/datasentinel help
Displays the Skill's help, listing the available commands.
/datasentinel platforms
Lists every MCP server (platform) the Skill discovered by its datasentinel- prefix.
/datasentinel status
Checks the platform status, confirming the MCP server answers and the sign-in is in place.
/datasentinel whoami
Shows who the session is connected as: platform, identity, privilege, real-time access, style, language.
These four are the setup checks. The full command list, with what each one needs, is in the Skill commands reference.
Start with /datasentinel help to confirm the Skill responds; it needs no sign-in. Then run /datasentinel platforms to verify your server is discovered: each datasentinel-* MCP server you registered should appear in the list.
Run /datasentinel status to confirm the platform is reachable and the MCP tools return live data; if the server is not signed in yet, the Skill tells you how to do it.
Finally, /datasentinel whoami confirms the account the session runs under and the communication style the assistant will use.
Last updated