How do you find which of your ports are open, from an AI assistant?
AdminKit's check_owned_ports tool lets an AI agent ask AdminKit's live Check API which of a fixed set of nine commonly-exposed TCP ports are open on a target you have verified you own, so your assistant can flag a forgotten Telnet port without running its own network scan.
By AdminKit team, Netbase JSC · Updated
Key takeaways
check_owned_portsasks AdminKit’s live Check API to test nine TCP ports (Telnet, RTSP, MQTT, Modbus, TR-069 and three web admin ports) on one IP address.- The API scans only the public IP your request comes from, or an IP your AdminKit organisation has verified. Any other target comes back
skipped, and nothing is probed. - A result names each open port, its severity and a one-line fix, in the same envelope (
result,evidence,fix_hint,report_url) everyadminkit-mcptool returns. - “Open” means only that a TCP connection was accepted. The check never logs in, sends protocol commands or tries an exploit.
What does check_owned_ports actually check?
The tool sends one request to AdminKit’s Check API (POST /v1/check/ports) with the IP address you name. The API then attempts a plain TCP connection to each port on its default list, with a short timeout per port, and reports which ones accepted the connection. It does nothing else: no banner grabbing, no credentials, no protocol commands. A port that answers is “open”; a port that refuses or times out is simply not listed.
The default list comes from AdminKit’s own check library and covers services that device makers and ISPs commonly leave reachable by mistake. Seven of them are flagged as sensitive, which raises the finding’s severity:
| Port | Service | Scanned? | Why it is on the list |
|---|---|---|---|
| 23 | Telnet | Yes (TCP) | Unencrypted remote admin |
| 554 | RTSP | Yes (TCP) | Camera and media streams, often unauthenticated |
| 1883 | MQTT | Yes (TCP) | Unencrypted broker; check for anonymous access |
| 8883 | MQTT over TLS | Yes (TCP) | Confirm a client certificate or login is required |
| 502 | Modbus/TCP | Yes (TCP) | No built-in authentication; should not be internet-reachable |
| 7547 | TR-069 (CWMP) | Yes (TCP) | ISP device management, a frequent exploit target |
| 8080 | Alternate HTTP | Yes (TCP) | Often an admin panel; confirm it needs to be public |
| 80, 443 | HTTP, HTTPS | Yes (TCP) | Reported as informational, since many hosts serve a website on purpose |
| 47808, 5683 | BACnet/IP, CoAP | No (UDP) | Listed in the result as not scanned |
The service names follow the IANA port registry, which records what each number is assigned to. An assignment is a convention, not a guarantee: a device can run anything on any port, so treat the service column as the most likely explanation and confirm it on the device itself.
How do you ask your agent to run it?
Install AdminKit’s open-source adminkit-mcp connector (MIT, PyPI) and wire it into any MCP-capable AI agent — see connect an AI agent to AdminKit’s MCP server if you haven’t yet:
uvx adminkit-mcp
Most desktop clients start a local server from a JSON entry. The structure below follows the client configuration format in the MCP project’s guide to connecting local servers; the adminkit key is just a display name you choose:
{
"mcpServers": {
"adminkit": {
"command": "uvx",
"args": ["adminkit-mcp"]
}
}
}
Then ask it, in plain language:
“Use check_owned_ports to check which ports are open on the device/host I just verified I own, and tell me if anything looks risky.”
The agent calls check_owned_ports(target="...") and gets back a structured result rather than raw scan output you’d have to interpret yourself. If you only know the hostname, ask the agent to resolve it with the dns_lookup tool first, because the port endpoint accepts an IP address literal and rejects anything else as invalid input.
Which targets will the Check API scan?
The API applies a default-deny rule before it opens a single connection. A target is scanned only when it is one of two things:
| Target you pass | What the API does | Result status |
|---|---|---|
| The public IP your request comes from | Scans the nine TCP ports | ok, warn or fail |
| An IP your AdminKit organisation has verified (request sent with your API key) | Scans the nine TCP ports | ok, warn or fail |
| Any other IP address | Refuses; no connection is opened | skipped (“scan refused”) |
| A hostname or malformed value | Rejects the request as invalid input | Error, nothing scanned |
“The public IP your request comes from” needs one clarification for agent setups. The connector runs on your machine and calls the API from there, so the API sees your network’s public address as the caller. If you run uvx adminkit-mcp on a laptop at the office, the office’s public IP qualifies; a server’s IP in a data centre does not, unless you run the connector on that server or verify the address. Verification is done through AdminKit’s API (/v1/assets, listed in the OpenAPI reference), and the connector sends your key from the ADMINKIT_API_KEY environment variable.
If your connection sits behind carrier-grade NAT, the public address the API sees is shared with other customers of your ISP, and port forwards on your own router are not reachable from the internet at all. What is CGNAT explains how to recognise that case before you read too much into an all-closed result.
What does a result look like?
The example below is illustrative, not a scan of a real host. It uses the documentation address 203.0.113.10 (RFC 5737) and shows the shape check_owned_ports returns when the Check API finds Telnet open on a verified target. The field names, finding id, title and fix text are the ones AdminKit’s check library produces; the timing value is omitted.
{
"tool": "check_owned_ports",
"status": "fail",
"result": {
"check": "ports.scan",
"target": "203.0.113.10",
"summary": "1/9 TCP port(s) open",
"findings": [
{
"id": "ports.open",
"severity": "high",
"title": "Port 23 is open — Telnet — unencrypted remote admin",
"detail": "",
"fix_hint": "Close this port, or restrict it to a VPN/allowlist if it must stay open.",
"evidence": { "port": 23 }
}
],
"score": null
},
"evidence": {
"scanned_tcp_ports": [23, 554, 1883, 8883, 502, 7547, 80, 443, 8080],
"open_ports": [23],
"udp_ports_not_scanned": [47808, 5683]
},
"fix_hint": "Close this port, or restrict it to a VPN/allowlist if it must stay open.",
"report_url": "https://adminkit.net/tools/port-check/?utm_source=mcp"
}
Reproduce it yourself by asking your agent to run the tool against a target you’ve verified you own. If the Check API’s port endpoint is briefly unreachable, the tool reports status: "not_available" with a plain message saying so, rather than fabricating a result — the same no-fabrication rule every adminkit-mcp tool follows.
How do you read each part of the result?
| Field | What it tells you |
|---|---|
status | fail if any open port is one of the seven sensitive ones; warn if only informational ports (80, 443) are open; ok if none are; skipped if the target was refused |
result.summary | Open ports out of TCP ports scanned, for example 1/9 |
result.findings | One ports.open finding per open port, with high severity for sensitive ports and info for the rest |
evidence.open_ports | The raw list of ports that accepted a connection |
evidence.udp_ports_not_scanned | BACnet/IP and CoAP, which a TCP test cannot see |
fix_hint | The first finding’s fix text, so an agent can quote one next step |
report_url | A link to the matching public tool page, tagged so AdminKit can count visits that came from MCP |
The port endpoint does not compute a 0-100 score, so score is null; status and the findings carry the meaning. How to read an open ports on my IP scan result covers interpreting a findings list like this port-by-port, including why some ports (database ports like MongoDB, management ports like RDP) carry a higher fix_hint priority than others.
What should you do about an open port?
An open port is a question, not a verdict: something on that address accepted a connection, and you need to know what it is and whether it should be reachable from everywhere. Work through it in this order:
- Identify the device. Check which host on your network the router forwards that port to, or which service is listening if the IP belongs to a server.
- Decide if it must be public. Most of the services on this list are management or field protocols that were designed for trusted local networks.
- Close it or narrow it. Remove the port forward, disable the service, or restrict it to a VPN or an allowlist of source addresses.
- Re-run the check from the same network, so the API sees the same caller IP, and confirm the port no longer appears in
open_ports.
| Open port | Usual first action | Further reading |
|---|---|---|
| 23 Telnet | Disable Telnet; use SSH if remote admin is needed | Is port 23 Telnet exposed? |
| 554 RTSP | Remove the forward; view cameras through a VPN or the vendor app | Is port 554 RTSP exposed? |
| 1883 / 8883 MQTT | Require authentication; never allow anonymous clients | Is port 1883 MQTT open? |
| 502 Modbus | Take it off the internet entirely | Is Modbus TCP 502 exposed? |
| 7547 TR-069 | Ask your ISP whether remote management should answer on this address | Is port 7547 TR-069 exposed? |
Why is this check gated by ownership?
Active port probing is only meaningful, and only safe to run without abuse risk, once the target’s ownership is verified — that gate lives on AdminKit’s Check API, not in the connector, so an agent calling this tool inherits the same server-side ownership check a human would hit using the port exposure check tool page directly. This matters for agent builders specifically: a tool an agent can call freely against any string a user supplies is a different trust boundary than one gated server-side, and check_owned_ports is built as the latter on purpose rather than trusting the calling agent (or whatever prompted it) to self-police which targets are fair game.
The MCP specification’s Tools page adds a second layer from the client side: it says there should always be a human in the loop with the ability to deny tool invocations, and that clients should show tool inputs before calling the server. In practice, that means your client will usually ask you to approve the check_owned_ports call and show you the IP address it is about to send. Read that address before you approve it.
Why does this matter for an inventory, not just one host?
Telnet and the other eight ports check_owned_ports scans were mostly built for trusted local networks, and the NIST firewall guidelines treat default-deny on exactly these kinds of unneeded inbound services as a baseline control, not an advanced one — the IANA port registry is the authoritative list of what each of these numbers is actually assigned to serve. An agent that can call check_owned_ports on demand fits naturally into a recurring inventory check across every host you own, rather than a one-off manual pass — see our AI agent builders solutions page for the broader pattern of wiring AdminKit’s checks into an agent-driven workflow, and AdminKit’s AI agents & MCP cluster for the rest of the guides on connecting and securing MCP servers themselves.
A practical routine looks like this: verify each public IP you are responsible for once, keep the list in your agent’s instructions, and ask it to run check_owned_ports on each address after any router, firewall or ISP change. Exposure often appears without anyone deciding to open a port, for example when a device turns on a UPnP port mapping or a replacement router ships with remote management enabled. A repeated check catches those changes; a single scan only describes the day you ran it.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Which real tool does this use, and does it scan the internet at large?
check_owned_ports, one of the 15 tools in adminkit-mcp (PyPI, MIT). It's a thin client over AdminKit's live Check API's ownership-gated port endpoint (/v1/check/ports) — never a local scan the connector runs itself, and never a scan of a target you haven't verified you own. See the port exposure check tool page for how ownership verification works.
What happens if I point it at a target I don't own?
Nothing is scanned. The ownership gate is enforced server-side on AdminKit's Check API: unless the target is the public IP the request comes from, or an IP your AdminKit organisation has verified, the API returns a result with status skipped and the summary 'scan refused', and no connection is opened to the target. The connector cannot override this, so an agent can't be talked into probing someone else's infrastructure.
What ports does it check?
A fixed list of nine TCP ports device makers commonly leave open by mistake: Telnet (23), RTSP (554), MQTT (1883/8883), Modbus (502), TR-069/CWMP (7547), and admin web UIs (80/443/8080) — the same list the open ports on my IP tool page documents in full. BACnet/IP (47808) and CoAP (5683) are on the default list too, but they run over UDP, which a TCP connect test cannot observe, so the result lists them as not scanned. This site's guides also cover other commonly-exposed ports like RDP, VNC, SMB, MongoDB and Redis individually, but those aren't on check_owned_ports' scanned list.
Is this different from the open ports on my IP tool?
They check overlapping ground from different angles: the open ports on my IP tool scans your current public IP as seen from the internet; check_owned_ports via MCP is built for an agent workflow against a named, ownership-verified target, and returns the same structured result shape (result, evidence, fix_hint, report_url) every adminkit-mcp tool shares, so an agent can act on it directly.
Can I pass a hostname instead of an IP address?
No. The Check API's port endpoint accepts an IP address literal only, and rejects anything else as invalid input. Resolve the hostname yourself first, or ask your agent to call dns_lookup and then pass the A or AAAA address it returns.
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.