Spaces:
Running
license: mit
title: SUMIT SERVER MCP
sdk: docker
emoji: π
colorFrom: yellow
colorTo: green
short_description: THIS IS MCP SERVER.
Tatva MCP Server π
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
.envfile
π οΈ Available Tools
Content Retrieval
get_page_content(url)- Fetch content from any specific URLget_homepage_content()- Get homepage contentget_about_page()- Get about page contentget_post_content(post_path)- Get specific blog post content
Blog Management
get_all_posts_summary()- List all available blog postssearch_posts_by_keyword(keyword)- Search posts by keywordget_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 timeget_task_from_db(today_date)- Retrieve all tasks for a specific date
Resources
tatva://homepage- Homepage resourcetatva://about- About page resourcetatva://posts/{post_path}- Specific post resource
Analysis Prompts
analyze_post_prompt(post_path)- Generate analysis prompt for a postcompare_posts_prompt(post1, post2)- Generate comparison prompt for two posts
π Quick Start
Prerequisites
- Python 3.13+
- uv package manager
Installation
Clone the repository
git clone https://github.com/yourusername/sumit-mcp-server.git cd sumit-mcp-serverInstall dependencies
uv syncConfigure environment variables
Create a
.envfile in the project root with your Turso credentials:TURSO_AUTH_TOKEN=your_turso_auth_token TURSO_DATABASE_URL=your_turso_database_url PORT=7860The server will automatically load these from the
.envfile.Run the server
uv run server.py
The server will start on http://localhost:7860 with the MCP endpoint at /api/mcp/.
Docker Deployment
Build the image
docker build -t tatva-mcp-server .Run the container
docker run -p 7860:7860 tatva-mcp-server
π Usage Examples
Fetching Content
# 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
PORTenvironment 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Links
- Tatva Website: tatva.sumityadav.com.np
- FastMCP: GitHub Repository
- Model Context Protocol: Official Documentation
π Support
For support, questions, or contributions, please open an issue on GitHub or contact the maintainer.
Made with β€οΈ for the Tatva Sumit