Skip to main content
Glama
trungls1706

MCP Blog Demo

by trungls1706

MCP Blog Demo

Demo MCP Server kết nối Claude với ứng dụng Blog (Express + MongoDB).

🚀 Quick Start

# Start MongoDB + App
docker compose -p trunglyson-mcp-blog up -d

Server sẽ chạy tại:

🔌 Kết nối với Claude

Claude Code (MCP URL)

http://localhost:3000/sse

🛠 MCP Tools Available

Tool

Description

list_posts

Lấy danh sách bài viết (filter: status, author, tag)

get_post

Lấy chi tiết bài viết theo ID hoặc slug

create_post

Tạo bài viết mới

update_post

Cập nhật bài viết

delete_post

Xóa bài viết

search_posts

Tìm kiếm bài viết theo keyword

get_blog_stats

Thống kê tổng quan blog

📝 API Endpoints

Method

Endpoint

Description

GET

/api/posts

List posts

GET

/api/posts/:id

Get post detail

POST

/api/posts

Create post

PUT

/api/posts/:id

Update post

DELETE

/api/posts/:id

Delete post

GET

/api/posts/stats/overview

Blog statistics

🧪 Test với cURL

# List posts
curl http://localhost:3000/api/posts

# Create post
curl -X POST http://localhost:3000/api/posts \
  -H "Content-Type: application/json" \
  -d '{"title":"Test Post","content":"Hello World","author":"Test"}'

# Search
curl "http://localhost:3000/api/posts?search=node"

📁 Project Structure

mcp-blog-demo/
├── docker-compose.yml
├── Dockerfile
├── package.json
├── src/
│   ├── index.js              # Entry point
│   ├── config/
│   │   └── db.js             # MongoDB connection
│   ├── models/
│   │   └── post.model.js     # Mongoose schema
│   ├── routes/
│   │   └── post.routes.js    # Express routes
│   ├── seed/
│   │   └── seed.js           # Fake data seeder
│   └── mcp/
│       └── server.js         # MCP Server (SSE)

🎯 Demo Scenarios

Sau khi kết nối MCP với Claude, thử các câu hỏi:

  1. "Cho tôi xem danh sách tất cả bài viết"

  2. "Tìm bài viết về Node.js"

  3. "Tạo bài viết mới về React với tiêu đề 'React Hooks Guide'"

  4. "Thống kê blog có bao nhiêu bài viết?"

  5. "Publish bài viết có ID xyz"

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/trungls1706/mcp-server'

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