npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

telegraph-mcp

v1.2.0

Published

MCP server for Telegraph API - create and manage Telegraph pages

Readme

Telegraph MCP Server

npm version License: MIT

An MCP (Model Context Protocol) server that exposes the Telegraph API as tools for Claude and other LLM clients. This allows AI assistants to create, edit, and manage Telegraph pages programmatically.

Related Projects

This is part of the Telegraph tools ecosystem:

| Project | Description | Package | |---------|-------------|---------| | telegraph-mcp (this) | MCP Server for AI assistants (TypeScript) | npm | | telegraph-mcp-py | MCP Server for AI assistants (Python) | PyPI | | telegraph-js | JavaScript/TypeScript library | npm | | telegraph-py | Python library | PyPI |

Quick Start

npx telegraph-mcp

Or add to Claude Code:

claude mcp add telegraph -- npx telegraph-mcp

Features

  • 13 Telegraph API tools covering all Telegraph functionality
  • Create and manage Telegraph accounts
  • Create, edit, and retrieve Telegraph pages
  • View statistics for pages
  • Markdown support - Write content in Markdown, automatically converted to Telegraph format
  • Templates - Pre-built templates for blog posts, documentation, articles, changelogs, and tutorials
  • Export/Backup - Export pages to Markdown or HTML, backup entire accounts
  • MCP Resources - Access Telegraph pages as MCP resources
  • MCP Prompts - Pre-defined prompts for common tasks

Installation

Option 1: Via npm (Recommended)

# With Claude Code
claude mcp add telegraph -- npx telegraph-mcp

# Or globally
npm install -g telegraph-mcp

Option 2: From Source

git clone https://github.com/NehoraiHadad/telegraph-mcp.git
cd telegraph-mcp
npm install
npm run build
claude mcp add telegraph -- node $(pwd)/dist/index.js

Usage with Claude Code

claude mcp add telegraph -- npx telegraph-mcp

Usage with Claude Desktop

Add this to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "telegraph": {
      "command": "npx",
      "args": ["-y", "telegraph-mcp"]
    }
  }
}

Available Tools

Account Management

| Tool | Description | Auth Required | |------|-------------|---------------| | telegraph_create_account | Create a new Telegraph account | No | | telegraph_edit_account_info | Update account information | Yes | | telegraph_get_account_info | Get account details | Yes | | telegraph_revoke_access_token | Revoke and regenerate access token | Yes |

Page Management

| Tool | Description | Auth Required | |------|-------------|---------------| | telegraph_create_page | Create a new Telegraph page (supports Markdown!) | Yes | | telegraph_edit_page | Edit an existing page | Yes | | telegraph_get_page | Get a page by path | No | | telegraph_get_page_list | List all pages for an account | Yes | | telegraph_get_views | Get view statistics for a page | No |

Templates

| Tool | Description | Auth Required | |------|-------------|---------------| | telegraph_list_templates | List all available page templates | No | | telegraph_create_from_template | Create a page using a template | Yes |

Export & Backup

| Tool | Description | Auth Required | |------|-------------|---------------| | telegraph_export_page | Export a page to Markdown or HTML | No | | telegraph_backup_account | Backup all pages from an account | Yes |

Example Usage

Creating an Account

Use telegraph_create_account with:
- short_name: "MyBot"
- author_name: "AI Assistant"

This returns an access_token that you should save for future operations.

Creating a Page

Use telegraph_create_page with:
- access_token: "your_token_here"
- title: "My First Telegraph Page"
- content: "<p>Hello <b>world</b>!</p><p>This is my first Telegraph page.</p>"

Creating a Page with Markdown

Use telegraph_create_page with:
- access_token: "your_token_here"
- title: "My Markdown Page"
- content: "# Hello World\n\nThis is **bold** and *italic*.\n\n- List item 1\n- List item 2"
- format: "markdown"

Using Templates

Use telegraph_create_from_template with:
- access_token: "your_token_here"
- template: "blog_post"
- title: "My Blog Post"
- data: {
    "intro": "Welcome to my blog!",
    "sections": [
      {"heading": "First Section", "content": "Section content here"}
    ],
    "conclusion": "Thanks for reading!"
  }

Available templates: blog_post, documentation, article, changelog, tutorial

Content Format

The content parameter accepts:

  • Markdown (with format: "markdown"): "# Hello\n\n**Bold** and *italic*"
  • HTML strings: "<p>Hello <b>world</b></p>"
  • JSON Node arrays: [{"tag": "p", "children": ["Hello ", {"tag": "b", "children": ["world"]}]}]

Supported Markdown Syntax

| Syntax | Result | |--------|--------| | # Header | H3 heading | | ## Subheader | H4 heading | | **bold** | Bold text | | *italic* | Italic text | | [text](url) | Link | | ![alt](url) | Image | | - item | Unordered list | | 1. item | Ordered list | | > quote | Blockquote | | `code` | Inline code | | ```code``` | Code block | | --- | Horizontal rule |

Supported HTML Tags

a, aside, b, blockquote, br, code, em, figcaption, figure, h3, h4, hr, i, iframe, img, li, ol, p, pre, s, strong, u, ul, video

Supported Attributes

  • href - for <a> tags
  • src - for <img>, <video>, <iframe> tags

MCP Resources

Access Telegraph pages as MCP resources:

telegraph://page/{path}

Example: telegraph://page/Sample-Page-12-15

MCP Prompts

Available prompts for guided workflows:

| Prompt | Description | |--------|-------------| | create-blog-post | Guide for creating a blog post | | create-documentation | Guide for creating documentation | | summarize-page | Summarize an existing page |

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run directly (for testing)
npm start

Testing with MCP Inspector

npx @modelcontextprotocol/inspector node dist/index.js

API Reference

This server implements all methods from the Telegraph API:

  1. createAccount - Create a new Telegraph account
  2. editAccountInfo - Update account information
  3. getAccountInfo - Get account details
  4. revokeAccessToken - Revoke access token
  5. createPage - Create a new page
  6. editPage - Edit an existing page
  7. getPage - Get a page
  8. getPageList - Get list of pages
  9. getViews - Get page view statistics

License

MIT