Skip to main content
Glama

MCP Blog API

by tussanakorn

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

FastMCP로 구축된 간단한 블로그 API 서비스로, 사용자가 모든 블로그를 가져오고, 제목으로 블로그를 검색하고, 새로운 블로그 게시물을 추가할 수 있습니다.

  1. 설명
    1. 특징
      1. 요구 사항
        1. 설치
          1. uv 사용 (추천)
          2. pip 사용하기
        2. 용법
          1. 서버 실행
            1. uv 사용 (추천)
            2. 표준 Python 사용
          2. 환경 관리
            1. uv 사용 (추천)
          3. API 참조
            1. get_blogs()
            2. 검색_블로그(쿼리: str)
            3. add_blog(제목: str, 본문: str)
          4. 특허
            1. 기여하다

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.
                Last updated -
                9
                MIT License
              • -
                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 -
                3
              • -
                security
                A
                license
                -
                quality
                A FastMCP-based server that provides tools for discovering RSS feeds, fetching and processing news content, searching articles by keyword, and generating summaries across multiple news sources and categories.
                Last updated -
                MIT License
              • -
                security
                A
                license
                -
                quality
                A REST API built with FastAPI that exposes endpoints via Model Context Protocol (MCP), allowing clients to interact with CRUD operations through MCP interfaces.
                Last updated -
                MIT License
                • Apple
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/tussanakorn/POC_MCP_Protocol_using_FastMCP'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server