How Do I See Who Is Using the CodeHealth™ MCP Server?
If you're an admin, you can use the CodeScene REST API to see how your organisation uses the CodeHealth™ MCP Server. It shows who is using it, how active they are, and what it has done for your code health. This is useful for tracking adoption, checking how many licensed seats are in use, and showing the return on your investment to stakeholders.
Insights vs. Outcomes: which API should I use?
The MCP data is available through two APIs, and they serve different purposes:
The Insights API gives you CodeScene's interpretation of your MCP usage. CodeScene takes the raw MCP events and turns them into ready-made metrics such as adoption percentage, active users, Code Health uplifts and degradations prevented. Use it when you want a quick, reliable answer to "how are we doing?"
The Outcomes API gives you the raw MCP events. Each event comes with its timestamp and Code Health scores, with no summarising applied. Use it when you want to draw your own conclusions, for example by building your own dashboards, joining the data with other internal data, or defining your own measure of "active".
In short, Insights tells you what the data means, and Outcomes gives you the data so you can work it out yourself.
Before you start
You need admin access to see organisation-wide and per-user data. Other users can only see their own data (see "Your own usage" below).
You need an API token. Log in to CodeScene and create a token on the API tokens page.
Endpoints
All requests go to https://api.codescene.io and use your token as a Bearer header.
Optional parameters
pageandpage-size: page through the results. The defaults are page 1 and 100 results per page.fromandto(formatYYYY-MM-DD): limit the insights endpoint to a date range.
Examples
List every MCP user and their activity:
curl -H "Authorization: Bearer <your_token>" \ "https://api.codescene.io/v2/code-health/safeguards/mcp/users?page=1&page-size=100"Get your adoption overview for a date range:
curl -H "Authorization: Bearer <your_token>" \ "https://api.codescene.io/v2/code-health/safeguards/mcp/insights?from=2026-06-01&to=2026-09-30"The insights response includes number-of-users, number-of-active-users, number-of-paid-seats and adoption-percentage. Together these give you a quick picture of how many of your seats are actually being used.
Try it without writing code
Go to api.codescene.io/v2/docs.
Click Authorize and enter
Bearer <your_token>.Find the MCP Safeguards endpoints and click Try it out.
Your own usage
Any user, admin or not, can see their own MCP activity:
GET /v2/code-health/safeguards/mcp/insights/meGET /v2/code-health/safeguards/mcp/outcomes/me?page=1&page-size=100
On-prem installations
On-prem, use your own CodeScene host as the base URL, for example http://<your-codescene-host>/api/v2/.... To create a token, go to Configuration → Authentication → Internal User Management → Personal Access Tokens. To confirm that your version includes the MCP endpoints, check the interactive API docs at http://<your-codescene-host>/api/v2/docs/index.html.