JSONPlaceholder MCP Server

JSONPlaceholder MCP Server

Enables interaction with the JSONPlaceholder REST API for managing posts, comments, and users through MCP tools.

Category
Visit Server

README

JSONPlaceholder MCP Server (practice project)

A minimal MCP server, built with the official Python SDK's FastMCP helper, that wraps the public JSONPlaceholder REST API. It's meant as a template: swap BASE_URL and the tool functions for your own internal API and the shape stays the same.

What it exposes

MCP tool REST call
list_posts GET /posts
get_post GET /posts/{id}
create_post POST /posts
get_comments_for_post GET /posts/{id}/comments
get_user GET /users/{id}
list_users GET /users

1. Set up

cd jsonplaceholder-mcp
python -m venv .venv
source .venv/bin/activate       # on Windows: .venv\Scripts\activate
pip install -r requirements.txt

2. Sanity-check it runs

python server.py

It should sit there waiting on stdio (no visible output is expected — that's normal, it's waiting for an MCP client to talk to it over stdin/stdout). Ctrl+C to stop.

You can also use the MCP inspector to poke at it interactively without wiring up a full client:

mcp dev server.py

This opens a browser UI where you can call each tool by hand and see the JSON that comes back.

3. Connect it to Claude Desktop

Add an entry to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "jsonplaceholder": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["/absolute/path/to/jsonplaceholder-mcp/server.py"]
    }
  }
}

Restart Claude Desktop, and the jsonplaceholder tools should show up in the tool picker.

4. Where to go from here (adapting to a real API)

To point this at an internal REST service instead:

  1. Change BASE_URL.
  2. Add auth — most internal APIs need a header or token. Add it once in _get/_post (e.g. headers={"Authorization": f"Bearer {TOKEN}"}), pulling the token from an environment variable rather than hardcoding it.
  3. Replace each @mcp.tool() function with one per operation you want to expose. Keep the docstrings precise — the LLM uses them to decide when and how to call each tool, so vague docstrings lead to the tool being picked (or skipped) incorrectly.
  4. Keep tools narrow and single-purpose rather than one giant "call any endpoint" tool — that's what makes MCP tools reliable for an LLM to select correctly.

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