TinyShield Now Has an MCP Server and a Command Line
Let AI agents like Claude Code and Codex, and your own scripts, see which apps connect where, answer Require Approval requests, and manage your Block List. Part of TinyShield PRO.
TinyShield now comes with an MCP server and a command-line tool.
AI agents such as Claude Code, Codex and Cursor, and your own scripts, can now see which apps connect where, answer Require Approval requests, and manage your Block List, Allow List and connection mode. Everything stays on your Mac.
In this post, you will learn:
- Why we built it
- What an AI agent can do with TinyShield
- How to add TinyShield to Claude Code, Codex and Cursor
- How to use the
tinyshieldcommand line- How TinyShield keeps it safe
Why we built it
Require Approval asks you once for every new app. That's the right default when you're at your Mac.
But AI agents create and run new tools all day: a new Python, a package manager, a build tool. Each one is a new app for TinyShield, so each one waits for approval. When the agent works in the background, or you're away from your Mac, nobody sees the prompt. The download just times out, and the agent doesn't know why.
A TinyShield user asked us for a way to handle this from an agent or a script (issue #103). Now your agent can check what's waiting and, when you say so, allow it.
What can an AI agent do with TinyShield?
The MCP server has 32 tools. With them, your agent can:
- See activity: which apps used the network, the domains and IP addresses they reached, their countries, and the same tree as TinyShield's main window.
- Answer Require Approval: list the apps that wait for approval, allow or block them, or wait for the next one.
- Manage decisions: list your App Connection Decisions, change them, or remove them so TinyShield asks again.
- Edit your lists: add or remove domains, IP addresses and apps in the Block List and Allow List.
- Switch the connection mode: Allow All, Require Approval or Block All.
- Check bandwidth: data used per app in the last five minutes, hour, day, week or month, and live traffic.
- Manage settings: change settings, export or import your configuration, and open a TinyShield window.
Just ask in plain English:
- "My npm install timed out. Is TinyShield waiting for approval?"
- "Which apps connected to the internet in the last hour, and where?"
- "Block ads.example.com and every subdomain of tracker.net."
- "Which app used the most data this week?"
Turn on MCP & Command Line
- Open TinyShield and go to Settings → MCP.
- Turn on Enable MCP & Command Line.
- The status shows Running on 127.0.0.1 and a port number.
MCP & Command Line are part of TinyShield PRO, and they're off until you turn them on. See the pricing to upgrade.
Add TinyShield to your AI agent
Settings → MCP → MCP Configuration has a tab for Claude Code, Codex and Manual, each with a Copy button. These are the commands it shows:
Claude Code
claude mcp add --scope user tinyshield -- "/Applications/Tiny Shield.app/Contents/MacOS/tinyshield-mcp"
Codex
codex mcp add tinyshield -- "/Applications/Tiny Shield.app/Contents/MacOS/tinyshield-mcp"
Cursor and other MCP clients
Choose Manual and add this to the client's MCP configuration:
{
"mcpServers": {
"tinyshield": {
"command": "/Applications/Tiny Shield.app/Contents/MacOS/tinyshield-mcp"
}
}
}
Starting your agent doesn't open TinyShield. It opens in the background, without any window, when the agent first uses a tool.
Tip: If TinyShield isn't in your Applications folder, copy the command from Settings → MCP. It always has the right path for your Mac.
Use the command line
The command-line tool is tinyshield-cli, inside the app. Settings → MCP → Command Line shows an alias to add to your shell profile, such as ~/.zshrc:
alias tinyshield='"/Applications/Tiny Shield.app/Contents/MacOS/tinyshield-cli"'
Open a new Terminal window, then try it:
# Version, license, connection mode and list counts
tinyshield status
# Switch to Require Approval
tinyshield mode require-approval
# The apps waiting for approval, and where they tried to connect
tinyshield pending list
# Allow one of them (by name, bundle ID, path or pid)
tinyshield pending allow /opt/homebrew/bin/uv
# Block a domain and every subdomain of another
tinyshield block-list add ads.example.com '*.tracker.net'
# Apps blocked in the last hour
tinyshield apps --range 1h --status blocked
# Where Chrome connected in the last hour
tinyshield connections "Google Chrome" --range 1h
# Safari's data this week
tinyshield bandwidth --timeframe week --app Safari
This is what it prints:
❯ tinyshield block-list add ads.example.com '*.tracker.net'
Added to the Block List: ads.example.com, *.tracker.net. The Block List is on.
Run tinyshield --help to see every command. Each command calls the same tool an agent gets through MCP, and tinyshield call <tool> '<json>' calls any of them.
Use it in scripts
Add --json to any command for output a script can read. The exit code tells your script what happened:
| Exit code | Meaning |
|---|---|
| 0 | It worked. |
| 1 | The command failed. |
| 3 | Not found. |
| 4 | It needs TinyShield PRO. |
| 69 | TinyShield can't be reached: MCP & Command Line is off, or the app isn't installed. |
For example, tinyshield pending wait waits until an app needs approval, then shows it. It exits with 3 when no app asked before the timeout, so a script can loop or notify you:
# Wait up to 10 minutes for a new app that needs approval
tinyshield pending wait --timeout 600 --only-new
Safe by design
TinyShield protects your Mac, so we kept it safe and in your hands:
- Off by default. Nothing listens until you turn on Enable MCP & Command Line.
- Only your Mac. The server only accepts connections from your Mac (127.0.0.1). Every call needs an access token that only your user account can read, and the token changes every time the server starts. Regenerate Access Token makes a new one at any time; agents and scripts pick it up by themselves.
- No websites. TinyShield refuses requests from web browsers, so a website can't talk to it.
- Same rules as a click. A change from an agent goes through the same path as a click in TinyShield, and shows up right away in the open windows.
- You see who did what. A decision made by an agent or a script shows who made it, such as Claude Code via MCP or Command Line, in the Decisions list. Settings → MCP → Recent Activity lists every call.
- Your agent asks first. TinyShield tells agents to ask you before they allow an unknown app, switch to Allow All, remove rules, import a configuration or clear data, and to allow one app rather than change the mode.
Get started
- Update TinyShield to the latest version, or download it.
- Open Settings → MCP and turn on Enable MCP & Command Line (TinyShield PRO).
- Copy the command for Claude Code or Codex, and ask your agent: "Is TinyShield waiting for approval?"
TinyShield is not alone: Proxyman, TCP Viewer and Device MCP, from the same team, now have an MCP server and a command line too. Read the announcement.
Have an idea for a new tool or command? Tell us on GitHub.
Ready to Protect Your Mac?
Experience the power of TinyShield's network monitoring and protection. Keep your Mac safe from threats while maintaining optimal performance.
Download TinyShield