MCP Blog API

by tussanakorn
  • Linux
  • Apple
Integrations
  • Allows interaction with a mock blog API service, providing tools for fetching blogs, searching blogs by title, and adding new blog posts.

MCP Blog API

A simple blog API service built with FastMCP and httpx. This project supports uv for fast, reliable Python package management and environment setup.

Description

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.

Features

  • Fetch all blogs from the mock API
  • Search for blogs by title
  • Add new blog posts

Requirements

  • Python 3.13 or higher
  • httpx 0.28.1 or higher
  • mcp 1.9.0 or higher

Installation

# Clone the repository git clone https://github.com/yourusername/mcp-blog.git cd mcp-blog # Install dependencies with uv uv pip install -e .

Using pip

# Clone the repository git clone https://github.com/yourusername/mcp-blog.git cd mcp-blog # Install dependencies pip install -e .

Usage

# 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.")

Running the Server

uv python main.py

Using standard Python

python main.py

Environment Management

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

API Reference

get_blogs()

Fetches all blogs from the mock API.

search_blogs(query: str)

Searches for blogs by title using the mock API.

add_blog(title: str, body: str)

Adds a new blog to the mock API.

License

[Add your license information here]

Contributing

[Add contribution guidelines here]

-
security - not tested
F
license - not found
-
quality - not tested

A simple blog API service built with FastMCP that allows users to fetch all blogs, search for blogs by title, and add new blog posts.

  1. Description
    1. Features
      1. Requirements
        1. Installation
          1. Using uv (Recommended)
          2. Using pip
        2. Usage
          1. Running the Server
            1. Using uv (Recommended)
            2. Using standard Python
          2. Environment Management
            1. Using uv (Recommended)
          3. API Reference
            1. get_blogs()
            2. search_blogs(query: str)
            3. add_blog(title: str, body: str)
          4. License
            1. Contributing

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Python MCP server that enables semantic search through Search Labs blog posts indexed in Elasticsearch, allowing Claude to intelligently retrieve relevant information from the blog content.
                Last updated -
                Python
              • -
                security
                F
                license
                -
                quality
                An intermediary server that enables AI models to interact with Google's Blogger platform, automating the creation and management of blogs, posts, and labels through the Blogger API.
                Last updated -
                58
                1
                TypeScript
              • -
                security
                F
                license
                -
                quality
                A FastMCP-based service that provides stock data including historical prices, fundamental information, and financial news.
                Last updated -
                1
                Python
                • Linux
                • Apple
              • -
                security
                -
                license
                -
                quality
                A FastMCP server that enables browser automation through natural language commands, allowing Language Models to browse the web, fill out forms, click buttons, and perform other web-based tasks via a simple API.
                Last updated -
                1
                Python

              View all related MCP servers

              ID: u42ynrwl1f