Commit graph

6 commits

Author SHA1 Message Date
Daniil Isakov
fa11aaaf88 feat(session_string_generator): implement QR code and phone number login methods for Telegram session generation 2026-02-28 04:14:22 +03:00
Yurii Karabas
92a0dc31b5 fix lint errors 2025-12-18 23:47:12 +01:00
Yurii Karabas
603119073a Add scripts entrypoint to run telegram-mcp using uvx 2025-11-22 14:22:13 +01:00
google-labs-jules[bot]
34bdd58905 feat: Implement input validation decorator for chat/user IDs
Adds a new `@validate_id` decorator to validate `chat_id` and `user_id` parameters in `main.py`.

This decorator ensures that all IDs passed to functions are in a valid format before making RPC calls to the Telegram API. It handles:
- Integer IDs (positive and negative)
- String representations of integer IDs
- Usernames (e.g., "@username")
- Lists of IDs

Key changes:
- Created a `validate_id` decorator in `main.py`.
- Applied the decorator to all functions that accept `chat_id`, `user_id`, or similar parameters.
- Updated the central `log_and_format_error` function to handle custom validation error messages and a specific `VALIDATION-001` error code for logging.
- Added a new test suite (`test_validation.py`) with comprehensive tests for the decorator.
- Updated `README.md` and `session_string_generator.py` with documentation about the new validation.
2025-08-29 23:16:13 +02:00
Eugene Evstafev
eca9fb48cf refactor: update formatting 2025-04-18 14:25:24 +01:00
anonim
ecb5b88b12 feat: enhance Telegram MCP server with new features and improvements
- Added support for string session authentication in main.py.
- Introduced new tools for searching contacts and retrieving message context.
- Updated README.md with detailed usage examples and security considerations.
- Modified pyproject.toml for versioning and dependency updates.
- Expanded .gitignore to include Telegram session files.
2025-03-31 19:11:07 +03:00