MCP Blog Project

by thappatan

276 downloads
Not rated
GitHub

About

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

Details

Author
thappatan
Downloads
276
Categories
Other

- TypeScript MCP server using @modelcontextprotocol/sdk
- Express.js mock service for book data
- Python client with langchain_ollama for LLM integration
- Interactive CLI interface for querying
- Runs on stdio transport layer
- Entirely local setup (requires Ollama)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Blog Project
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Start the mock service (cd books-mock-service && npm run dev), then in a separate terminal run the Python client (cd mcp-client && python client.py). Enter queries when prompted; type exit to quit.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp blog project": {
            "MCP-Books-Service": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    ".venv"
                ]
            }
        }
    }
}

McpServers

{
    "MCP-Books-Service": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            ".venv"
        ]
    }
}

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

2. Books Mock Service Setup

cd books-mock-service
npm install
npm run dev

3. MCP Client Setup
```bash
cd mcp-client

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.