MCP-SERVER
Exposes a Posts & Comments API as MCP tools over Streamable HTTP, enabling CRUD operations on posts and comments with validation.
README
MCP Server (Streamable HTTP)
MCP server that exposes the Posts & Comments API as tools over Streamable HTTP. No auth on /mcp.
Requires Node 18+ (MCP SDK and Hono depend on it).
Setup
-
Start the main API (Posts server) first, e.g. on port 3000:
cd .. && MONGO_URI="mongodb://..." npm start -
Install and start the MCP server (default port 3001):
npm install npm start
Configuration
API_BASE_URL– Base URL of the Posts API (default:http://localhost:3000).MCP_PORT– Port for this MCP server (default:3001).
Endpoint
-
POST /mcp– MCP Streamable HTTP endpoint (no authentication).
MCP clients send JSON-RPC here; the server handles initialization and tool calls. -
GET /mcp– Returns405 Method Not Allowed(stateless server, no SSE session).
Tools (with validation)
All tools call the main API and apply the same validation rules.
| Tool | Description | Validation |
|---|---|---|
create_post |
Create a post | title ≥5, author ≥3, category ∈ tech/finance/lifestyle, body ≥50 |
list_posts |
List all posts | — |
get_post |
Get one post by ID | — |
update_post |
Update a post | Same as create_post |
delete_post |
Delete a post (and its comments) | — |
add_comment |
Add comment to a post | text ≥10, commenter required |
list_comments |
List comments for a post | — |
Validation errors (e.g. invalid category, body too short) are returned as tool errors with clear messages. If the API returns 404 (e.g. post not found), the tool returns that as an error.
Flow
- MCP client sends
POST /mcpwith JSON-RPC (e.g.initialize, thentools/call). - Server uses Streamable HTTP transport (stateless, new server + transport per request).
- Tool handlers validate arguments (Zod + custom rules), then
fetch()the Posts API. - API response is returned as the tool result (or an error).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.