MCP-SERVER

MCP-SERVER

Exposes a Posts & Comments API as MCP tools over Streamable HTTP, enabling CRUD operations on posts and comments with validation.

Category
Visit Server

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

  1. Start the main API (Posts server) first, e.g. on port 3000:

    cd .. && MONGO_URI="mongodb://..." npm start
    
  2. 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 – Returns 405 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

  1. MCP client sends POST /mcp with JSON-RPC (e.g. initialize, then tools/call).
  2. Server uses Streamable HTTP transport (stateless, new server + transport per request).
  3. Tool handlers validate arguments (Zod + custom rules), then fetch() the Posts API.
  4. API response is returned as the tool result (or an error).

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured