MCPShield Agent
AI Agent Security Scanner - Discovers MCP servers on your system and reports them to MCPShield for security analysis.
Installation
# Install from PyPI
pip install mcpshield-agent
# Or install from source
pip install -e .
Quick Start
# Scan your machine and see a local risk score. No account needed.
pip install mcpshield-agent
mcpshield scan
mcpshield scan discovers your MCP servers and prints a 0-100 risk score for
each, computed locally. Sign up (free) and configure --api-key to add CISA KEV
enrichment, org-wide tracking, history, and alerts:
mcpshield configure --api-key mcp_sk_your_key_here
mcpshield scan # now also reports to the dashboard
mcpshield status
Embed the scorer
The risk scorer is a pure function you can drop into any runtime to score an MCP server config in three lines:
from mcpshield_agent import score_config, risk_level
result = score_config({
"server_type": "@modelcontextprotocol/server-filesystem",
"command": "npx -y @modelcontextprotocol/server-filesystem /",
"scope": "/",
"env_vars": ["AWS_SECRET_ACCESS_KEY"],
})
# {"score": 100.0, "level": "critical", "factors": [...], "details": {...}}
It is the same weighted model as the hosted engine (minus CISA KEV enrichment, which stays server-side) and has no network dependency.
Commands
| Command | Description |
|---|---|
mcpshield configure --api-key KEY |
Configure agent with API key |
mcpshield scan |
Scan and score locally; also report if configured |
mcpshield scan --deep |
Also connect to active servers and scan tool descriptions |
mcpshield scan --dry-run |
Scan and score locally, never report |
mcpshield daemon |
Run continuous scheduled scanning |
mcpshield status |
Show agent status |
mcpshield list |
List found servers (no report) |
mcpshield --version |
Show version |
What It Scans
The agent looks for MCP server configurations in:
Windows:
%APPDATA%\Claude\claude_desktop_config.json%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json~/.config/cursor/mcp.json
What It Reports
For each discovered MCP server:
- Server name - e.g., "filesystem", "postgres"
- Server type - e.g., "@modelcontextprotocol/server-filesystem"
- Command - Full command string
- Scope - Access scope (file paths, URLs)
- Environment variables - Names only, NOT values
- Status - Active or dormant
Configuration
Config is stored in:
- Windows:
%LOCALAPPDATA%\MCPShield\config.json - macOS:
~/Library/Application Support/MCPShield/config.json - Linux:
~/.config/mcpshield/config.json
{
"api_url": "https://api.mcpshield.app",
"api_key": "mcp_sk_..."
}
Daemon Mode (Continuous Scanning)
Run the agent in daemon mode for automatic scheduled scanning:
# Default: scan every hour (3600 seconds)
mcpshield daemon
# Custom interval: scan every 5 minutes
mcpshield daemon --interval 300
The daemon will:
- Scan for MCP servers at the configured interval
- Report discovered servers to the backend
- Send heartbeat updates
- Log each scan cycle
- Shut down gracefully on Ctrl+C
Security
- Never sends credential values - Only environment variable names
- Local config is secure - API key stored locally
- HTTPS by default - All API communication encrypted
Development
# Install in development mode
pip install -e .
# Run tests
pytest
# Run locally against dev API
mcpshield configure --api-key YOUR_KEY --api-url http://localhost:8000
License
MIT License - see LICENSE file.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpshield_agent-0.5.0.tar.gz.
File metadata
- Download URL: mcpshield_agent-0.5.0.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21f6243b89b50a460659f540edd68b02137354b5786b45f8293e6a530b796976
|
|
| MD5 |
639eb769f42bda81ff877f38b11002bc
|
|
| BLAKE2b-256 |
cf2575e286c61854014ae14d2a524d1ee2c6eccafe81548fb4eb553ea048826e
|
File details
Details for the file mcpshield_agent-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mcpshield_agent-0.5.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3549c9644b432db60036bf832ca6a8f67b93a5519bfed0db440e7f3dcb5f4e
|
|
| MD5 |
3904e8dca83612713c815ab1d3043957
|
|
| BLAKE2b-256 |
10612377acdb630260f63ab229e8d500bd690018337828b9d718dfb35b6d19ed
|