Skip to main content

AI Agents

Connect your AI agents to Typograph and unlock the power of automated document generation, file management, and creative workflows.

The Typograph MCP Server implements the Model Context Protocol — the open standard adopted by Anthropic, OpenAI, and Google for connecting AI to external tools and data.

Production URL: https://mcp.typograph.nl

What AI Agents Can Do

With 55 tools available, your AI agents can:

  • Manage content - Create and organize teams, projects, and templates
  • Generate documents - Create PDFs, images, and other formats from templates
  • Convert files - Transform between file formats
  • Collaborate - Share resources, manage permissions, invite users
  • Search - Find projects, templates, and resources

Quick Start

Typograph runs the MCP server as a hosted HTTP service at https://mcp.typograph.nl — there is nothing to install locally.

Claude Desktop (and other MCP clients)

Point your MCP client's mcpServers config at the hosted URL:

{
"mcpServers": {
"typograph": {
"url": "https://mcp.typograph.nl/mcp"
}
}
}

On the first tool call you'll receive an auth_required response with a browser URL — open it, authorize, and the session is stored.

Direct HTTP (JSON-RPC)

POST https://mcp.typograph.nl/mcp
Content-Type: application/json

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "team_list",
"arguments": {}
}
}

Authentication

The MCP server uses OAuth 2.0 Authorization Code flow with automatic token management.

How Authentication Works

  1. First tool call - If no valid token exists, the server returns an auth_required response with an authorization URL
  2. User authorization - Open the URL in a browser to authorize the application
  3. Automatic token storage - Tokens are securely stored (AES-256-GCM encrypted)
  4. Automatic refresh - Tokens are refreshed automatically when expired

Auth Required Response

{
"type": "auth_required",
"auth_uri": "https://api.typograph.nl/oauth/authorize?client_id=...",
"scopes": ["identity:read", "file", "document", "publisher", "converter", "subscription:read", "offline_access"]
}

Required Scopes

ScopeDescription
identity:readUser profile access
fileTeam, project, and template management
documentDocument validation
publisherPDF and image generation
converterFile format conversion
subscription:readSubscription and usage info
offline_accessRefresh token support

Available Tools

Account Management

ToolDescription
account_whoamiGet current user profile (ID, email, role, scopes)
account_logoutRevoke access token and log out

Teams

ToolDescription
team_listList teams with pagination
team_getGet team details by ID
team_createCreate a new team
team_updateUpdate team name
team_deleteSoft delete a team
team_restoreRestore a deleted team

Projects

ToolDescription
project_listList projects in a team
project_list_sharedList projects shared with you
project_getGet project details
project_createCreate a new project
project_updateUpdate project name
project_deleteSoft delete a project
project_restoreRestore a deleted project

Templates

ToolDescription
template_listList templates in a project
template_list_sharedList templates shared with you
template_getGet template details
template_createCreate a new template
template_updateUpdate template name
template_touchUpdate modification timestamp
template_deleteSoft delete a template
template_restoreRestore a deleted template

Media & Fonts

ToolDescription
media_listList media assets in a project
media_get_urlsGet presigned download URLs for media
font_listList fonts in a project
font_updateUpdate font display name
font_get_urlsGet presigned download URLs for fonts

File Uploads

ToolDescription
upload_listList upload jobs
upload_createCreate upload job and get presigned URL
upload_processStart processing an uploaded file

Document Generation (Publisher)

ToolDescription
publisher_job_listList generation jobs with status
publisher_job_getGet job details by ID
publisher_job_createCreate a document generation job
publisher_job_filesGet output files from completed job

Example: Generate a PDF

{
"name": "publisher_job_create",
"arguments": {
"template_url": "https://storage.typograph.nl/templates/invoice.json",
"data_url": "https://your-server.com/data.json",
"output_format": "pdf"
}
}

File Conversion (Converter)

ToolDescription
converter_job_listList conversion jobs
converter_job_getGet conversion job details
converter_job_createCreate a file conversion job
converter_job_filesGet output files from completed job

Document Validation

ToolDescription
document_validateValidate a document template against schema
ToolDescription
searchFull-text search across projects, templates, and resources

Example: Search templates

{
"name": "search",
"arguments": {
"query": "invoice",
"type": "template"
}
}

Notifications

ToolDescription
notification_listList user notifications
notification_mark_readMark notification as read
notification_mark_unreadMark notification as unread
notification_mark_all_readMark all notifications as read

Invitations & Sharing

ToolDescription
invite_list_resourceList invites for a resource
invite_list_myList invites sent to you
invite_createSend an invite to a user
invite_acceptAccept an invitation
invite_declineDecline an invitation
invite_deleteDelete/revoke an invitation

Access Control

ToolDescription
role_listList roles for a resource
role_updateUpdate user/team role
role_deleteRemove user/team from resource

Contacts

ToolDescription
contact_listList team contacts
contact_createAdd a contact to a team

