--- license: mit title: SUMIT SERVER MCP sdk: docker emoji: 🚀 colorFrom: yellow colorTo: green short_description: THIS IS MCP SERVER. --- # Tatva MCP Server 🚀 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/) [![FastMCP](https://img.shields.io/badge/FastMCP-2.12.4+-green.svg)](https://github.com/jlowin/fastmcp)
SAFE-MCP Verified
222/300 • LOW
Valid: Nov 2025 - Feb 2026
A Model Context Protocol (MCP) server that provides intelligent access to content from the Tatva website (tatva.sumityadav.com.np). This server enables AI assistants to fetch, analyze, and interact with blog posts, pages, and resources from the Tatva platform. ## ✨ Features - **Content Fetching**: Retrieve content from any page on the Tatva website - **Blog Post Management**: Access and search through all blog posts - **Smart Search**: Find posts by keywords or filter by year - **Task Management**: Store and retrieve tasks using Turso (libSQL) database - **Resource Access**: Direct access to homepage, about page, and specific posts - **Analysis Tools**: Built-in prompts for post analysis and comparison - **Docker Support**: Easy deployment with containerization - **Hugging Face Spaces Ready**: Optimized for HF Spaces deployment - **Environment Configuration**: Automatic loading of environment variables from `.env` file ## 🛠️ Available Tools ### Content Retrieval - `get_page_content(url)` - Fetch content from any specific URL - `get_homepage_content()` - Get homepage content - `get_about_page()` - Get about page content - `get_post_content(post_path)` - Get specific blog post content ### Blog Management - `get_all_posts_summary()` - List all available blog posts - `search_posts_by_keyword(keyword)` - Search posts by keyword - `get_posts_by_year(year)` - Filter posts by publication year ### Task Management - `put_task_to_db(task, time_date)` - Add a task to the database with date and time - `get_task_from_db(today_date)` - Retrieve all tasks for a specific date ### Resources - `tatva://homepage` - Homepage resource - `tatva://about` - About page resource - `tatva://posts/{post_path}` - Specific post resource ### Analysis Prompts - `analyze_post_prompt(post_path)` - Generate analysis prompt for a post - `compare_posts_prompt(post1, post2)` - Generate comparison prompt for two posts ## 🚀 Quick Start ### Prerequisites - Python 3.13+ - [uv](https://github.com/astral-sh/uv) package manager ### Installation 1. **Clone the repository** ```bash git clone https://github.com/yourusername/sumit-mcp-server.git cd sumit-mcp-server ``` 2. **Install dependencies** ```bash uv sync ``` 3. **Configure environment variables** Create a `.env` file in the project root with your Turso credentials: ```bash TURSO_AUTH_TOKEN=your_turso_auth_token TURSO_DATABASE_URL=your_turso_database_url PORT=7860 ``` The server will automatically load these from the `.env` file. 4. **Run the server** ```bash uv run server.py ``` The server will start on `http://localhost:7860` with the MCP endpoint at `/api/mcp/`. ### Docker Deployment 1. **Build the image** ```bash docker build -t tatva-mcp-server . ``` 2. **Run the container** ```bash docker run -p 7860:7860 tatva-mcp-server ``` ## 📖 Usage Examples ### Fetching Content ```python # Get homepage content homepage = get_homepage_content() # Get a specific blog post post = get_post_content("2025/09/22/advance_scanner/") # Search for posts about AI ai_posts = search_posts_by_keyword("AI") ``` ### Using with MCP Clients The server exposes MCP tools that can be used by compatible AI assistants and clients. Connect to the server endpoint and use the available tools for content retrieval and analysis. ## 🏗️ Project Structure ``` sumit-mcp-server/ ├── server.py # Main MCP server implementation ├── pyproject.toml # Project configuration and dependencies ├── Dockerfile # Container configuration ├── README.md # This file ├── .env # Environment variables (create with your Turso credentials) ├── .gitignore # Git ignore rules └── uv.lock # Dependency lock file ``` ## 🔧 Configuration The server is configured to work with: - **Base URL**: `https://tatva.sumityadav.com.np` - **Port**: 7860 (configurable via `PORT` environment variable) - **Transport**: Server-Sent Events (SSE) - **Path**: `/api/mcp/` ## 🌐 Deployment ### Hugging Face Spaces This server is optimized for deployment on Hugging Face Spaces: - Uses port 7860 (HF Spaces standard) - Includes proper Docker configuration - Supports SSE transport for real-time communication ### Environment Variables The server automatically loads environment variables from a `.env` file in the project root. Create a `.env` file with: - `TURSO_AUTH_TOKEN`: Authentication token for Turso database (required) - `TURSO_DATABASE_URL`: Database URL for Turso (libSQL) connection (required) - `PORT`: Server port (default: 7860, optional) **Note**: The `.env` file is automatically ignored by git to keep your credentials secure. You can also set these as system environment variables if preferred. ## 📝 API Reference ### Tools | Tool | Description | Parameters | |------|-------------|------------| | `get_page_content` | Fetch content from any URL | `url: str` | | `get_homepage_content` | Get homepage content | None | | `get_about_page` | Get about page content | None | | `get_post_content` | Get specific post content | `post_path: str` | | `get_all_posts_summary` | List all posts | None | | `search_posts_by_keyword` | Search posts | `keyword: str` | | `get_posts_by_year` | Filter by year | `year: str` | | `put_task_to_db` | Add task to database | `task: str`, `time_date: str` | | `get_task_from_db` | Get tasks for date | `today_date: str` | ### Resources | Resource | Description | |----------|-------------| | `tatva://homepage` | Homepage content | | `tatva://about` | About page content | | `tatva://posts/{path}` | Specific post content | ## 🤝 Contributing 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## 📄 License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## 🔗 Links - **Tatva Website**: [tatva.sumityadav.com.np](https://tatva.sumityadav.com.np) - **FastMCP**: [GitHub Repository](https://github.com/jlowin/fastmcp) - **Model Context Protocol**: [Official Documentation](https://modelcontextprotocol.io/) ## 📞 Support For support, questions, or contributions, please open an issue on GitHub or contact the maintainer. --- **Made with ❤️ for the Tatva Sumit**