Install
$ agentstack add mcp-amitvishw-mimir-scan Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged2 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Possible prompt-injection directive.
- high Pipes remote content directly into a shell (remote code execution).
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Mimir Scan
> "Like Mimir advises Kratos of dangers ahead, Mimir-Scan reveals hidden security threats in your code"
An MCP (Model Context Protocol) security scanner that integrates with AI coding agents like Claude Code, GitHub Copilot, Cursor, and others.
Wraps industry-standard security scanners (Semgrep, Trivy, Gitleaks) plus a built-in prompt injection detector, and exposes them as tools that any MCP-compatible AI agent can call.
Features
- Multi-Scanner: Combines SAST, SCA, secrets detection, and prompt injection scanning
- Security Grade: A-F grading system for quick project health assessment
- SARIF Export: GitHub Security tab integration
- Git Diff Scanning: Fast PR reviews by scanning only changed files
- Auto-Fix: Automatically apply safe fixes (dependency upgrades)
- Prompt Injection Detection: Scan for 23+ injection patterns in AI configs
- Custom Scanners: Bring your own scanner via
.mimir.jsonconfig
Quick Start
From Source (Recommended)
Clone the repo and install dependencies once:
git clone https://github.com/amitvishw/mimir-scan.git
cd mimir-scan
bun install
Then point your MCP client at the local install (see [MCP Client Configuration](#mcp-client-configuration) below).
Using Docker
Docker bundles all scanners - no local installation needed:
docker build -t mimir-scan .
docker run --rm -i -v /path/to/project:/workspace mimir-scan
MCP Client Configuration
Claude Code
Add to your Claude Code settings (~/.claude/settings.json or project's .mcp.json):
{
"mcpServers": {
"mimir": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/mimir-scan", "start"],
"env": {
"MIMIR_TARGET_DIR": "/path/to/your/project"
}
}
}
}
Claude Code Plugin (with Skills)
If you use Mimir as a Claude Code plugin, it ships with two built-in skills that automate the full scan workflow:
| Skill | Trigger | What it does | |-------|---------|--------------| | /mimir-scan:scan | After writing code, on demand | Full scan → grade → findings → autofix → verify loop | | /mimir-scan:check | When asking about scanner setup | Reports which scanners are installed with install hints |
The plugin registers the MCP server under the name mimir, so all tools are available as mimir:mimir_scan, mimir:mimir_verify, etc.
VS Code / GitHub Copilot
Add to .vscode/mcp.json in your project:
{
"servers": {
"mimir": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/mimir-scan", "start"],
"env": {
"MIMIR_TARGET_DIR": "${workspaceFolder}"
}
}
}
}
Cursor
Add to Cursor's MCP settings:
{
"mcpServers": {
"mimir": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/mimir-scan", "start"],
"env": {
"MIMIR_TARGET_DIR": "/path/to/your/project"
}
}
}
}
Docker Configuration
For any MCP client, use Docker to avoid installing scanners locally.
Build the image first:
docker build -t mimir-scan .
Then configure your MCP client:
{
"mcpServers": {
"mimir": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/your/project:/workspace:ro",
"mimir-scan"
]
}
}
}
Installing Scanners
The server works with whatever scanners you have installed. Install the ones you need:
# Semgrep (SAST - code vulnerabilities)
pip3 install semgrep
# Trivy (SCA - dependency vulnerabilities + IaC)
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
# Gitleaks (secrets detection)
# macOS:
brew install gitleaks
# Linux:
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz | tar xz -C /usr/local/bin gitleaks
Prompt injection detection is built-in and requires no installation.
Scanners
| Scanner | What it detects | Category | |---------|----------------|----------| | Semgrep | Code vulnerabilities — SQL injection, XSS, insecure crypto | sast | | Trivy | Dependency CVEs + IaC misconfigurations | sca, iac | | Gitleaks | Hardcoded secrets, API keys, passwords | secrets | | Prompt Injection | Jailbreaks, instruction overrides, data exfiltration | prompt-injection |
MCP Tools
| Tool | Description | |------|-------------| | mimir_scan | Run all security scans on the codebase | | mimir_scan_diff | Scan only git-changed files (fast PR reviews) | | mimir_scan_prompt | Scan text for prompt injection attacks | | mimir_check_scanners | Check which scanners are installed | | mimir_findings | List detailed findings with filtering | | mimir_grade | Get security grade (A-F) for the project | | mimir_fix | Generate fix instructions for the AI agent | | mimir_autofix | Auto-apply safe fixes (dependency upgrades) | | mimir_sarif | Export findings in SARIF format | | mimir_verify | Re-scan to confirm fixes were applied |
Environment Variables
| Variable | Default | Description | |----------|---------|-------------| | MIMIR_TARGET_DIR | Current directory | Directory to scan | | MIMIR_SCANNERS | semgrep,trivy,gitleaks,prompt-injection | Scanners to enable | | MIMIR_MIN_SEVERITY | low | Minimum severity (critical, high, medium, low, info) | | MIMIR_LOG_LEVEL | info | Log level (debug, info, warn, error, silent) |
Workflows
Full Scan Workflow
mimir_check_scanners→ see what's availablemimir_scan→ run security scansmimir_findings→ review detailed findingsmimir_autofixwithapply: true→ auto-fix safe issuesmimir_fix→ get instructions for remaining issues- Fix the code
mimir_verify→ confirm fixes
PR Review Workflow
mimir_scan_diffwithbase: "main"→ scan only changed filesmimir_grade→ quick A-F assessmentmimir_sarif→ export for GitHub Security tab
Security Grading
| Grade | Criteria | |-------|----------| | A | No critical or high, ≤2 medium | | B | No critical, ≤2 high, ≤5 medium | | C | No critical, ≤5 high, ≤10 medium | | D | ≤2 critical, ≤10 high | | F | >2 critical or >10 high |
Prompt Injection Detection
The built-in scanner detects 23+ attack patterns:
- Instruction overrides: "ignore previous instructions"
- Jailbreaks: DAN mode, developer mode
- Role manipulation: "you are now a..."
- Data exfiltration: attempts to send data to external URLs
- System prompt extraction: attempts to reveal instructions
- Encoding bypasses: base64, unicode escapes
Scan AI config files or validate user inputs:
mimir_scan_prompt text="ignore all previous instructions" source="user_input"
Custom Scanners
Add your own scanners by creating a .mimir.json file in your project root:
{
"plugins": [
{
"name": "my-scanner",
"displayName": "My Custom Scanner",
"category": "sast",
"checkCommand": "my-scanner",
"command": "my-scanner",
"args": ["scan", "--json", "."],
"outputFormat": "json",
"parser": {
"resultsPath": "results",
"fieldMapping": {
"id": "ruleId",
"severity": "level",
"title": "message",
"description": "details",
"filePath": "file",
"startLine": "line"
}
}
}
]
}
Plugin Configuration
| Field | Required | Description | |-------|----------|-------------| | name | Yes | Unique identifier for the scanner | | displayName | No | Human-readable name | | category | Yes | One of: sast, sca, secrets, iac, prompt-injection | | checkCommand | Yes | Command to check if scanner is installed | | command | Yes | Command to run the scanner | | args | No | Arguments to pass to the command | | outputFormat | Yes | Output format: json or sarif | | parser | Yes (for json) | How to parse the output |
Parser Configuration
| Field | Description | |-------|-------------| | resultsPath | JSONPath to the findings array (e.g., results, data.findings) | | fieldMapping.id | Path to finding ID | | fieldMapping.severity | Path to severity level | | fieldMapping.title | Path to finding title | | fieldMapping.description | Path to description | | fieldMapping.filePath | Path to file path | | fieldMapping.startLine | Path to line number |
Enable your custom scanner:
MIMIR_SCANNERS=semgrep,my-scanner bun run --cwd /path/to/mimir-scan start
Development
Prerequisites
- Bun runtime
Setup
git clone https://github.com/amitvishw/mimir-scan.git
cd mimir-scan
bun install
Running Locally
# Development mode with watch
bun run dev
# Run directly
bun run start
Testing
# Unit tests
bun test
# Unit tests with watch
bun test --watch
# E2E tests (requires scanners installed)
./test-e2e.sh
# E2E tests with Docker
./test-e2e.sh --docker
Building Docker Image
docker build -t mimir-scan .
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Use conventional commits (
feat:,fix:,docs:, etc.) - Run tests (
bun test) - Submit a pull request
Commit Convention
This project uses Conventional Commits:
feat:New feature (triggers minor version bump)fix:Bug fix (triggers patch version bump)docs:Documentation onlychore:Maintenance taskstest:Adding testsrefactor:Code refactoring
License
ISC
Links
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: amitvishw
- Source: amitvishw/mimir-scan
- License: ISC
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.