Provides tools for creating and managing Telegraph accounts and pages, including support for Markdown content conversion, page templates, view statistics, and export/backup functionality through the Telegraph API.
Telegraph MCP Server
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) | |
MCP Server for AI assistants (Python) | ||
JavaScript/TypeScript library | ||
Python library |
Quick Start
Or add to Claude Code:
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)
Option 2: From Source
Usage with Claude Code
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
Available Tools
Account Management
Tool | Description | Auth Required |
| Create a new Telegraph account | No |
| Update account information | Yes |
| Get account details | Yes |
| Revoke and regenerate access token | Yes |
Page Management
Tool | Description | Auth Required |
| Create a new Telegraph page (supports Markdown!) | Yes |
| Edit an existing page | Yes |
| Get a page by path | No |
| List all pages for an account | Yes |
| Get view statistics for a page | No |
Templates
Tool | Description | Auth Required |
| List all available page templates | No |
| Create a page using a template | Yes |
Export & Backup
Tool | Description | Auth Required |
| Export a page to Markdown or HTML | No |
| Backup all pages from an account | Yes |
Example Usage
Creating an Account
This returns an access_token that you should save for future operations.
Creating a Page
Creating a Page with Markdown
Using Templates
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 |
| H3 heading |
| H4 heading |
| Bold text |
| Italic text |
| Link |
| Image |
| Unordered list |
| Ordered list |
| Blockquote |
| Inline 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>tagssrc- for<img>,<video>,<iframe>tags
MCP Resources
Access Telegraph pages as MCP resources:
Example: telegraph://page/Sample-Page-12-15
MCP Prompts
Available prompts for guided workflows:
Prompt | Description |
| Guide for creating a blog post |
| Guide for creating documentation |
| Summarize an existing page |
Development
Testing with MCP Inspector
API Reference
This server implements all methods from the Telegraph API:
createAccount - Create a new Telegraph account
editAccountInfo - Update account information
getAccountInfo - Get account details
revokeAccessToken - Revoke access token
createPage - Create a new page
editPage - Edit an existing page
getPage - Get a page
getPageList - Get list of pages
getViews - Get page view statistics
License
MIT