Skip to main content
Glama

AB Download Manager MCP Server (abdm-mcp)

License: MIT Python 3.10+ MCP Specification CI

MCP server for AB Download Manager. Connects AI coding assistants and autonomous agents (Claude Desktop, OpenAI Codex & ChatGPT, Google Antigravity, Kimi, Cursor, Windsurf, Cline, Zed) to ABDM so they can offload large downloads—model weights, datasets, and archives—with multi-threaded acceleration (up to 32 connections), pause/resume, and queueing instead of choking on single-threaded agent HTTP calls.


Quick Start

Run with uvx (No installation needed)

uvx abdm-mcp

Network Transports (SSE & HTTP)

# Run with Server-Sent Events (SSE) for remote/containerized agents
uvx abdm-mcp --transport sse --port 8000

# Run with Streamable HTTP
uvx abdm-mcp --transport streamable-http --port 8000

Install with pip

pip install abdm-mcp
python -m abdm_mcp

Agent Configuration

abdm-mcp complies with the Model Context Protocol standard and works across all major AI coding agents, IDEs, and assistant platforms.

1. Claude Desktop

Add to your claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"],
      "env": {
        "ABDM_MCP_DEFAULT_MODE": "interactive",
        "ABDM_API_KEY": "your_api_key_if_configured"
      }
    }
  }
}

2. OpenAI Codex & ChatGPT Desktop

Add to ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):

[mcp_servers.abdm]
command = "uvx"
args = ["abdm-mcp"]
env = { "ABDM_MCP_DEFAULT_MODE" = "headless" }

Or add via the Codex CLI:

codex mcp add abdm -- uvx abdm-mcp

3. Google Antigravity

Add to your workspace or user mcp.json:

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"]
    }
  }
}

4. Kimi (Moonshot AI / Kimi CLI)

Add to your Kimi Agent configuration (kimi_mcp.json or agent settings):

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"],
      "env": {
        "ABDM_MCP_DEFAULT_MODE": "headless"
      }
    }
  }
}

5. Cursor

Add to your project's .cursor/mcp.json or Cursor Settings > Features > MCP:

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"]
    }
  }
}

6. Windsurf (Codeium)

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"]
    }
  }
}

7. Cline & Roo Code (VS Code)

Open Settings in Cline / Roo Code and add under MCP Servers:

{
  "mcpServers": {
    "abdm": {
      "command": "uvx",
      "args": ["abdm-mcp"]
    }
  }
}

8. Zed Editor

Add to ~/.config/zed/settings.json:

{
  "context_servers": {
    "abdm": {
      "command": {
        "env": {},
        "path": "uvx",
        "args": ["abdm-mcp"]
      }
    }
  }
}

9. Continue.dev

Add to ~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "uvx",
          "args": ["abdm-mcp"]
        }
      }
    ]
  }
}

10. Goose (Block)

Run the extension add command or add to ~/.config/goose/config.yaml:

goose configure add-extension --name abdm --command uvx --args abdm-mcp

Tool Surface & Capabilities

All tools return strongly-typed Pydantic schemas and include explicit MCP Tool Annotations:

Tool Name

Parameters

MCP Annotations

Description

abdm_download

url (str)mode ("interactive" | "headless")filename (str, optional)subdirectory (str, optional)queue_id (int, optional)headers (dict, optional)download_page (str, optional)

openWorldHint=TruedestructiveHint=False

Submits a download. Fails fast with UnsupportedParameterError if path/queue options are supplied in interactive mode.

abdm_download_batch

urls (list[str])mode ("interactive" | "headless")queue_id (int, optional)

openWorldHint=TruedestructiveHint=False

Enqueues up to 50 URLs in a batch with partial success tracking.

abdm_get_queues

none

readOnlyHint=True

Fetches configured download queues from ABDM.

abdm_check_status

none

readOnlyHint=True

Probes REST reachability, authentication, CLI status, and active capabilities.

abdm_list_downloads

status ("active" | "paused" | "completed" | "error" | "all")

readOnlyHint=True

Lists current downloads reported by ABDM.

abdm_get_download

download_id (str)

readOnlyHint=True

Returns status and metadata for a single download task by ID.

abdm_pause

download_id (str)

idempotentHint=TruedestructiveHint=False

Pauses an active download task.

abdm_resume

download_id (str)

idempotentHint=TruedestructiveHint=False

Resumes a paused download task.

abdm_remove

download_id (str)delete_file (bool = False)

destructiveHint=True

Cancels and removes a download task. File deletion requires policy opt-in and path verification.


Security & Sandboxing Guardrails

Autonomous agents are powerful, but should not have unrestricted filesystem or network write access. abdm-mcp implements defense-in-depth:

  1. Path Sandboxing: By default, headless downloads are strictly confined to ~/Downloads/ABDM. Path traversal escapes (../) and absolute paths outside allowed roots are rejected.

  2. Private-Network URL Guard: Protects against SSRF by rejecting direct requests to localhost, 127.0.0.0/8, ::1, RFC1918 LAN subnets (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), and link-local metadata endpoints (169.254.169.254).

  3. Filename Sanitization: Rejects slashes, drive prefixes, control characters, and reserved Windows device names (CON, PRN, AUX, NUL, etc.).

  4. Header Protection: Blocks sensitive headers (Cookie, Authorization, Proxy-Authorization, Host) by default to prevent credential leakage.

  5. Safe Subprocess Execution: The CLI backend strictly uses asyncio.create_subprocess_exec (never shell=True) with bounded streaming readers (1MB limit) and hard execution timeouts.

Environment Variables

Variable

Default

Description

ABDM_CONFIG_DIR

~/.abdm

Custom or portable configuration directory path.

ABDM_PORT

15151

Port of the ABDM local integration server (auto-discovered from appSettings.json).

ABDM_API_KEY

None

Optional authentication key configured in ABDM.

ABDM_CLI_PATH

Auto-detected

Explicit path to ABDownloadManagerCli executable.

ABDM_MCP_DEFAULT_MODE

interactive

Default mode: interactive (GUI confirmation) or headless (silent background).

ABDM_MCP_ALLOWED_DOWNLOAD_ROOTS

~/Downloads/ABDM

Comma-separated list of allowed download directories.

ABDM_MCP_ALLOW_PRIVATE_NETWORKS

false

Set to true to allow downloads from LAN / private IPs.

ABDM_MCP_ALLOW_SENSITIVE_HEADERS

false

Set to true to allow Cookie and Authorization headers.

ABDM_MCP_ALLOW_FILE_DELETION

false

Set to true to permit abdm_remove(delete_file=True).

ABDM_MCP_MAX_BATCH_SIZE

50

Maximum URLs accepted in a single abdm_download_batch call.


Development & Testing

# Clone the repository
git clone https://github.com/shivamtawari/ab-download-manager-mcp.git
cd ab-download-manager-mcp

# Install dependencies with uv
uv sync --all-groups

# Run full test suite
uv run pytest tests/

# Run linting
uv run ruff check .

License

MIT License. See LICENSE for details.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shivamtawari/ab-download-manager-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server