home / mcp / telegram mcp server

Telegram MCP Server

mcp server for telegram

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bobidk91-ops-telegram-mcp-server": {
      "url": "https://telegram-mcp-server-production.up.railway.app",
      "headers": {
        "NODE_ENV": "production",
        "WORDPRESS_URL": "YOUR_WORDPRESS_URL",
        "PEXELS_API_KEY": "YOUR_PEXELS_API_KEY",
        "TELEGRAM_BOT_TOKEN": "YOUR_BOT_TOKEN",
        "WORDPRESS_USERNAME": "YOUR_WORDPRESS_USERNAME",
        "TELEGRAM_CHANNEL_ID": "YOUR_CHANNEL_ID",
        "WORDPRESS_APPLICATION_PASSWORD": "YOUR_WORDPRESS_APP_PASSWORD"
      }
    }
  }
}

You can run a unified MCP (Model Context Protocol) server that exposes Telegram, Pexels, and WordPress interactions via a single HTTP API. This server lets you send messages, fetch media, manage WordPress content, and perform JSON-RPC 2.0 operations from MCP clients with ease, all while using a RESTful HTTP endpoint for MCP calls and an integrated Telegram bot channel workflow.

How to use

You interact with the server through an MCP client by calling the available tools exposed over the HTTP API. The server provides a comprehensive set of endpoints to send messages to Telegram, fetch and curate media from Pexels, and manage WordPress content such as posts, pages, media, users, categories, and more. Use the MCP client to invoke the methods by name and pass the required arguments as described in the tool reference. The HTTP endpoint accepts MCP JSON-RPC 2.0 requests, and you can use REST-style calls to list available tools.

How to install

Prerequisites: install Node.js and npm on your machine or server. You will also need an MCP client to send JSON-RPC 2.0 requests to the server and the following API keys configured in your environment.

Step-by-step commands to set up locally:

Additional sections

Configuration and environment variables you need to run this server locally or in the cloud are listed below. Prepare these values in your environment before starting the server.

Security best practices include keeping tokens and API keys secure, using secure channels (HTTPS) for all MCP calls, and rotating credentials regularly.

If you deploy to Railway or another hosting service, ensure the required environment variables are set in the deployment environment.

Available tools

send_message

Send a text message to a Telegram channel or chat.

send_photo

Send a photo to Telegram.

send_video

Send a video to Telegram.

send_document

Send a document to Telegram.

send_poll

Create and send a poll in Telegram.

send_reaction

Send a reaction to a Telegram message.

edit_message

Edit an existing Telegram message.

delete_message

Delete a Telegram message.

pin_message

Pin a Telegram message in the chat.

unpin_message

Unpin a Telegram message.

get_channel_info

Retrieve information about a Telegram channel.

get_channel_stats

Retrieve channel statistics for Telegram.

pexels_search_photos

Search photos on Pexels by query.

pexels_get_photo

Retrieve a specific photo by ID from Pexels.

pexels_curated_photos

Get curator-selected photos from Pexels.

pexels_search_videos

Search videos on Pexels by query.

pexels_popular_videos

Fetch popular videos from Pexels.

wordpress_get_posts

Fetch a list of WordPress posts.

wordpress_get_post

Get a WordPress post by ID.

wordpress_create_post

Create a new WordPress post.

wordpress_update_post

Update an existing WordPress post.

wordpress_delete_post

Delete a WordPress post.

wordpress_get_pages

Fetch a list of WordPress pages.

wordpress_get_page

Get a WordPress page by ID.

wordpress_create_page

Create a new WordPress page.

wordpress_update_page

Update an existing WordPress page.

wordpress_delete_page

Delete a WordPress page.

wordpress_get_media

Fetch a list of WordPress media items.

wordpress_get_media_item

Get a WordPress media item by ID.

wordpress_upload_media

Upload a new WordPress media item.

wordpress_update_media

Update a WordPress media item.

wordpress_delete_media

Delete a WordPress media item.

wordpress_get_categories

Fetch WordPress categories.

wordpress_get_category

Get a WordPress category by ID.

wordpress_create_category

Create a new WordPress category.

wordpress_update_category

Update a WordPress category.

wordpress_delete_category

Delete a WordPress category.

wordpress_get_tags

Fetch WordPress tags.

wordpress_get_tag

Get a WordPress tag by ID.

wordpress_create_tag

Create a new WordPress tag.

wordpress_update_tag

Update a WordPress tag.

wordpress_delete_tag

Delete a WordPress tag.

wordpress_get_users

Fetch WordPress users.

wordpress_get_user

Get a WordPress user by ID.

wordpress_create_user

Create a new WordPress user.

wordpress_update_user

Update a WordPress user.

wordpress_delete_user

Delete a WordPress user.

wordpress_get_comments

Fetch WordPress comments.

wordpress_get_comment

Get a WordPress comment by ID.

wordpress_create_comment

Create a new WordPress comment.

wordpress_update_comment

Update a WordPress comment.

wordpress_delete_comment

Delete a WordPress comment.

wordpress_get_site_info

Fetch WordPress site information.

wordpress_get_settings

Fetch WordPress site settings.

wordpress_search

Search WordPress content.

wordpress_test_connection

Test the connection to WordPress.