currency-bot-db
Provides tools to query a PostgreSQL database for recent user currency requests and currency request statistics (USD, EUR, CNY).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@currency-bot-dbShow me recent user currency requests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Currency MCP Bot (educational project)
A simple example of combining Telegram Bot + public API + Docker/PostgreSQL + MCP + Cursor.
Diagram
Telegram
↓
Python Bot
↓
API курса валют
Python Bot
↓
PostgreSQL
↑
MCP
↑
CursorRelated MCP server: postgres-mcp
What the Telegram Bot does here
It accepts the /start, /usd, /eur, /cny commands and replies with the currency exchange rate to the ruble.
What the API does here
The bot fetches the current rate from a free public API (open.er-api.com) — no key and no registration required.
What Docker does here
docker compose starts PostgreSQL in a container. The bot itself runs locally on Python.
What MCP does here
The MCP server gives Cursor two tools for the same database:
get_recent_requests— recent user requestsget_currency_stats— how many times USD / EUR / CNY were requested
Files
File | Purpose |
| Telegram bot (aiogram) |
| PostgreSQL without ORM |
| MCP server for Cursor |
| PostgreSQL in Docker |
| MCP connection in this project |
| Secrets and settings (not in Git) |
Quick Start
1. Python dependencies
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt2. Environment variables
Copy the example and paste the bot token:
copy .env.example .envIn .env, fill in:
TELEGRAM_BOT_TOKEN=ваш_токен_от_BotFather3. PostgreSQL via Docker
docker compose up -dCheck:
docker compose ps4. Starting the bot
python bot.pyIn Telegram, send the bot /start, then /usd, /eur, /cny.
5. MCP in Cursor
The project includes .cursor/mcp.json. On Windows, the server is also added to the user-level ~/.cursor/mcp.json so that it definitely appears in the Connected list.
First create a venv and install the dependencies (step 1 above)
Ctrl+Shift+P→ Developer: Reload WindowOpen Settings → MCP
Find
currency-bot-db— the status should be green, tools:get_recent_requests,get_currency_stats
If the server is missing or the status is red: check PostgreSQL (docker compose ps) and that .venv is installed.
Where to get a Telegram Bot Token
Open Telegram and find @BotFather
Send
/newbotCome up with a name and username for the bot
BotFather will send a token like
123456:ABC...Paste it into
.envasTELEGRAM_BOT_TOKEN=...
Don't commit the token to Git — the .env file is already in .gitignore.
Test requests to MCP in Cursor
After sending the bot a few commands, type in the Cursor chat:
“Show the recent user requests”
“Which currencies did users request most often?”
“Call get_recent_requests with limit=5”
“Call get_currency_stats”
Cursor should use the MCP tools get_recent_requests and get_currency_stats.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only analytics for Convex apps, queryable via MCP from Claude, Cursor, and other clients.
Query your real net worth, spending, transactions, budgets and portfolio from any MCP client.
Analytics for MCP servers. Query your tool calls, first-call success, retries and schema cost.
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables querying PostgreSQL database metadata including table lists and schema information through the MCP protocol. Supports stdio transport for Cursor/IDE integration as well as HTTP transport with health check endpoints.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for PostgreSQL that enables Cursor and other MCP clients to execute SQL queries, list tables, and explore database schemas via HTTP.2,120 npmMIT
- FlicenseNot gradedqualityFmaintenanceProvides read-only SQL query access to Postgres and DuckDB databases via MCP tools, with extensive security hardening for public endpoints.1-
- FlicenseAqualityDmaintenanceEnables querying and interacting with PostgreSQL databases using natural language through MCP. Supports configuration via environment variables and Cursor IDE integration.3-