Evidence

Connect your own systems (MCP)

Many incidents can’t be explained from the code alone: the order is stuck in the warehouse system, a job stopped running, a subscription lapsed. Connect your systems through an MCP server, and the investigation can look those facts up and cite them, read-only.

What it’s for

Anything your team would check by hand while debugging. For example:

  • Orders and fulfilment: an order’s payment, fulfilment and shipping state, whichever system holds it.
  • Billing and accounts: a customer’s plan, subscription state, failed payments.
  • Your database: rows from reporting views, through a read-only user.
  • Internal tools: admin APIs, job and queue status, feature flags, configuration.

During an investigation, Second Shift decides when a lookup helps (for example “is order 1042 assigned to a warehouse?”), calls the tool, and shows what it found under Why we think this on the incident and in the fix pull request.

1. Get an MCP server

MCP (Model Context Protocol) is an open standard for giving AI agents tools. Second Shift connects to your server as a client, over HTTPS. Two ways to get one:

  • Your product already has one. Many products and databases now offer an MCP server. If it speaks Streamable HTTP or SSE and you can give it a read-only credential, connect it directly.
  • Build a small one from our template. About a hundred lines: one tool that reads allow-listed database views, one that reads records from an internal API. Keep what you need, edit the lists, deploy.
Template fileWhat it is
src/server.tsThe server, with the two example tools and their allow-lists
package.jsonDependencies and the start script
tsconfig.jsonTypeScript settings
README.mdHow to run, deploy and keep it read-only
npm install
MCP_TOKEN=$(openssl rand -hex 24) \
DATABASE_URL=postgres://second_shift_readonly:...@db.internal/app \
INTERNAL_API_URL=https://admin.internal.example.com/api \
INTERNAL_API_TOKEN=... \
npm start

Deploy it anywhere that gives it an https address reachable from the internet. Second Shift refuses plain http and private network addresses.

2. Connect it

  1. Open the project

    In Second Shift, open Projects. On the project, next to Your own systems (MCP), click Connect.

  2. Add the server

    Give it a name your team will recognise (e.g. Orders API) and its URL, e.g. https://mcp.yourcompany.com/mcp.

    Auth value: what your server expects in the Authorization header, e.g. Bearer <MCP_TOKEN>. It is stored encrypted and never shown again. Another header name is possible under Use a different header.

  3. Choose the tools

    Second Shift lists the server’s tools. Tools the server marks read-only are allowed; the others start off. Allow a tool only if it just reads, then click Save allowed tools.

The next investigation of that project can use the allowed tools. The fix agent can use them too, to confirm a fact before it changes code.

Keeping it safe

  • Read-only credentials. Give the server a database user with SELECT on specific views and API tokens with read scopes. Second Shift never asks a tool to change anything, but a read-only credential makes sure of it.
  • Only allowed tools. The agent sees the tools you checked and nothing else. Calls are limited in time, size and number per investigation.
  • Little personal data. Return what an investigation needs. Second Shift keeps short excerpts of what it used, with emails, international phone numbers and credentials masked, for as long as the incident.
  • Your network stays yours. The server is reached over HTTPS at the address you give; redirects are refused, so a public address cannot lead into a private network.
  • Results are data. Second Shift treats what your tools return as evidence, never as instructions.
Status and errors
The project shows whether each server is reachable. Check connects again and refreshes its list of tools; if a tool disappears from your server, it stops being offered.