Napkin.AI MCP Server logo

Napkin.AI MCP Server

Community
LouisChanCLY

Unofficial MCP server for generating infographics with Napkin AI

PublisherLouisChanCLY
Repositorynapkin-ai-mcp
LanguageTypeScript
Forks
2
Stars
12
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Napkin.AI MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    12 stars and 2 forks from the linked repository.

CI npm version License: MIT

Disclaimer: This is an unofficial, community-maintained MCP server for Napkin AI. It is not affiliated with, endorsed by, or officially supported by Napkin AI or Second Layer, Inc. For official Napkin AI products and support, please visit napkin.ai.

API Compatibility: Tested with Napkin AI API v1.1.16. Newer API versions may introduce breaking changes.

An MCP (Model Context Protocol) server for generating infographics and visuals using the Napkin AI API. This server enables AI assistants like Claude to generate professional visuals from text content.

Features

  • Visual Generation: Generate SVG, PNG, or PPT visuals from text content
  • Multiple Visual Types: Mindmaps, flowcharts, timelines, comparisons, and more (see gallery)
  • Async Handling: Automatic polling for Napkin AI's async generation
  • Multi-Storage Support: Save generated visuals to:
    • Local filesystem
    • Amazon S3 (or S3-compatible services)
    • Google Drive
    • Slack
    • Notion
    • Telegram
    • Discord
  • Flexible Configuration: Environment variables or JSON config file
  • Full TypeScript Support: Comprehensive type definitions with Zod validation
  • Automatic Retries: Exponential backoff for transient failures (429, 5xx)
  • Debug Logging: Set NAPKIN_DEBUG=true for troubleshooting
  • Dry-Run Mode: Validate requests without calling the API
  • CLI Help: Run with --help for usage information

Prerequisites

  • Node.js 18.x or later
  • A Napkin AI API key (currently in developer preview - contact api@napkin.ai)

Quick Start

Installation

bash
npm install -g napkin-ai-mcp

Or use directly with npx:

bash
npx napkin-ai-mcp

Get Your API Key

The Napkin AI API is currently in developer preview. To request access:

  1. Visit napkin.ai
  2. Contact api@napkin.ai for API access

Integration Guides

Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "napkin-ai": {
      "command": "npx",
      "args": ["-y", "napkin-ai-mcp"],
      "env": {
        "NAPKIN_API_KEY": "your-api-key-here"
      }
    }
  }
}

With local storage enabled:

json
{
  "mcpServers": {
    "napkin-ai": {
      "command": "npx",
      "args": ["-y", "napkin-ai-mcp"],
      "env": {
        "NAPKIN_API_KEY": "your-api-key-here",
        "NAPKIN_STORAGE_TYPE": "local",
        "NAPKIN_STORAGE_LOCAL_DIR": "/Users/yourname/napkin-visuals"
      }
    }
  }
}

After updating the config, restart Claude Desktop.


Claude Code (CLI)

Add to your Claude Code MCP settings:

Global config: ~/.claude/settings.json Project config: .claude/settings.json

json
{
  "mcpServers": {
    "napkin-ai": {
      "command": "npx",
      "args": ["-y", "napkin-ai-mcp"],
      "env": {
        "NAPKIN_API_KEY": "your-api-key-here",
        "NAPKIN_STORAGE_TYPE": "local",
        "NAPKIN_STORAGE_LOCAL_DIR": "./visuals"
      }
    }
  }
}

Or run the CLI command:

bash
claude mcp add napkin-ai -- npx -y napkin-ai-mcp

Then set the environment variable:

bash
export NAPKIN_API_KEY="your-api-key-here"

Cursor

Add to your Cursor MCP configuration:

File: ~/.cursor/mcp.json

json
{
  "mcpServers": {
    "napkin-ai": {
      "command": "npx",
      "args": ["-y", "napkin-ai-mcp"],
      "env": {
        "NAPKIN_API_KEY": "your-api-key-here",
        "NAPKIN_STORAGE_TYPE": "local",
        "NAPKIN_STORAGE_LOCAL_DIR": "./visuals"
      }
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration:

File: ~/.windsurf/mcp.json

json
{
  "mcpServers": {
    "napkin-ai": {
      "command": "npx",
      "args": ["-y", "napkin-ai-mcp"],
      "env": {
        "NAPKIN_API_KEY": "your-api-key-here"
      }
    }
  }
}

VS Code with Continue

Add to your Continue configuration:

File: ~/.continue/config.json

json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "napkin-ai-mcp"],
          "env": {
            "NAPKIN_API_KEY": "your-api-key-here"
          }
        }
      }
    ]
  }
}

