MCP Hub

Connect your personal data to AI assistants via MCP

What is MCP Hub?

MCP Hub is a remote Model Context Protocol server that gives your AI assistant secure, read-only access to your personal data across multiple platforms.

Connect your Telegram account (more sources coming) and use natural language to search conversations, extract facts, find action items — all through ChatGPT, Claude, or any MCP-compatible client.

Available Tools

list_chats

List your Telegram dialogs with unread counts and last message timestamps.

limit 1–500, default 100

get_messages

Read messages from a specific chat.

chat_id required — from list_chats
chat_type required — user, group, supergroup, or channel
limit 1–100, default 30
offset_id optional — paginate to older messages
min_id optional — only messages newer than this id (read what is new since your cursor)

Messages also carry, when Telegram reports them: links (including hidden text links), edit_date, forwarded_from, views, webpage_url and thread_id.

search_messages

Search message text in one chat or across all your chats. Read-only.

query required — text to search for
chat_id, chat_type optional — search one chat; omit both for all chats
date_from, date_to optional — YYYY-MM-DD or RFC 3339, inclusive
limit 1–100, default 30
cursor optional — next_cursor from the previous page

list_chat_members

List the members of a group, supergroup, or channel with their roles. Broadcast channels require you to be an admin.

chat_id required — from list_chats
chat_type required — group, supergroup, or channel
limit 1–500, default 100

resolve_username

Resolve a public @username or t.me link to a chat — including people and channels you have never messaged — so you can read or message them. Returns a chat id and type to use with the other tools. Private invite links and phone numbers are not supported.

username required — with or without @, or a t.me/<username> link

send_message

Send a message to a chat from your account. Supports Markdown formatting and scheduled sends. Your assistant is instructed to confirm the text and destination with you before sending.

chat_id required — from list_chats
chat_type required — user, group, supergroup, or channel
text required — up to 4096 characters
format optional — plain (default) or markdown
reply_to_id optional — message to reply to
schedule_at optional — RFC 3339 time to schedule the send
idempotency_key optional — retrying with the same key cannot post twice
expected_chat_title optional — the title you confirmed; if the chat's title differs, nothing is sent

send_file

Send a file from your account — text content (reports, code, CSV) or base64 binary up to 8 MB, optionally rendered as a photo.

chat_id required — from list_chats
chat_type required
filename required — with extension
content / content_base64 one required — file body
caption optional — up to 1024 characters
as_photo optional — render image as photo
reply_to_id optional — message to reply to
schedule_at optional — RFC 3339 time to schedule the send
idempotency_key optional — retrying with the same key cannot post twice
expected_chat_title optional — the title you confirmed; if the chat's title differs, nothing is sent

send_voice

Send a voice message. Either provide text to speak aloud (synthesized server-side via Google Cloud TTS) or a pre-encoded OGG/Opus file. Your assistant confirms before sending.

chat_id, chat_type required — from list_chats
text / audio_base64 one required — words to speak, or OGG/Opus audio
language optional — BCP-47, e.g. en-US (for text)
voice optional — Google TTS voice name (for text)
reply_to_id, schedule_at optional
idempotency_key optional — retrying with the same key cannot post twice
expected_chat_title optional — the title you confirmed; if the chat's title differs, nothing is sent

get_media

Download a message attachment. Photos and images (≤5 MB) are returned so your assistant can view them; text documents (≤256 KB) are returned as text; voice messages are transcribed to text.

chat_id required — from list_chats
chat_type required
message_id required — from get_messages

forward_messages

Forward up to 50 messages from one chat to another.

from_chat_id, from_chat_type required — source
to_chat_id, to_chat_type required — destination
message_ids required — from get_messages
idempotency_key optional — retrying with the same key cannot forward twice
expected_chat_title optional — the destination title you confirmed; if it differs, nothing is forwarded

react_to_message

Set an emoji reaction on a message.

chat_id, chat_type required — from list_chats
message_id required — from get_messages
emoji required — e.g. 👍

Pricing

Reading and sending Telegram messages is free and unlimited. The AI features run on a subscription:

Subscribe and manage your plan from the dashboard.

Setup

1. Connect your account

Sign in at mcp.ai.church with Google, then connect Telegram from the dashboard.

2. Add to your AI assistant

ChatGPT

Settings → MCP Servers → Add → enter https://mcp.ai.church/mcp

Claude

Settings → MCP → Add Server → enter https://mcp.ai.church/mcp

Any MCP client

Point your client to https://mcp.ai.church/mcp. The server supports OAuth 2.0 discovery via Protected Resource Metadata (RFC 9728) and Dynamic Client Registration (RFC 7591).

3. Use it

Ask your assistant things like:

  • "List my Telegram chats"
  • "Show me the last 10 messages from Alice"
  • "What did the team discuss yesterday in the work group?"
  • "Find any action items from my recent conversations"

Authentication

MCP Hub implements the full MCP OAuth flow:

  1. Client requests POST /mcp → receives 401 with WWW-Authenticate header
  2. Client fetches Protected Resource Metadata (/.well-known/oauth-protected-resource)
  3. Client fetches Authorization Server Metadata (/.well-known/oauth-authorization-server)
  4. Client registers via Dynamic Client Registration (POST /oauth/register)
  5. Authorization Code + PKCE flow through Google Sign-In
  6. Client receives access token for /mcp endpoint
  7. Client refreshes with grant_type=refresh_token: the access token lasts 1 hour; the refresh token rotates on every use and each refresh restarts its 30-day lifetime. Presenting an already-rotated refresh token again revokes the connection; a replay within 30 seconds (parallel refreshes from one client) is only refused.

Security & Privacy

Full privacy policy →

Self-Hosting

Run your own instance — your data never touches our servers.

git clone <repo>
cd mcp
cp .env.example .env
# Edit .env with your credentials, then:
docker compose up -d

You'll need: Telegram API credentials, a Firebase project with Google sign-in.

Endpoints

MethodPathDescription
POST/mcpMCP JSON-RPC 2.0 (requires Bearer token)
GET/.well-known/oauth-authorization-serverOAuth metadata (RFC 8414)
GET/.well-known/oauth-protected-resourceProtected resource metadata (RFC 9728)
POST/oauth/registerDynamic client registration (RFC 7591)
GET/oauth/authorizeAuthorization endpoint
POST/oauth/tokenToken endpoint