{"_id":"@aporialab/telegraph-mcp","_rev":"3-444d80d7bd8284c7b87ad906bc500643","name":"@aporialab/telegraph-mcp","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@aporialab/telegraph-mcp","version":"1.0.0","keywords":["mcp","claude","telegraph","ai"],"author":{"name":"Aporia Labs","email":"hello@aporialabs.dev"},"license":"Apache-2.0","_id":"@aporialab/telegraph-mcp@1.0.0","maintainers":[{"name":"aporialab","email":"aporia_lab@proton.me"}],"homepage":"https://github.com/aporia-labs/telegraph-ai#readme","bugs":{"url":"https://github.com/aporia-labs/telegraph-ai/issues"},"dist":{"shasum":"5d3ed25dc813f4c14fdc0f5d6134089609cee2ea","tarball":"https://registry.npmjs.org/@aporialab/telegraph-mcp/-/telegraph-mcp-1.0.0.tgz","fileCount":7,"integrity":"sha512-N7fZENMoXZesl0oVWvechBYI7CJMBemi4OT2rt3BW3W5J6lPhUxeTbj5QWm2Q9Fvsh3a/b1VWajeLYc7JPYGDA==","signatures":[{"sig":"MEUCIG3VnkpZ01Pg1uuycXvIRa8JF833aEx9BX6Ksgr37GcCAiEAqm6sOGBEOZbIPeRF9BayGJYP5khh9PFcoJxVlAUUrFY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28893},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"3ad2035265d3a1d343af583f79106a2c99a537d8","scripts":{"dev":"tsc && node dist/index.js","build":"tsc","start":"node dist/index.js","watch":"tsc --watch"},"_npmUser":{"name":"aporialab","email":"aporia_lab@proton.me"},"repository":{"url":"git+https://github.com/aporia-labs/telegraph-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for Telegraph AI — context compiler for Claude Desktop","directories":{},"_nodeVersion":"20.20.0","dependencies":{"axios":"^1.6.0","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/telegraph-mcp_1.0.0_1771872468150_0.17935023716150078","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aporialab/telegraph-mcp","version":"1.0.1","keywords":["mcp","claude","telegraph","ai"],"author":{"name":"Aporia Labs","email":"hello@aporialabs.dev"},"license":"Apache-2.0","_id":"@aporialab/telegraph-mcp@1.0.1","maintainers":[{"name":"aporialab","email":"aporia_lab@proton.me"}],"homepage":"https://github.com/aporia-labs/telegraph-ai#readme","bugs":{"url":"https://github.com/aporia-labs/telegraph-ai/issues"},"dist":{"shasum":"15140a3ab08a899d51542f9ce3f1309294b01fc5","tarball":"https://registry.npmjs.org/@aporialab/telegraph-mcp/-/telegraph-mcp-1.0.1.tgz","fileCount":8,"integrity":"sha512-W3VINGrgy8FLsM4WT73sjGBYpOJFqXViIS0wZU6Fx+vadfkSTciJcQ7LG9TRyisHPPENdfoRtpNPAzsRyL97IA==","signatures":[{"sig":"MEUCIGDg7HRdikYUKaC9KD5CK9U1yEypt97Bs2D88/ZeoKiBAiEA2HqvEyTrpqowdKo7gjgzcvvLeDEG25MamLWXXFQ9iH0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36052},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"12c5c4991acaabb952db3cb7d5c78203ef72c84c","scripts":{"dev":"tsc && node dist/index.js","build":"tsc","start":"node dist/index.js","watch":"tsc --watch"},"_npmUser":{"name":"aporialab","email":"aporia_lab@proton.me"},"repository":{"url":"git+https://github.com/aporia-labs/telegraph-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for Telegraph AI — context compiler for Claude Desktop","directories":{},"_nodeVersion":"20.20.0","dependencies":{"axios":"^1.6.0","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/telegraph-mcp_1.0.1_1771872825348_0.3638648718293256","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aporialab/telegraph-mcp","version":"1.0.2","description":"MCP server for Telegraph AI — context compiler for Claude Desktop","type":"module","main":"dist/index.js","scripts":{"build":"tsc","watch":"tsc --watch","start":"node dist/index.js","dev":"tsc && node dist/index.js"},"keywords":["mcp","claude","telegraph","ai"],"author":{"name":"Aporia Labs","email":"hello@aporialabs.dev"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/aporia-labs/telegraph-ai.git"},"publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","axios":"^1.6.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.3.0"},"_id":"@aporialab/telegraph-mcp@1.0.2","gitHead":"168a3b65ceef81953709888f3f37d96d2c66ef8b","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/aporia-labs/telegraph-ai/issues"},"homepage":"https://github.com/aporia-labs/telegraph-ai#readme","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-SgA+3jb+A+khIxI89uprBMn1Ve+1afJ3gii9PPwWeRR0jQmVBcn1fJ6W98EbbTo62Xe76YQgimxCpefGT65S5A==","shasum":"69884b73c832e84d9a52f60474b74991bd6c9677","tarball":"https://registry.npmjs.org/@aporialab/telegraph-mcp/-/telegraph-mcp-1.0.2.tgz","fileCount":8,"unpackedSize":36052,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHlPI/3MF5t7VOsL4PPdqjktvVbSbXhzReq/wDimKk6QAiB0JTCIRziJOBB2LHMIeCOiQQjQvKD1Va/ynmJl440nzg=="}]},"_npmUser":{"name":"aporialab","email":"aporia_lab@proton.me"},"directories":{},"maintainers":[{"name":"aporialab","email":"aporia_lab@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/telegraph-mcp_1.0.2_1771874202485_0.29429406326261454"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-23T18:47:48.080Z","modified":"2026-02-23T19:16:42.763Z","1.0.0":"2026-02-23T18:47:48.288Z","1.0.1":"2026-02-23T18:53:45.494Z","1.0.2":"2026-02-23T19:16:42.652Z"},"bugs":{"url":"https://github.com/aporia-labs/telegraph-ai/issues"},"author":{"name":"Aporia Labs","email":"hello@aporialabs.dev"},"license":"Apache-2.0","homepage":"https://github.com/aporia-labs/telegraph-ai#readme","keywords":["mcp","claude","telegraph","ai"],"repository":{"type":"git","url":"git+https://github.com/aporia-labs/telegraph-ai.git"},"description":"MCP server for Telegraph AI — context compiler for Claude Desktop","maintainers":[{"name":"aporialab","email":"aporia_lab@proton.me"}],"readme":"<div align=\"center\">\n\n# @aporialab/telegraph-mcp\n\n[![Aporia Labs](https://img.shields.io/badge/Aporia%20Labs-v1.0.0-6c47ff?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xMiAyTDIgN2w0IDJ2NWw2IDMgNi0zVjlsNC0yTDEyIDJ6Ii8+PC9zdmc+)](https://github.com/AporiaLab)\n[![npm version](https://img.shields.io/npm/v/@aporialab/telegraph-mcp?style=for-the-badge&color=cb3837&logo=npm)](https://www.npmjs.com/package/@aporialab/telegraph-mcp)\n[![MCP Protocol](https://img.shields.io/badge/MCP-compatible-0ea5e9?style=for-the-badge)](https://modelcontextprotocol.io)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)\n[![Claude Desktop](https://img.shields.io/badge/Claude%20Desktop-supported-8c4dff?style=for-the-badge)](https://claude.ai/download)\n\n**MCP server connecting Claude Desktop to the Telegraph AI publishing pipeline.**\n\n[Overview](#overview) · [Installation](#installation) · [Configuration](#configuration) · [Tools](#available-tools) · [Examples](#usage-examples) · [Contributing](#contributing)\n\n</div>\n\n---\n\n## Overview\n\n`@aporialab/telegraph-mcp` is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that connects Claude Desktop directly to your Telegraph AI publishing workflow.\n\nInstead of copy-pasting content between Claude and your publishing pipeline, this server exposes your Telegraph pipeline as native tools within Claude's context. You describe what you want to publish, Claude calls the appropriate tool, and the content moves through formatting, enrichment, and publishing automatically.\n\n**What Telegraph AI does:**\n- Compiles long-form content from multiple context sources (chat history, notes, documents)\n- Auto-formats for Telegraph's node-based article format\n- Enriches with metadata, tags, and cross-links\n- Publishes via Telegraph's API with your account credentials\n\n**What this MCP server adds:**\n- Exposes the entire pipeline as Claude-native tools\n- Lets Claude read your current draft context before publishing\n- Enables conversational publishing: describe edits, Claude applies them, then publishes\n\n---\n\n## Installation\n\n### Via Claude Desktop Configuration (Recommended)\n\nNo manual npm install needed. Add the server directly to your Claude Desktop config:\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"telegraph-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aporialab/telegraph-mcp\"],\n      \"env\": {\n        \"TELEGRAPH_ACCESS_TOKEN\": \"your_telegraph_access_token\",\n        \"TELEGRAPH_AUTHOR_NAME\": \"Your Name\",\n        \"TELEGRAPH_AUTHOR_URL\": \"https://t.me/yourchannel\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. The Telegraph tools will appear automatically.\n\n### Manual Install\n\n```bash\nnpm install -g @aporialab/telegraph-mcp\n```\n\nRun as a standalone MCP server:\n\n```bash\ntelegraph-mcp --port 3742\n```\n\n---\n\n## Getting a Telegraph Access Token\n\n1. Go to [https://telegra.ph](https://telegra.ph)\n2. Open browser DevTools → Network tab\n3. Create any page — your `access_token` appears in the API call\n4. Or use the Telegraph API directly:\n\n```bash\ncurl https://api.telegra.ph/createAccount \\\n  -d \"short_name=MyBot\" \\\n  -d \"author_name=My Name\" \\\n  -d \"author_url=https://t.me/mychannel\"\n```\n\nCopy the `access_token` from the response.\n\n---\n\n## Configuration\n\nAll configuration is passed via environment variables in the Claude Desktop config.\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `TELEGRAPH_ACCESS_TOKEN` | Yes | Your Telegraph account token |\n| `TELEGRAPH_AUTHOR_NAME` | Yes | Author name shown on published articles |\n| `TELEGRAPH_AUTHOR_URL` | No | Author URL (Telegram channel, website) |\n| `PIPELINE_WEBHOOK` | No | URL of your Telegraph AI pipeline webhook |\n| `PIPELINE_API_KEY` | No | API key for the pipeline webhook |\n| `AUTO_FORMAT` | No | `true` to enable auto-formatting before publish (default: `true`) |\n| `CONTEXT_LIMIT` | No | Max tokens to compile for context (default: `8000`) |\n\n### Full Configuration Example\n\n```json\n{\n  \"mcpServers\": {\n    \"telegraph-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aporialab/telegraph-mcp\"],\n      \"env\": {\n        \"TELEGRAPH_ACCESS_TOKEN\": \"abc123your_token_here\",\n        \"TELEGRAPH_AUTHOR_NAME\": \"Aporia Labs\",\n        \"TELEGRAPH_AUTHOR_URL\": \"https://t.me/aporialab\",\n        \"PIPELINE_WEBHOOK\": \"https://your-n8n.example.com/webhook/telegraph-ai\",\n        \"PIPELINE_API_KEY\": \"your_pipeline_key\",\n        \"AUTO_FORMAT\": \"true\",\n        \"CONTEXT_LIMIT\": \"12000\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Available Tools\n\nOnce the server is running, Claude can call these tools:\n\n### `telegraph_compile_context`\n\nCompiles the current conversation and any attached documents into a structured content brief ready for publishing.\n\n```\nCompile this thread into a Telegraph article draft.\n```\n\n**Parameters:**\n- `source` — `'conversation'` | `'document'` | `'both'`\n- `focus` — optional focus prompt to guide compilation\n- `max_tokens` — override context limit for this compilation\n\n---\n\n### `telegraph_format`\n\nTakes raw text or markdown and converts it to Telegraph's node format with proper headings, paragraphs, code blocks, and links.\n\n```\nFormat this markdown as a Telegraph article.\n```\n\n**Parameters:**\n- `content` — raw markdown or plain text\n- `title` — article title\n- `style` — `'article'` | `'thread'` | `'guide'`\n\n---\n\n### `telegraph_publish`\n\nPublishes content to Telegraph and returns the live URL.\n\n```\nPublish the draft to Telegraph now.\n```\n\n**Parameters:**\n- `title` — article title (required)\n- `content` — formatted content or raw text (auto-formatted if `AUTO_FORMAT=true`)\n- `author_name` — override default author name\n- `author_url` — override default author URL\n\n**Returns:**\n```json\n{\n  \"url\": \"https://telegra.ph/Your-Article-Title-01-15\",\n  \"path\": \"Your-Article-Title-01-15\",\n  \"views\": 0,\n  \"published_at\": \"2025-01-15T14:23:00Z\"\n}\n```\n\n---\n\n### `telegraph_update`\n\nUpdates an existing Telegraph article by path.\n\n```\nUpdate the article at telegra.ph/My-Article-01-10 with these corrections.\n```\n\n**Parameters:**\n- `path` — Telegraph article path (e.g. `My-Article-01-10`)\n- `title` — new title (optional)\n- `content` — new content\n\n---\n\n### `telegraph_list`\n\nLists recent articles from your Telegraph account.\n\n```\nShow my last 10 Telegraph articles.\n```\n\n**Parameters:**\n- `limit` — number of articles to return (default: 10, max: 50)\n- `offset` — pagination offset\n\n---\n\n### `telegraph_get_stats`\n\nReturns view counts and basic analytics for a published article.\n\n```\nHow many views did my last article get?\n```\n\n**Parameters:**\n- `path` — article path\n\n---\n\n## Usage Examples\n\n### Publish a Summary of the Current Conversation\n\n```\n@telegraph-mcp Compile this conversation about API design patterns \ninto a Telegraph article and publish it. Title: \"API Design \nPatterns for 2025\". Author URL: https://t.me/mydevblog\n```\n\nClaude will:\n1. Call `telegraph_compile_context` to extract the key points\n2. Call `telegraph_format` to structure the article\n3. Call `telegraph_publish` and return the live URL\n\n---\n\n### Draft First, Publish After Review\n\n```\n@telegraph-mcp Compile my notes into a Telegraph draft \nand show me the formatted content before publishing.\n```\n\nClaude shows you the formatted article. You request changes:\n\n```\nRewrite the introduction to be more concise, then publish.\n```\n\nClaude edits and calls `telegraph_publish`.\n\n---\n\n### Update an Existing Article\n\n```\n@telegraph-mcp Update telegra.ph/My-Guide-12-01 — add a \nsection about rate limiting after the authentication section.\n```\n\nClaude fetches the article, inserts the section, and calls `telegraph_update`.\n\n---\n\n### Batch Publish from Document\n\nAttach a markdown document to your Claude conversation:\n\n```\n@telegraph-mcp This document has 5 separate articles separated \nby ---. Publish each one as a separate Telegraph article and \ngive me all the URLs.\n```\n\n---\n\n## How Auto-Formatting Works\n\nWhen `AUTO_FORMAT=true`, the server preprocesses content before publishing:\n\n1. **Heading normalisation** — H1 becomes the article title; H2/H3 map to Telegraph heading nodes\n2. **Code block handling** — triple-backtick blocks become Telegraph `<code>` elements with language hints\n3. **Link validation** — external links are preserved; relative links are flagged\n4. **Image extraction** — markdown image syntax is converted to Telegraph image nodes\n5. **List conversion** — unordered and ordered lists map to `<ul>`/`<ol>` in Telegraph's format\n6. **Whitespace normalisation** — double blank lines become paragraph breaks\n\n---\n\n## Troubleshooting\n\n### Server not appearing in Claude Desktop\n\n- Ensure Claude Desktop is fully restarted after editing config\n- Validate your JSON config is syntactically correct\n- Check Claude Desktop logs: `~/Library/Logs/Claude/` (macOS)\n\n### `TELEGRAPH_ACCESS_TOKEN invalid` error\n\n- Tokens expire if unused for extended periods — generate a new one\n- Ensure no extra whitespace in the token string\n\n### Content too long to publish\n\nTelegraph articles have a ~65KB content limit. Use `CONTEXT_LIMIT` to reduce the compiled context size, or split into multiple articles.\n\n---\n\n## Contributing\n\n1. Fork: [github.com/AporiaLab/telegraph-mcp](https://github.com/AporiaLab/telegraph-mcp)\n2. Branch: `git checkout -b feat/your-feature`\n3. The server follows the [MCP specification](https://modelcontextprotocol.io/specification) — new tools must implement the full tool schema\n4. Add integration tests in `test/` for any new tool\n5. Submit a pull request\n\n```bash\ngit clone https://github.com/AporiaLab/telegraph-mcp.git\ncd telegraph-mcp\nnpm install\nnpm run build\nnpm test\n```\n\nFor MCP development, the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is useful for testing tools interactively without Claude Desktop.\n\n---\n\n## Support the Project\n\nIf this MCP server improved your publishing workflow, consider a Bitcoin donation:\n\n**Bitcoin:**\n```\nbc1q9wpg3nrg5kywxlkkzsdd4lwkrfgd5j84jdpmjm\n```\n\n[![Donate Bitcoin](https://img.shields.io/badge/Donate-Bitcoin-f7931a?style=for-the-badge&logo=bitcoin)](https://blockchain.info/address/bc1q9wpg3nrg5kywxlkkzsdd4lwkrfgd5j84jdpmjm)\n\n---\n\n## License\n\nMIT License — Copyright (c) 2025 Aporia Labs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\n<div align=\"center\">\n  Made deliberately by <a href=\"https://github.com/AporiaLab\">Aporia Labs</a>\n</div>\n","readmeFilename":"README.md"}