Cline (VS Code Extension)

Add to your Cline MCP settings in VS Code:

  1. Open VS Code settings
  2. Search for "Cline MCP"
  3. Add the server configuration:
json
{
  "napkin-ai": {
    "command": "npx",
    "args": ["-y", "napkin-ai-mcp"],
    "env": {
      "NAPKIN_API_KEY": "your-api-key-here"
    }
  }
}

Available Tools

Once configured, your AI assistant will have access to these tools:

ToolDescription
generate_visualSubmit a visual generation request (async)
check_statusCheck the status of a generation request
download_visualDownload a generated visual as base64
generate_and_waitGenerate and wait for completion
generate_and_saveGenerate and save to configured storage
list_stylesGet information about available styles
verify_api_keyVerify your API key is valid and working

Example Prompts

Once configured, try these prompts with your AI assistant:

  • "Create a mindmap visualising the key concepts of machine learning"
  • "Generate a flowchart showing the user registration process"
  • "Make a timeline of major events in the history of computing"
  • "Create an infographic comparing REST vs GraphQL APIs"

Configuration

Environment Variables

VariableDescriptionRequired
NAPKIN_API_KEYNapkin AI API keyYes
NAPKIN_API_BASE_URLCustom API base URLNo
NAPKIN_STORAGE_TYPEStorage type: local, s3, google-drive, slack, notion, telegram, discordNo
NAPKIN_POLLING_INTERVALPolling interval in ms (default: 2000)No
NAPKIN_MAX_WAIT_TIMEMax wait time in ms (default: 300000)No

Storage Configuration

Local Storage

Save visuals to a local directory:

bash
NAPKIN_STORAGE_TYPE=local
NAPKIN_STORAGE_LOCAL_DIR=./output

Files are saved with the format: napkin-{request_id}-{index}-{color_mode}.{format}

Note for Claude Desktop users: Claude Desktop runs in a sandboxed environment and cannot access local filesystem paths. While files are saved successfully, Claude Desktop cannot display or open them directly. For Claude Desktop, consider using a cloud storage provider (S3, Google Drive, etc.) which returns accessible URLs. Claude Code has full filesystem access and works seamlessly with local storage.

Amazon S3

Save visuals to an S3 bucket (also works with S3-compatible services like MinIO, DigitalOcean Spaces, Cloudflare R2):

bash
NAPKIN_STORAGE_TYPE=s3
NAPKIN_STORAGE_S3_BUCKET=my-bucket
NAPKIN_STORAGE_S3_REGION=eu-west-1
NAPKIN_STORAGE_S3_PREFIX=napkin-visuals/  # Optional path prefix
NAPKIN_STORAGE_S3_ENDPOINT=https://s3.example.com  # Optional, for S3-compatible services
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key

Required IAM permissions:

json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:PutObject", "s3:GetObject"],
      "Resource": "arn:aws:s3:::my-bucket/napkin-visuals/*"
    }
  ]
}

Google Drive

Save visuals to a Google Drive folder using a service account:

bash
NAPKIN_STORAGE_TYPE=google-drive
NAPKIN_STORAGE_GDRIVE_FOLDER_ID=1ABC...xyz
NAPKIN_STORAGE_GDRIVE_CREDENTIALS=./service-account.json

Setup steps:

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Drive API
  4. Go to "IAM & Admin" → "Service Accounts" → "Create Service Account"
  5. Download the JSON key file and save as service-account.json
  6. Share your target Google Drive folder with the service account email (ends with @*.iam.gserviceaccount.com)
  7. Get the folder ID from the URL: https://drive.google.com/drive/folders/{FOLDER_ID}

Slack

Upload visuals to a Slack channel:

bash
NAPKIN_STORAGE_TYPE=slack
NAPKIN_STORAGE_SLACK_CHANNEL=C0123456789
NAPKIN_STORAGE_SLACK_TOKEN=xoxb-your-bot-token

