npm package: @marcelocorrea/mcp-zapsign
Description: MCP Server for ZapSign - Electronic signature platform API integration
Author: Marcelo Correa
Latest version: 2.0.0

# @marcelocorrea/mcp-zapsign

MCP Server for ZapSign - Electronic signature platform API integration.

This MCP server allows Claude and other AI assistants to interact with the ZapSign API for managing electronic document signatures.

## Installation

```bash
npm install -g @marcelocorrea/mcp-zapsign
```

Or install locally in your project:

```bash
npm install @marcelocorrea/mcp-zapsign
```

## Configuration

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `ZAPSIGN_API_TOKEN` | Yes | Your ZapSign API token |
| `ZAPSIGN_SANDBOX` | No | Set to `true` to use sandbox environment |

### Getting your API Token

1. Log in to your ZapSign account at [app.zapsign.com.br](https://app.zapsign.com.br)
2. Go to **Settings > Integrations > API**
3. Copy your API token

For testing, use the sandbox environment at [sandbox.app.zapsign.com.br](https://sandbox.app.zapsign.com.br)

## Usage with Claude Desktop

Add this configuration to your Claude Desktop config file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
**Linux**: `~/.config/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "zapsign": {
      "command": "npx",
      "args": ["@marcelocorrea/mcp-zapsign"],
      "env": {
        "ZAPSIGN_API_TOKEN": "your-api-token-here",
        "ZAPSIGN_SANDBOX": "true"
      }
    }
  }
}
```

Or if installed globally:

```json
{
  "mcpServers": {
    "zapsign": {
      "command": "mcp-zapsign",
      "env": {
        "ZAPSIGN_API_TOKEN": "your-api-token-here",
        "ZAPSIGN_SANDBOX": "true"
      }
    }
  }
}
```

## Available Tools

### Account Management

| Tool | Description |
|------|-------------|
| `zapsign_get_plan_info` | Get information about the current plan and account |
| `zapsign_list_users` | List all users in the account |
| `zapsign_create_user` | Create a new user |
| `zapsign_delete_user` | Delete a user |

### Document Management

| Tool | Description |
|------|-------------|
| `zapsign_create_document` | Create a new document for signing |
| `zapsign_create_document_from_template` | Create a document from a template |
| `zapsign_get_document` | Get document details |
| `zapsign_list_documents` | List all documents |
| `zapsign_delete_document` | Delete a document |
| `zapsign_cancel_document` | Cancel a document |
| `zapsign_get_document_history` | Get document activity history |
| `zapsign_add_attachment` | Add an attachment to a document |

### Signer Management

| Tool | Description |
|------|-------------|
| `zapsign_get_signer` | Get signer details |
| `zapsign_update_signer` | Update signer information |
| `zapsign_add_signer` | Add a new signer to a document |
| `zapsign_delete_signer` | Remove a signer |
| `zapsign_send_notification` | Send notification to a signer |

### Template Management

| Tool | Description |
|------|-------------|
| `zapsign_list_templates` | List all templates |
| `zapsign_get_template` | Get template details |
| `zapsign_delete_template` | Delete a template |

### Webhook Management

| Tool | Description |
|------|-------------|
| `zapsign_create_webhook` | Create a webhook |
| `zapsign_delete_webhook` | Delete a webhook |

## Examples

### Creating a document with Claude

```
Claude, create a document for electronic signature with the following details:
- Name: "Service Contract"
- PDF URL: https://example.com/contract.pdf
- Signer: John Smith, email: john@example.com
- Send automatic email notification
```

### Checking document status

```
Claude, check the status of document with token "abc123..."
```

### Creating document from template

```
Claude, create a document from template "xyz789..." for Maria Silva (maria@example.com)
with the following data:
- CLIENT_NAME: Maria Silva
- CONTRACT_VALUE: R$ 5.000,00
```

## Authentication Modes

ZapSign supports various authentication modes for signers:

| Mode | Description | Cost |
|------|-------------|------|
| `assinaturaTela` | Screen signature | Free |
| `tokenEmail` | Email token verification | Free |
| `assinaturaTela-tokenEmail` | Screen + Email token | Free |
| `tokenSms` | SMS token verification | R$ 0.10 |
| `assinaturaTela-tokenSms` | Screen + SMS token | R$ 0.10 |
| `tokenWhatsapp` | WhatsApp token verification | 5 credits |
| `assinaturaTela-tokenWhatsapp` | Screen + WhatsApp token | 5 credits |
| `certificadoDigital` | Digital certificate | 5 credits |

## Document Status

- `pending`: Document is awaiting signatures
- `signed`: All signers have signed the document

## Signer Status

- `new`: Signer was created
- `link-opened`: Signer opened the signing link
- `signed`: Signer completed the signature

## Error Handling

The MCP server returns errors in the following format:

```json
{
  "content": [
    {
      "type": "text",
      "text": "Error: ZapSign API Error: 400 - {\"detail\": \"error message\"}"
    }
  ],
  "isError": true
}
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## License

MIT

## Related Documentation

- [ZapSign API Documentation](https://docs.zapsign.com.br)
- [MCP Protocol Documentation](https://modelcontextprotocol.io)
- [ZAPSIGN.md](./ZAPSIGN.md) - About ZapSign platform and features