# Papermark MCP

> Papermark (Docsend Alternative) connects secure document sharing and detailed engagement analytics directly into your AI agent. Use this server to upload PDFs, create password-protected links with custom slugs, and pull precise view statistics—all without leaving your chat window. It handles the entire lifecycle of sensitive corporate content.

## Overview
- **Category:** marketing-automation
- **Price:** Free
- **Tags:** document-tracking, engagement-analytics, secure-sharing, pdf-management, link-analytics, sales-enablement

## Description

Look, you're tired of bouncing between dashboards just to check if someone opened a PDF. Papermark lets your agent handle all that sensitive document sharing and analytics right inside your chat window. It’s like having an executive assistant who never leaves the desk.

**Document Management:** You can start by seeing exactly what documents you've stored; simply asking for the inventory runs `list_documents`, giving you a complete list of every PDF in your account. If you got new files, you upload them directly using `upload_document` by passing the content via base64 encoding. This keeps everything locked down.

**Creating Secure Links:** Need to share something? You run `create_link` and it generates a unique, highly secure link for whatever document you choose. You aren't just getting a random URL; you can enforce strict security rules—it’ll require a password or check against a list of required email addresses before anyone even sees the first page. These links also come with custom slugs so they look clean and professional.

**Tracking Link Views and Analytics:** Once the link is out, you gotta know who's looking at it. You use `get_link_views` to pull detailed usage data for any specific link. This shows you total views, exactly when people opened it, how long they spent on each page, and even provides visitor information. It’s deep analytics without leaving the chat.

**Controlling Access:** Sometimes things change fast. If a deal falls through or you need to restrict access immediately, you can run `delete_link` to permanently wipe out the link and revoke all access instantly. You also use `update_link` if you just need to tweak something—maybe changing its active status or tightening up the permissions without having to delete and recreate it.

Your agent handles the entire lifecycle of corporate files. It takes your instructions, executes the necessary tool calls, and reports back on everything from uploading a file to telling you precisely who viewed that PDF and when they left the page. You'll manage secure document sharing and detailed engagement tracking entirely through natural conversation.

## Tools

### create_link
Generates a new, secure shareable link for an existing document.

### delete_link
Permanently removes and revokes access to a specific shared link.

### get_link_views
Retrieves detailed view statistics, including visitor data, for any given link.

### list_documents
Outputs an inventory of all documents currently stored in your Papermark account.

### update_link
Modifies the settings and permissions for an existing shared link.

### upload_document
Adds a new PDF document to your secure repository via base64 encoding.

## Prompt Examples

**Prompt:** 
```
List all my documents in Papermark.
```

**Response:** 
```
I've retrieved your documents. You have 3 files: 'Q4_Investor_Deck.pdf' (ID: doc_1), 'Sales_Proposal.pdf' (ID: doc_2), and 'Product_Roadmap.pdf' (ID: doc_3).
```

**Prompt:** 
```
Create a shareable link for document 'doc_1' with the slug 'pitch-deck' and require an email.
```

**Response:** 
```
Link created successfully! You can share it at: papermark.io/view/pitch-deck. It is configured to require an email address before viewing.
```

**Prompt:** 
```
Show me the view history and analytics for link ID 'link_999'.
```

**Response:** 
```
Fetching analytics... Link 'link_999' has 15 total views. Most viewers spent an average of 2 minutes on page 4. Would you like a breakdown of the visitor emails?
```

## Capabilities

### List Document Inventory
Retrieves a complete list of every PDF and file currently stored in your Papermark account.

### Upload New Documents
Adds new PDFs to your repository by passing the content via base64 encoding.

### Create Secure Links
Generates unique, shareable links for any document and applies security rules (passwords, required emails).

### Track Link Views and Analytics
Pulls detailed usage data on a link, showing total views, average time spent, and visitor information.

### Revoke or Modify Link Access
Modifies settings on an existing link (like changing its status) using `update_link`, or permanently deletes it with `delete_link`.