Setup steps:

  1. Go to Slack API and create a new app
  2. Under "OAuth & Permissions", add these Bot Token Scopes:
    • files:write - Upload files
    • chat:write - Post messages (optional)
  3. Install the app to your workspace
  4. Copy the "Bot User OAuth Token" (starts with xoxb-)
  5. Get the channel ID: right-click a channel → "View channel details" → scroll to the bottom

Note: The bot must be invited to the channel with /invite @your-bot-name

Notion

Upload visuals to a Notion page:

bash
NAPKIN_STORAGE_TYPE=notion
NAPKIN_STORAGE_NOTION_TOKEN=secret_abc123...
NAPKIN_STORAGE_NOTION_PAGE_ID=12345678-abcd-1234-abcd-123456789abc
NAPKIN_STORAGE_NOTION_DATABASE_ID=optional-db-id  # Optional

Setup steps:

  1. Go to Notion Integrations and create a new integration
  2. Copy the "Internal Integration Token" (starts with secret_)
  3. Open the target Notion page and click "..." → "Add connections" → select your integration
  4. Get the page ID from the URL: https://notion.so/Page-Name-{PAGE_ID} (the 32-character ID at the end)

Note: Notion has file size limits. For large visuals, consider using S3 or Google Drive.

Telegram

Send visuals to a Telegram chat or channel:

bash
NAPKIN_STORAGE_TYPE=telegram
NAPKIN_STORAGE_TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
NAPKIN_STORAGE_TELEGRAM_CHAT_ID=-1001234567890

