HUB
Sign inSign up
titus-mcp logo

hackerdogs/titus-mcp

By hackerdogs

•Updated 5 months ago

Titus MCP Server

Image
0

280

hackerdogs/titus-mcp repository overview

Hackerdogs
hackerdogs ⁠

⁠Titus MCP Server

MCP server wrapper for Titus⁠ — secret detection tool by Praetorian that scans source code, files, and git history for leaked credentials.

⁠What is Titus?

Titus scans source code, files, and git history for leaked API keys, tokens, credentials, and other secrets using 487 detection rules. It supports scanning local directories as well as full git commit history to find secrets that may have been committed and later removed.

No API keys required — Titus runs entirely locally against your files and repositories.

⁠Docker & AI agents

This MCP server runs in Docker, not on the host. Callers (e.g. AI agents) should pass URLs, not host machine paths. For scan_path and scan_git, pass any file URL (e.g. https://example.com/code.zip) or repo URL (e.g. https://github.com/org/repo); the server downloads the content inside the container and runs the scan. No volume mounts or local paths are required. If a non-URL path is given and it does not exist in the container, the server returns a clear error asking for a URL.

Summary. MCP server wrapper for Titus⁠ — secret detection tool by Praetorian that scans source code, files, and git history for leaked credentials.

Tools:

  • scan_path — Scan for secrets in files/directories. Pass a URL (file or repo); server downloads and scans. 487 rules.
  • scan_git — Scan git history for leaked secrets. Pass a repo URL; server clones and scans history.
  • list_rules — List all 487 available secret detection rules. No parameters.
  • generate_report — Generate a report from the most recent scan.
  • download_file — Download a file or repo from a URL into the container (optional; use when you need multiple scans on the same content).
  • cleanup_downloads — Remove downloaded files from the container workspace.

⁠Tools Reference

⁠scan_path

Scan files and directories for secrets (API keys, tokens, credentials) using 487 detection rules.

ParameterTypeRequiredDefaultDescription
pathstringYes—URL recommended: file URL (e.g. https://example.com/code.zip) or GitHub/GitLab repo URL. Server downloads inside the container and scans. Or a path inside the container (e.g. from download_file).
validatebooleanNofalseValidate discovered secrets against live services
output_formatstringNo"json"Output format: "json" or "csv"
rules_includestringNo""Rule IDs or tags to include (empty = all)
rules_excludestringNo""Rule IDs or tags to exclude
Example response
{
  "success": true,
  "output": [
    {"rule_id": "aws-access-key", "file": "config.py", "line": 42, "match": "AKIA...XXXX", "severity": "high"}
  ]
}
⁠scan_git

Scan git history for secrets leaked in past commits.

ParameterTypeRequiredDefaultDescription
pathstringYes—URL recommended: GitHub/GitLab repo URL (e.g. https://github.com/org/repo). Server clones inside the container and scans full git history. Or a path inside the container if already cloned.
validatebooleanNofalseValidate discovered secrets
output_formatstringNo"json"Output format: "json" or "csv"
rules_includestringNo""Rule IDs or tags to include
rules_excludestringNo""Rule IDs or tags to exclude
⁠list_rules

List all 487 available secret detection rules. No parameters.

⁠generate_report

Generate a report from the most recent scan.

ParameterTypeRequiredDefaultDescription
output_formatstringNo"json"Output format: "json" or "csv"
⁠download_file

Download a file or repository from a URL into the container workspace. Use this to pre-download content before running multiple analyses on the same data.

ParameterTypeRequiredDefaultDescription
urlstringYes—HTTP(S) URL, GitHub/GitLab repo URL, or data: URI
extractbooleanNotrueAuto-extract archives (.zip, .tar.gz, etc.)

Returns JSON with path (local file path to use in other tools) and job_id (for cleanup).

⁠cleanup_downloads

Remove downloaded files from the container workspace.

ParameterTypeRequiredDefaultDescription
job_idstringNo""Specific job ID to clean up. If empty, removes all downloads

⁠Example Prompts

Here are example prompts you can use with Claude (or any MCP client) when this tool is connected:

  • "Scan the /app/project directory for any leaked API keys, tokens, or secrets."
  • "Check the git history of /app/repo for any secrets that were committed and later removed."
  • "Scan /app/code but only look for AWS-related secrets like access keys and secret keys."
  • "List all the secret detection rules that Titus supports."
  • "Scan /app/config and validate any discovered secrets against live services to check if they're still active."
  • "Generate a report from the last scan in CSV format."

URL-based ingestion (no volume mounts needed):

⁠Deploy

docker-compose up -d
⁠Docker Run (stdio mode)
docker run -i --rm hackerdogs/titus-mcp:latest
⁠Docker Run (HTTP streamable mode)
docker run -d -p 8103:8103 \
  -e MCP_TRANSPORT=streamable-http \
  -e MCP_PORT=8103 \
  hackerdogs/titus-mcp:latest

⁠MCP Client Configuration

⁠Stdio mode (default)

Add to your Claude Desktop or Cursor MCP config:

{
  "mcpServers": {
    "titus-mcp": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT", "hackerdogs/titus-mcp:latest"],
      "env": {
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}
⁠HTTP mode (streamable-http)

First, start the server using Docker Compose or docker run with HTTP mode (see Deploy⁠ above), then point your MCP client at the running server:

{
  "mcpServers": {
    "titus-mcp": {
      "url": "http://localhost:8103/mcp"
    }
  }
}

When to use HTTP mode: HTTP mode is ideal for shared/remote deployments, multi-user setups, and Hackerdogs⁠ scheduled prompts. The server runs as a long-lived process and accepts connections from multiple MCP clients concurrently.

⁠Environment Variables

VariableDefaultDescription
MCP_TRANSPORTstdioTransport mode: stdio or streamable-http
MCP_PORT8103HTTP port (only used with streamable-http)
HD_MAX_DOWNLOAD_MB500Max file download size in MB (URL fetch)
HD_FETCH_TIMEOUT120Download timeout in seconds (URL fetch)

⁠Installing in Hackerdogs

The fastest way to get started is through Hackerdogs⁠:

  1. Log in to your Hackerdogs account.
  2. Go to the Tools Catalog.
  3. Search for the tool by name (e.g. "nuclei", "naabu", "julius").
  4. Expand the tool card and click Install — you're ready to go.

Give it a couple of minutes to go live. Then start querying by asking Hackerdogs to use the tool explicitly (e.g. "Use naabu to scan example.com"). If you don't specify, Hackerdogs will automatically choose the best tool for the job — it may choose this one on its own.

  1. Vendor API key required? Add your key in the config environment variable field before clicking Install. Your key will be encrypted at rest.
  2. Enable / Disable the tool anytime from the Enabled Tools page.
  3. Need to update a key or parameter? Go to My Tools → toggle Show Decrypted Values → edit → Save.

Want to contribute or chat with the team? Join our Discord⁠.

⁠Build

docker build -t hackerdogs/titus-mcp:latest .

⁠Testing

⁠Automated tests
./test.sh
⁠Test directly with Docker

1. Start the server in HTTP mode:

docker run -d --rm --name titus-test -p 8103:8103 \
  -e MCP_TRANSPORT=streamable-http \
  hackerdogs/titus-mcp:latest

2. Initialize the MCP session:

SESSION_ID=$(curl -s -D - -X POST http://localhost:8103/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' \
  2>&1 | grep -i mcp-session-id | awk '{print $2}' | tr -d '\r\n')

curl -s -X POST http://localhost:8103/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

3. Call a tool:

curl -s -X POST http://localhost:8103/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_rules","arguments":{}}}'

4. Clean up:

docker stop titus-test

⁠Troubleshooting

  • "MCP server not working" in Claude / Cursor: The server runs inside Docker. If your environment cannot run Docker (e.g. no docker in PATH or no Docker daemon), the MCP client cannot start the container. Run ./test.sh on a host that has Docker to verify the image; use a Cursor/Claude setup that is configured to run Docker for MCP.
  • Scan path not found: When using the container, only paths inside the container exist. Use a URL (e.g. https://github.com/org/repo) so the server downloads and scans it, or mount your repo: docker run ... -v /host/path:/app/mount hackerdogs/titus-mcp and pass path="/app/mount".

⁠Running the tool directly (bypassing MCP)

You can run the titus CLI in the same container by overriding the entrypoint for Titus container security without starting the MCP server.

Show help:

docker run -i --rm --entrypoint titus hackerdogs/titus-mcp:latest --help
Tag summary
Recent tags
Content type
Image
Digest
sha256:4c542cd15…
Size
117.8 MB
Last updated
5 months ago
docker pull hackerdogs/titus-mcp:latest