Favorites & Recent

ToolDescription
favorite_listList favorite projects/templates
favorite_toggleToggle favorite status
recent_templatesList recently viewed templates
recent_searchesList recent search queries

Trash

ToolDescription
trash_listList deleted items in trash

HTTP Endpoints

EndpointDescription
POST /mcpJSON-RPC 2.0 endpoint for tool calls
GET /oauth/authorizeInitiate OAuth authorization
GET /oauth/callbackOAuth callback handler
GET /.well-known/oauth-authorization-serverOAuth server metadata (RFC 8414)
GET /.well-known/oauth-protected-resourceProtected resource metadata (RFC 9728)
GET /healthHealth check endpoint

OAuth Discovery

The MCP server implements OAuth 2.0 metadata discovery:

curl https://mcp.typograph.nl/.well-known/oauth-authorization-server

Response:

{
"issuer": "https://mcp.typograph.nl",
"authorization_endpoint": "https://api.typograph.nl/oauth/authorize",
"token_endpoint": "https://api.typograph.nl/oauth/token",
"scopes_supported": ["identity:read", "file", "document", "publisher", "converter", "subscription:read", "offline_access"],
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code", "refresh_token"],
"code_challenge_methods_supported": ["S256"]
}

Response Format

Success Response

{
"type": "success",
"data": {
"teams": [
{
"id": "019b28fb-a11e-7641-a28f-e978f892ec06",
"name": "Marketing",
"created_at": "<ISO 8601 timestamp>"
}
]
},
"pagination": {
"total": 1,
"page": 1,
"page_size": 20
}
}

Error Response

{
"type": "error",
"code": "not_found",
"message": "Team not found"
}

Auth Required Response

{
"type": "auth_required",
"auth_uri": "https://api.typograph.nl/oauth/authorize?...",
"scopes": ["identity:read", "file", "document", "publisher", "converter", "subscription:read", "offline_access"]
}

Example Workflows

Generate a Document

1. team_list → Get available teams
2. project_list → List projects in team
3. template_list → Find the template
4. publisher_job_create → Create generation job
5. publisher_job_get → Check job status (poll until completed)
6. publisher_job_files → Download generated files

Upload and Use Media

1. upload_create → Get presigned upload URL
2. [Upload file to presigned URL]
3. upload_process → Process the uploaded file
4. media_list → Verify media is available
5. template_update → Reference media in template

Share a Project

1. project_get → Get project details
2. invite_create → Send invite to collaborator
3. role_list → Verify roles assigned

Security

Token Encryption

All refresh tokens are encrypted using AES-256-GCM before storage. Access tokens are kept in memory only.

Session Isolation

Each MCP client connection gets an isolated session. Tokens from one session cannot be accessed by another.

Output Sanitization

Sensitive data (tokens, secrets) is automatically redacted from tool responses.

Configuration

Environment Variables

VariableDescriptionDefault
OAUTH_CLIENT_IDOAuth client IDRequired
OAUTH_CLIENT_SECRETOAuth client secretRequired
OAUTH_REDIRECT_URIOAuth callback URLhttp://localhost:3000/oauth/callback
OAUTH_AUTHORIZE_URLAuthorization endpointhttps://api.typograph.nl/oauth/authorize
OAUTH_TOKEN_URLToken endpointhttps://api.typograph.nl/oauth/token
OAUTH_SCOPESComma-separated scopesidentity:read,file,document,publisher,converter,subscription:read,offline_access
TOKEN_ENCRYPTION_KEY32+ char encryption keyRequired
TYPOGRAPH_API_BASE_URLAPI base URLhttps://api.typograph.nl
MCP_SERVER_HOSTServer host0.0.0.0
MCP_SERVER_PORTServer port3000

Rate Limits

MCP server requests ultimately hit the Typograph API Gateway, so they're subject to the same tiered rate limits — categorized per endpoint and driven by your organization's subscription. See Rate Limiting.

Best Practices

For AI Agent Developers

  1. Handle auth_required responses - Prompt users to authorize when needed
  2. Poll job status - Use exponential backoff when checking job completion
  3. Use pagination - Large result sets are paginated; iterate through pages
  4. Cache team/project IDs - Reduce API calls by caching resource identifiers
  5. Check scopes - Verify your client has required scopes before operations

Error Handling

async function callTool(name, args) {
const response = await mcpClient.callTool(name, args);

if (response.type === 'auth_required') {
// Prompt user to open auth_uri in browser
console.log('Please authorize:', response.auth_uri);
return;
}

if (response.type === 'error') {
console.error(`Error: ${response.code} - ${response.message}`);
return;
}

return response.data;
}

Standards Compliance

  • MCP Protocol: 2024-11-05 specification
  • OAuth 2.0: RFC 6749, RFC 7636 (PKCE)
  • OAuth Metadata: RFC 8414, RFC 9728
  • JSON-RPC: 2.0 specification