MCP Integration for AI Agents

Overview

MCP (Model Context Protocol) tools enable AI assistants like Claude to generate PDFs through natural conversation. Connect your AI agents to use your custom templates for intelligent document creation.

Benefits of Template-First MCP Integration

  • Custom Template Usage: AI agents use your specific template names
  • Intelligent Data Collection: AI guides users to provide the right information
  • Professional Output: Your custom templates ensure consistent, polished documents
  • No HTML Generation: AI works with structured data, not markup
  • Brand Consistency: All documents use your custom designs and branding

Setting Up MCP Tools

For Claude Desktop

1

Open Claude Web App

Navigate to claude.ai in your web browser and sign in to your account
2

Access Tools

Click the tools icon located in the center below the search bar
3

Manage Connectors

In the settings menu, click on “Manage connectors” to view your MCP integrations
4

Add Custom Connector

Click “Add custom connector” and configure the following:
  • Name: Peedief
  • Remote MCP server URL: https://peedief.com/api/mcp
5

Connect to Server

Click the “Connect” button to initiate the connection to the Peedief MCP server
6

Authenticate

You’ll be prompted to login with your Peedief account credentials to authorize the connection
7

Complete Setup

Once authenticated, the connector will be active and ready to use for PDF generation within Claude conversations

For n8n

1

Generate an API Key

First, you’ll need to create an API key for authentication:
  • Login to https://peedief.com
  • Go to API Keys section
  • Click “Create API Key”
  • Name your API key (e.g., “n8n Integration”)
  • Hit “Create API Key”
  • Copy the API key and store it securely
2

Access AI Agent in n8n

In your n8n workflow, when using an AI Agent node
3

Add MCP Client Tool

Click the + icon near the “Tool” section, then select “MCP Client Tool”
4

Configure SSE Endpoint

Set the SSE Endpoint to: https://peedief.com/api/sse
5

Set Authentication

  • Authentication: Header Auth
  • Credential for Header Auth: Create new Credential
6

Create Header Auth Credential

In the credential creation dialog:
  • Name: x-api-key
  • Value: YOUR_API_KEY (paste your API key from step 1)
  • Click “Save and Close”
7

Select Credential

Select the newly created credential in the “Credential for Header Auth” dropdown
8

Configure Tools

Set “Tools to Include” to “All” to enable all Peedief MCP tools

Using MCP Tools

Once configured, AI agents can generate PDFs using specific template names through natural conversation.

Template Name Workflow

Using Your Custom Template Names:
You: "Use template 'my-company-certificate' to create a certificate for John Smith completing Python Programming course today"

AI: I'll create a certificate using your template 'my-company-certificate' for John Smith.

[AI uses Peedief MCP tool with your template name 'my-company-certificate']

Certificate created successfully!
- Template: my-company-certificate
- Recipient: John Smith
- Course: Python Programming
- Completion Date: January 30, 2024
- Uses your custom design and branding

Download: [Certificate - John Smith - Python Programming]
Template Creation Required: Before using MCP tools, you must first create templates in your Peedief dashboard. Each template you create has a name that you can reference in AI conversations.

Template-Based PDF Generation

Certificate Generation with Your Template:
You: "Use template 'advanced-course-certificate' to create a certificate for John Smith who finished Advanced JavaScript yesterday with A+ grade, instructor Dr. Sarah Wilson"

AI: I'll create a professional certificate using your template 'advanced-course-certificate'.

[AI uses Peedief MCP tool with your template name 'advanced-course-certificate']

Perfect! I've generated a professional certificate with the following details:
- Template: advanced-course-certificate (your custom design)
- Recipient: John Smith  
- Course: Advanced JavaScript
- Completion Date: January 29, 2024
- Grade: A+
- Instructor: Dr. Sarah Wilson

The certificate uses your custom template design and branding.

Download: [Advanced JavaScript Certificate - John Smith]

Advanced Template Usage

Invoice Generation with Your Template:
You: "Use template 'business-invoice-template' to generate an invoice for TechStart Inc. Include these services: 
- Web Development: 40 hours at $125/hour
- SEO Optimization: 10 hours at $200/hour  
- Invoice number should be INV-2024-001, due in 30 days, 8% tax rate"

AI: I'll create a professional invoice using your template 'business-invoice-template'.

[AI uses Peedief MCP tool with your template name 'business-invoice-template']

I've generated Invoice INV-2024-001 for TechStart Inc with:

Services:
- Web Development: 40 hrs × $125 = $5,000.00
- SEO Optimization: 10 hrs × $200 = $2,000.00

Subtotal: $7,000.00
Tax (8%): $560.00
Total: $7,560.00

Due Date: February 29, 2024

The invoice includes your company branding, payment terms, and professional formatting.

Download: [Invoice INV-2024-001 - TechStart Inc](https://storage.../invoice-techstart-001.pdf)

Multi-Template Workflows

Report Generation with Multiple Templates:
You: "I need to create a quarterly business report that includes a cover page, executive summary, financial charts, and an appendix with detailed data tables. Use our Q4 2024 financial data."

AI: I'll create a comprehensive quarterly report using multiple templates.

[AI uses your specified report templates]

I've generated your Q4 2024 quarterly business report using:

1. **Professional Cover Page** - Company branding and report title
2. **Executive Summary** - Key metrics and highlights  
3. **Financial Charts** - Revenue trends, expense breakdown, profit margins
4. **Data Tables** - Detailed monthly figures and departmental budgets

The report includes:
- Total Pages: 12
- Charts: 4 financial visualizations
- Tables: 6 detailed data tables
- Professional formatting throughout

Download: [Q4 2024 Business Report](https://storage.../q4-2024-business-report.pdf)

MCP Tool Capabilities

The Peedief MCP tools enable AI agents to:

Template Usage

Use your custom template names for document generation

Data Collection

AI gathers required information through conversation

Data Validation

Validate user input against template schemas

PDF Generation

Generate professional PDFs from structured data

Error Handling

Graceful handling of missing or invalid data

Usage Tracking

Monitor API usage and generation limits

Supported AI Assistants

Claude Desktop

  • Full support with native MCP integration
  • Easy setup through settings menu
  • Automatic updates for tool improvements

Other MCP-Compatible Clients

  • ✅ Any client supporting MCP protocol
  • ✅ Custom authentication setup
  • ✅ Standard MCP tool interface
While Claude Desktop is the primary supported platform, any MCP-compatible AI client can use Peedief tools with proper configuration.

Troubleshooting MCP Setup

Common Issues

“Tool not found” Error:
  • Verify MCP server configuration is correct
  • Check that your API key is valid
  • Restart Claude Desktop after configuration changes
Authentication Failures:
  • Confirm API key has sufficient permissions
  • Check if your API key has expired
  • Verify the key is correctly set in environment variables
PDF Generation Fails:
  • Ensure your account has remaining PDF credits
  • Check if HTML content is valid
  • Verify network connectivity to Peedief servers

Getting Help

Usage Limits

MCP tool usage counts toward your regular Peedief plan limits:
  • Free Plan: 5 PDFs total
  • Starter Plan: 500 PDFs per month
  • Basic Plan: 1,500 PDFs per month
  • Premium Plan: 5,000 PDFs per month
Monitor your usage in the dashboard to avoid hitting limits during AI conversations.

Next Steps

Try It Out

Set up MCP tools with your AI assistant and start generating PDFs through natural conversation. The integration makes PDF creation seamless and intuitive!