---
title: "Four questions before you connect an MCP server | SONAR"
url: https://getsonar.report/experts/four-questions-before-you-connect-an-mcp-server
description: "A security reviewer’s checklist for MCP servers: where the server listens, how it authenticates, what keys it holds and what it can do with them."
language: en
dateModified: 2026-11-30
---

# Four questions before you connect an MCP server to your data

**In short** (updated 2026-11-30): You already check who you do business with before money moves. Give MCP servers the same check. An MCP server lets an AI agent read files, query a database, or call a payment provider, so it hands that agent real access. After reviewing a lot of these servers, I keep coming back to four questions: where it listens, how it authenticates, what keys it holds, and what it can do with them.

[Practitioner's View by SONAR](https://getsonar.report/experts)

AI agents and MCP servers · 30 November 2026

By Jordan Schlegel

Founder, Bot2Bot Labs · AI agents and MCP servers

30 November 2026 · 5 min read

Written by Jordan Schlegel. Reviewed by SONAR before publication.

Jordan Schlegel, Founder, Bot2Bot Labs

The four questions at a glance, from Jordan Schlegel’s checklist.

## Where does it listen, and who can reach it?

Ask: “When I run this locally, what address does it bind to?”

You want loopback, meaning 127.0.0.1 or localhost, so only programs on the same machine can reach it. Be careful if the answer is 0.0.0.0. That listens on every network interface, which can include the hotel Wi-Fi you’re working from.

Loopback alone isn’t enough. A web page open in your browser can sometimes reach a local server through DNS rebinding. [The MCP specification](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports) says a local Streamable HTTP server should bind to loopback and must reject a request whose Origin header is present but invalid. Ask whether the server checks Host as well as Origin, and whether it rejects requests that fail either check.

Ask about CORS too. A short allowlist is fine. A wildcard is not. Watch for a null origin on the allowlist, since sandboxed pages and local files can send one.

Remote servers are fine, as long as you have to turn remote on yourself.

## How does it authenticate, and is it required?

Ask: “If someone can reach this server, what stops them from using it?”

On loopback with header checks, the machine boundary does most of the work. Anywhere else, the server needs a long, random token on every request, and binding beyond loopback should take an explicit opt-in.

Be wary of these answers:

- “Auth is available if you configure it.” Ask whether it’s required by default.
- “It’s behind our firewall.” Firewalls change. Laptops travel.
- “The token is optional for local use,” paired with a default bind of 0.0.0.0. Then “local” can mean anyone on the same network.

> My rule is simple. Local means loopback with header checks. Anything else means a token and a deliberate choice.

## What keys does it hold, and how much can each one do?

The answer depends on how the server is deployed, not just on its code, so you mostly have to ask.

- Scope. “What is the narrowest permission this server needs?” If it only reads invoices, it shouldn’t hold a key that can issue refunds.
- Storage. “Is the key in an environment variable, a config file, a keychain, or a cloud secrets manager?” Find out who else can read it. A key in a shared repo is shared with everyone who can clone it.
- Rotation. “If I need to revoke this key tonight, what breaks, and how fast can I replace it?” If nobody knows, that’s your answer.
- Separation. “Does each customer or agent get its own key, or do they share one?” With a shared key, it’s hard to tell who did what.

The answers don’t have to be perfect, but somebody has to have them.

## What can it do with those keys?

Ask: “Show me every tool this server exposes, and tell me which ones change something.” Read the tool list yourself. Then push on the claims.

“Read-only.” Some database servers enforce read-only by checking the query text, for example by rejecting anything that doesn’t start with SELECT. Text checks are easy to get wrong. Depending on how they’re written, they can miss:

- a write hidden behind a prefix or wrapper
- a second statement after a semicolon
- a write inside a WITH clause
- SELECT … INTO
- EXPLAIN ANALYZE, which actually runs the statement

It’s safer to let the database refuse writes itself, with a READ ONLY transaction, one statement per call, and a SELECT-only role. Ask which of those the server uses.

Versions. Ask: “Do your install instructions pin a version, or pull latest?” An unpinned install can pick up a newer release you haven’t reviewed. Pin a version and upgrade on purpose.

Irreversible actions. If the server sends email, posts messages, or moves money, ask what happens on a retry. Networks time out. A good design records a claim on the action before doing it and marks it complete afterward. It marks the action failed only if the action definitely didn’t happen. A retry that finds a completed or in-progress claim stops instead of acting again.

That helps, but it isn’t airtight. If the process crashes after the action but before it’s marked complete, nobody knows whether the action happened. In that case, check with the provider before retrying, and use the provider’s idempotency keys where they exist.

## The same-day checklist

Run through this before you connect a server to anything that matters:

- Binds to 127.0.0.1 or localhost by default, not 0.0.0.0.
- Checks Host, checks Origin when present, and rejects mismatches.
- CORS uses a short allowlist, with no wildcard and no null origin.
- Non-local binds require an explicit opt-in and a long, random token.
- Each key has the narrowest scope it needs, lives where you control it, and can be rotated tonight.
- You’ve read the tool list and know which tools write, send, or pay.
- The database enforces read-only with a READ ONLY transaction, one statement per call, and a SELECT-only role, not a text filter.
- Install instructions pin a version, with no bare latest.
- Send, post, and pay actions are claimed first and marked complete after. If the outcome is uncertain, you check with the provider before retrying.

For a head start on the code side, our open-source [mcp-ship-check](https://github.com/bot2botlabs/mcp-ship-check) flags some of these patterns in source, like a risky bind or a text-only read-only check. Treat a flag as something to review, not a verdict. The tool also can’t tell you what keys a server holds.

## What a good response looks like

One more thing tells you a lot about a vendor: how they handle a private security report. I have seen this go well. The maintainer listened and fixed more than the one issue reported. The server now binds to loopback by default and always checks Host and Origin. Remote binding takes an explicit flag and a long token. The container starts in the safer local mode, so people who never read the docs are protected too.

Look for that pattern. The safe setting is the default, and the risky option is clearly marked and off until you turn it on.

## About the author: Jordan Schlegel

Founder, Bot2Bot Labs · AI agents and MCP servers

Jordan Schlegel founded Bot2Bot Labs in Turlock, California, after years as a nonprofit CFO. He has reviewed 194 MCP servers and builds small, open tools for checking them before they ship. Every finding goes privately to the maintainer first.

[bot2botlabs.com](https://bot2botlabs.com/)

The views in this article are the author's own, based on their practice. It is not legal advice, and SONAR is not a regulated AML / KYC provider.

## Know how checks really work where you are?

Publish your own Practitioner's View. A short interview by voice or text, your words, your byline. Free.

[Get your byline](https://getsonar.report/write?ref=contributor_four-questions-before-you-connect-an-mcp-server)

Source page: https://getsonar.report/experts/four-questions-before-you-connect-an-mcp-server