Setup steps:

  1. Message @BotFather on Telegram and create a new bot with /newbot
  2. Copy the bot token (format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
  3. Add the bot to your group/channel as an admin (for channels) or member (for groups)
  4. Get the chat ID:
    • For groups: Add @userinfobot to the group, it will show the chat ID
    • For channels: Forward a message from the channel to @userinfobot
    • For private chats: Send a message to your bot, then visit https://api.telegram.org/bot<TOKEN>/getUpdates

Note: Channel IDs start with -100, group IDs are negative numbers, user IDs are positive.

Discord

Send visuals to a Discord channel via webhook:

bash
NAPKIN_STORAGE_TYPE=discord
NAPKIN_STORAGE_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/123456789/abcdef...
NAPKIN_STORAGE_DISCORD_USERNAME=Napkin AI  # Optional

Setup steps:

  1. Open Discord and go to the channel where you want to receive visuals
  2. Click the gear icon (Edit Channel) → Integrations → Webhooks → New Webhook
  3. Give it a name and optionally upload an avatar
  4. Click "Copy Webhook URL"

Note: No bot setup required - webhooks are the simplest way to post to Discord.

Default Visual Settings

bash
NAPKIN_DEFAULT_FORMAT=svg       # svg, png, or ppt
NAPKIN_DEFAULT_LANGUAGE=en-GB   # BCP 47 language tag
NAPKIN_DEFAULT_COLOR_MODE=light # light, dark, or both
NAPKIN_DEFAULT_ORIENTATION=auto # auto, horizontal, vertical, or square

JSON Configuration

Create a config.json file:

json
{
  "napkinApiKey": "your-api-key",
  "storage": {
    "type": "local",
    "directory": "./visuals"
  },
  "defaults": {
    "format": "svg",
    "language": "en-GB",
    "color_mode": "light"
  }
}

Tool Parameters

generate_visual / generate_and_wait / generate_and_save

ParameterTypeDescription
contentstringRequired. Text content to visualise
formatstringOutput format: svg, png, or ppt (default: svg)
dry_runbooleanValidate request without calling API (default: false)
contextstringAdditional context for generation (not shown in visual)
languagestringBCP 47 language tag (e.g., en-GB). Default: en
style_idstringNapkin AI style identifier. See styles
visual_idstringRegenerate a specific visual layout with new content
visual_idsstring[]Array of visual IDs (length must match number_of_visuals)
visual_querystringVisual type: mindmap, flowchart, timeline, etc.
visual_queriesstring[]Array of visual queries (length must match number_of_visuals)
number_of_visualsnumberVariations to generate (1-4, default: 1)
transparent_backgroundbooleanUse transparent background (default: false)
color_modestringlight, dark, or both (default: light)
widthnumberWidth in pixels (PNG only, 100-10000)
heightnumberHeight in pixels (PNG only, 100-10000)
orientationstringauto, horizontal, vertical, or square
text_extraction_modestringauto, rewrite, or preserve (default: auto)
sort_strategystringrelevance, random, or variation (default: relevance)

Note: visual_id/visual_ids and visual_query/visual_queries are mutually exclusive.


Example Output

Here are some examples of visuals generated using this MCP server. Each example shows the input text and the resulting visual.

Mind Map

Input text:

# Benefits of Visual Communication

## Speed
- Processed 60,000x faster than text
- Instant pattern recognition

## Retention
- 80% of what we see is remembered
- Only 20% of text is retained

## Engagement
- 94% more views than text-only
- Higher social sharing rates

Parameters: format: "svg", visual_query: "mindmap", language: "en-GB"

Mind Map Example

Flowchart

Input text:

# User Registration Flow

1. User clicks "Sign Up" button
2. Enter email address
3. System validates email format
4. If invalid, show error message
5. If valid, send verification email
6. User clicks verification link
7. Create password
8. Validate password strength
9. If strong, create account
10. Redirect to dashboard

Parameters: format: "svg", visual_query: "flowchart", language: "en-GB"

Flowchart Example

Timeline

Input text:

# History of Artificial Intelligence

## 1950
Alan Turing publishes "Computing Machinery and Intelligence"

## 1956
The term "Artificial Intelligence" is coined

## 1997
IBM's Deep Blue defeats world chess champion

## 2016
AlphaGo defeats Go world champion Lee Sedol

## 2022
ChatGPT launches, bringing LLMs to the mainstream

Parameters: format: "svg", visual_query: "timeline", language: "en-GB"

Timeline Example

See more examples at the Napkin AI Gallery.


Visual Query Types

  • mindmap - Mind map visualisations
  • flowchart - Process flows and diagrams
  • timeline - Chronological events
  • comparison - Side-by-side comparisons
  • hierarchy - Organisational structures
  • cycle - Cyclical processes
  • list - Bulleted or numbered lists
  • matrix - Grid-based comparisons

Programmatic Usage

typescript
import { NapkinClient, createNapkinMcpServer } from "napkin-ai-mcp";

// Use the client directly
const client = new NapkinClient({
  apiKey: "your-api-key",
});

const result = await client.generateAndWait({
  format: "svg",
  content: "# My Visual\n\n- Point 1\n- Point 2",
  visual_query: "mindmap",
});

// Download the file using the URL from generated_files
if (result.generated_files && result.generated_files.length > 0) {
  const buffer = await client.downloadFile(result.generated_files[0].url);
  // buffer contains the SVG content
}

Development

bash
# Clone the repository
git clone https://github.com/LouisChanCLY/napkin-ai-mcp.git
cd napkin-ai-mcp

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Build for production
npm run build

Troubleshooting

"NAPKIN_API_KEY is required"

Ensure you've set the NAPKIN_API_KEY environment variable in your MCP configuration.

"Storage not configured"

The generate_and_save tool requires storage configuration. Add one of the storage configurations above.

Visual generation times out

Increase NAPKIN_MAX_WAIT_TIME (default: 300000ms = 5 minutes).

Connection issues

  1. Ensure Node.js 18+ is installed
  2. Check your API key is valid
  3. Verify network connectivity to api.napkin.ai

API Reference


Licence

MIT


Contributing

Contributions are welcome! Please read our Contributing Guide before submitting pull requests.

Use Napkin.AI MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Napkin.AI MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Napkin.AI MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Napkin.AI MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "napkin-ai-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Napkin.AI MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Napkin.AI MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Napkin.AI MCP Server to help me with this task?
Napkin.AI MCP Server
Sure. I read it.
Here is what I found using Napkin.AI MCP Server.

Frequently asked questions

What is the Napkin.AI MCP Server MCP server used for?

Napkin.AI MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Napkin.AI MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Napkin.AI MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Napkin.AI MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Napkin.AI MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Napkin.AI MCP Server MCP to TypingMind?

Napkin.AI MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Napkin.AI MCP Server MCP provide in TypingMind?

Napkin.AI MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Napkin.AI MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Napkin.AI MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