Provides a fast and reliable Model Context Protocol API for fetching, searching, and adding blog posts with seamless Python environment management and dependency control.
Unlock the full potential of MCP Blog API through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
A simple blog API service built with FastMCP and httpx. This project supports uv for fast, reliable Python package management and environment setup.
This project provides a set of API tools to interact with a mock blog API service. It allows users to fetch all blogs, search for blogs by title, and add new blog posts. The project includes a uv.lock file for reproducible dependency management.
# Clone the repository git clone https://github.com/yourusername/mcp-blog.git cd mcp-blog # Install dependencies with uv uv pip install -e .
# Clone the repository git clone https://github.com/yourusername/mcp-blog.git cd mcp-blog # Install dependencies pip install -e .
# Import the MCP server from main import mcp # Get all blogs blogs = mcp.tools.get_blogs() # Search for blogs by title search_results = mcp.tools.search_blogs(query="Python") # Add a new blog new_blog = mcp.tools.add_blog(title="My New Blog", body="This is the content of my new blog post.")
uv python main.py
python main.py
uv provides fast environment management for Python projects. Here's how to create and manage a virtual environment for this project:
# Create a new virtual environment uv venv # Activate the virtual environment # On Unix/macOS source .venv/bin/activate # On Windows .venv\Scripts\activate # Install dependencies in the virtual environment uv pip install -e . # Update dependencies uv pip sync
Fetches all blogs from the mock API.
Searches for blogs by title using the mock API.
Adds a new blog to the mock API.
[Add your license information here]
[Add contribution guidelines here]
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!