MCP Blog Project

MCP Blog Project

This is my Example of MCP Server for connect to books service, for my blog

thappatan

Research & Data
Visit Server

README

MCP Blog Project

This project demonstrates the implementation of Model Context Protocol (MCP) in a blog application system. It consists of three main components that work together to provide a seamless integration between language models and structured data operations.

Project Structure

.
├── books-mcp-server/     # TypeScript MCP server implementation
│   ├── build/           # Compiled JavaScript files
│   ├── src/             # Source TypeScript files
│   └── package.json     # Server dependencies and scripts
├── books-mock-service/  # Mock service for book data
│   └── server.js        # Express.js mock server
└── mcp-client/         # Python MCP client implementation
    └── client.py       # Main client application

Components

1. Books MCP Server

A TypeScript-based MCP server that handles the communication protocol between the client and the mock service.

  • Built with TypeScript for type safety
  • Uses @modelcontextprotocol/sdk for MCP implementation
  • Runs on stdio transport layer

2. Books Mock Service

A simple Express.js server that simulates a book data service.

  • Provides mock endpoints for book-related operations
  • Built with Express.js
  • Lightweight and easy to extend

3. MCP Client

A Python-based client that integrates with language models using the MCP protocol.

  • Uses langchain_ollama for LLM integration
  • Implements MCPAgent for handling queries
  • Provides an interactive CLI interface

Setup Instructions

  1. Books MCP Server Setup
cd books-mcp-server
npm install
npm run build
  1. Books Mock Service Setup
cd books-mock-service
npm install
npm run dev
  1. MCP Client Setup
cd mcp-client
# Create and activate virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
# Install dependencies (requirements.txt needed)
pip install langchain-ollama mcp-use

Usage

  1. Start the mock service:
cd books-mock-service
npm run dev
  1. In a new terminal, run the client:
cd mcp-client
python client.py
  1. Enter your queries when prompted. Type 'exit' to quit.

Development

  • The MCP server is built using TypeScript. Make changes in the src directory and rebuild using npm run build
  • The mock service can be extended by adding new routes in server.js
  • The client can be customized by modifying the LLM configuration in client.py

Dependencies

  • Node.js and npm for the MCP server and mock service
  • Python 3.x for the client
  • Ollama for local LLM support
  • Various npm packages as specified in package.json files
  • Python packages: langchain-ollama, mcp-use

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python