Skip to main content

MCP server for Moatdrop — manage secure links from AI assistants

Reason this release was yanked:

deprecated for now

Project description

Moatdrop MCP Server

An MCP (Model Context Protocol) server for Moatdrop — manage secure, trackable links from AI assistants like Claude Desktop, Cursor, and Claude Code.

Installation

pip install moatdrop-mcp

Or run directly with uvx:

uvx moatdrop-mcp

Setup

1. Get an API Key

  1. Log in to Moatdrop
  2. Go to Account > API Keys
  3. Create a new key and copy it

2. Configure Your AI Assistant

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "moatdrop": {
      "command": "uvx",
      "args": ["moatdrop-mcp"],
      "env": {
        "MOATDROP_API_KEY": "mdp_your_key_here"
      }
    }
  }
}

Cursor

Add to your Cursor MCP config (.cursor/mcp.json):

{
  "mcpServers": {
    "moatdrop": {
      "command": "uvx",
      "args": ["moatdrop-mcp"],
      "env": {
        "MOATDROP_API_KEY": "mdp_your_key_here"
      }
    }
  }
}

Claude Code

claude mcp add moatdrop -- uvx moatdrop-mcp

Then set the environment variable:

export MOATDROP_API_KEY="mdp_your_key_here"

Environment Variables

Variable Required Default Description
MOATDROP_API_KEY Yes Your Moatdrop API key (mdp_...)
MOATDROP_API_URL No https://api.moatdrop.com API base URL (for self-hosted or dev)

Available Tools

Link Management

Tool Description
create_link Create a secure link with URL, expiration, IP rules, click limits
list_links List all your secure links
get_link Get full details of a specific link
update_link Update link name, expiration, click limits
delete_link Permanently delete a link (requires confirm=true)
enable_link Re-enable a revoked link
disable_link Revoke/disable a link

Document Queries

Tool Description
deep_extraction Ask a question and get an AI-synthesized answer from a shared file
smart_extraction Extract the most relevant raw sections verbatim, with PII scrubbing

Analytics & Account

Tool Description
get_link_analytics Get raw access logs for a link
get_analytics_summary Aggregated analytics: clicks, unique IPs, top countries, referrers
get_account_info Your account details and plan tier

Available Resources

URI Description
moatdrop://links Summary list of all your links
moatdrop://links/{id} Full details for a specific link
moatdrop://links/{id}/analytics Access logs for a specific link
moatdrop://account Your account info

Querying Files with AI Agents

MoatDrop lets you upload files, create secure links, and then query those files through AI agents using the MCP server. Here's how to set it up end to end.

Step 1: Upload a file and create a secure link

Log in to MoatDrop, click + Create Moat Link, and upload your file (PDF, DOCX, XLSX, etc.). Once created, note the moat link — this is the short code in the secure URL (e.g., if the URL is https://moat.link/abc123, the moat link is abc123).

You can find the moat link on the link detail page under Moat Link.

Step 2: Create a share token

Share tokens let you grant someone query-only access to a specific file without sharing your full API key.

  1. Go to the link detail page for your file
  2. Expand AI Agent Access > Show Setup
  3. Under Create Share Token, enter a name (e.g., "For Acme Corp")
  4. Optionally set an expiration (hours) and max uses
  5. Click Create Token
  6. Copy the token (starts with mds_) — it's shown only once

Step 3: Configure the MCP server

Give the share token to whoever needs to query the file. They add this to their AI assistant config:

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "moatdrop": {
      "command": "uvx",
      "args": ["moatdrop-mcp"],
      "env": {
        "MOATDROP_API_KEY": "mds_your_share_token_here"
      }
    }
  }
}

Cursor / VS Code

Add to .cursor/mcp.json or VS Code MCP settings:

{
  "mcpServers": {
    "moatdrop": {
      "command": "uvx",
      "args": ["moatdrop-mcp"],
      "env": {
        "MOATDROP_API_KEY": "mds_your_share_token_here"
      }
    }
  }
}

Claude Code

claude mcp add moatdrop -- uvx moatdrop-mcp

Then set the environment variable:

export MOATDROP_API_KEY="mds_your_share_token_here"

Step 4: Query the file

Once connected, ask your AI assistant to query the file using the moat link:

Deep extraction (AI-synthesized answers):

"Use the deep_extraction tool with moat_link abc123 and ask: What are the key findings in this report?"

Smart extraction (raw sections with PII scrubbing):

"Use the smart_extraction tool with moat_link abc123 and ask: Show me the sections covering revenue figures across all quarters."

When to use which tool

Tool Best for
deep_extraction Direct answers, summaries, finding specific facts — lets the model do the synthesis
smart_extraction Pulling exact wording of clauses or sections — returns the original text with PII scrubbing

Share token vs API key

Share Token (mds_) API Key (mdp_)
Scope Query access to one specific file Full account access
Safe to share Yes No
Can manage links No Yes
Can view analytics No Yes
Expiration Optional (configurable) Optional
Usage limits Optional (configurable) None

Examples

Once configured, you can ask your AI assistant:

  • "Use deep_extraction with hash abc123: What is the executive summary?"
  • "Use smart_extraction with hash abc123: Show me the action items section of the meeting notes"
  • "Use deep_extraction with hash abc123: What date was the contract signed?"
  • "Use smart_extraction with hash abc123: Pull the termination clauses from this contract"

Development

# Clone and install in dev mode
cd mcp-server
pip install -e .

# Run with a local backend
MOATDROP_API_KEY=mdp_test MOATDROP_API_URL=http://localhost:8000 moatdrop-mcp

# Run tests
pip install pytest
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moatdrop_mcp-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moatdrop_mcp-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file moatdrop_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: moatdrop_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for moatdrop_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f14507a627d73da40113b230fc184a5a8387a0b29df81b50a77f6e8075effe8
MD5 936562bb237a90bdc0770a9c4ed1f76a
BLAKE2b-256 fa792fbd1c1ca9fdf068e821c67aac5233baaeba01e6604e375f49686a63f2ad

See more details on using hashes here.

File details

Details for the file moatdrop_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moatdrop_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for moatdrop_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32991de5799fd19e367701e8e547d8ab6385342283a16f373b080a20c0a9ff7e
MD5 287ff92b879d38147da12c5627309f33
BLAKE2b-256 d812ffa9ce2bb7144b07902a6574c74526cf7cf6b92a1f1d380e9ca30e61ef5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page