## Use Cases

### The Sales Pitch Audit
You send a critical Q3 investor deck and need to know if key stakeholders actually opened it. You ask your agent to run `get_link_views` on the specific link. The agent immediately reports back: '12 total views, with John Doe spending 4 minutes on slide 7.' No guesswork required.

### Gated Content Launch
Marketing needs to distribute a new whitepaper but only wants Fortune 500 executives to see it. Instead of emailing the file, you ask your agent to `create_link` with 'Fortune 500' as the required email domain. The content stays locked until they prove who they are.

### The Off-Boarding Cleanup
A contractor leaves the company, and you need to ensure they can't access any old project materials. You tell your agent: 'Find all links related to Project X and run `delete_link`.' The agent handles the cleanup across multiple assets in seconds.

### Content Refresh
Your team updated a core sales proposal. Instead of manually replacing the old link, you use `upload_document` to add the new version and then `update_link` to point all active links to the fresh PDF.

## Benefits

- See exactly how many times a deck was viewed. The `get_link_views` tool pulls analytics instantly, telling you if the client stalled at page 3 or finished the whole thing.
- Control access like never before. Use `create_link` to generate links that require specific passwords or email addresses, keeping sensitive IP locked down.
- Manage your content library in one spot. With `list_documents`, you get a full inventory of all assets without navigating separate web dashboards.
- Clean up old access points fast. Need to revoke a link? Running `delete_link` instantly removes the document from public view, no questions asked.
- Add new content on the fly. The `upload_document` tool lets your agent ingest PDFs into Papermark directly when you need them for a project.

## How It Works

The bottom line is: you tell your AI what to do—the server handles the API calls, data retrieval, and formatting for you.

1. Subscribe to the Papermark server and input your API Key.
2. Your AI client processes a request (e.g., 'Get views for link X' or 'Upload Y').
3. The agent executes the appropriate tool, fetches the data from Papermark, and returns the actionable result directly in your chat.

## Frequently Asked Questions

**How do I list all my documents using the Papermark MCP Server?**
Run `list_documents`. This tool pulls a full inventory of every PDF stored in your account, giving you IDs and filenames immediately.

**Can I make a link require an email address with create_link?**
Yes. When using `create_link`, you can specify required parameters, such as mandating that the viewer must provide a valid email before viewing the content.

**What does get_link_views return for link analytics?**
The `get_link_views` tool provides detailed metrics: total view count, average time spent on the document, and sometimes a breakdown of visitor emails.

**Is it safe to use delete_link if I change my mind?**
Yes. `delete_link` permanently removes the link from Papermark's active list, ensuring no one can access it again. It’s a final action for revoking access.

**What data format does the `upload_document` tool require?**
The tool requires the PDF content encoded in Base64. You must pass the raw document bytes, converted to a standard Base64 string, along with an optional filename.

**How do I use the `update_link` tool if I only want to change the expiry date?**
The `update_link` tool lets you modify various settings besides security. You simply pass the existing link ID and a JSON object containing the specific field, like 'expiry_date', with its new value.

**If I call `get_link_views` and receive an empty list, what does that mean?**
An empty view list usually means no activity was logged within the specified time range. It doesn't necessarily mean the link was never viewed; check your date filters.

**What happens if I try to use `create_link` for a document that is already shared?**
The API will return an error code and message, telling you which specific asset ID or link slug is already active. You need to reference the existing link's unique identifier.

**How do I see the engagement data for a specific link?**
Use the `get_link_views` tool with the Link ID. It returns detailed analytics including view counts and engagement metrics for that specific shareable URL.

**Can I set an expiration date or password for my document links?**
Yes, when using `create_link`, you can provide an `expirationDate` (ISO 8601) or a `password` to secure your document access.

**Is it possible to deactivate a link without deleting it?**
Yes, use the `update_link` tool and set the `active` parameter to `false`. This revokes access while keeping the link in your records.