JSONPlaceholder MCP Server

JSONPlaceholder MCP Server

Provides access to JSONPlaceholder's free fake REST API for testing and prototyping, enabling interaction with sample posts, users, comments, albums, photos, and todos through tools, resources, and prompts.

Category
Visit Server

README

JSONPlaceholder MCP Server

A modern Model Context Protocol (MCP) server built with FastMCP that provides access to the JSONPlaceholder API - a free fake REST API for testing and prototyping.

Features

This MCP server provides Resources, Tools, and Prompts for interacting with JSONPlaceholder:

🔧 Tools (Actions)

  • get_posts - Retrieve all posts or a specific post by ID
  • get_users - Retrieve all users or a specific user by ID
  • get_comments - Retrieve comments, optionally filtered by post ID
  • get_albums - Retrieve albums, optionally filtered by user ID
  • get_photos - Retrieve photos, optionally filtered by album ID
  • get_todos - Retrieve todos, optionally filtered by user ID
  • create_post - Create a new post (simulated)
  • search_posts - Search posts by title or body content

📄 Resources (Data Access)

  • posts://all - Get all posts as a resource
  • posts://{post_id} - Get a specific post as a resource
  • users://all - Get all users as a resource
  • users://{user_id} - Get a specific user as a resource

📝 Prompts (Templates)

  • analyze_post - Generate analysis prompt for a specific post
  • user_profile_summary - Create comprehensive user profile analysis

How to add it to cursor:

  "mcpServers": {
    "jsonplaceholder": {
      "command": "/Users/danielpopa/Projects/work/mcp-server/cursor_runner.sh",
      "args": []
    }
  }
} 

Prerequisites

  • Python 3.10+
  • uv package manager

Installation

  1. Clone or download this project
  2. The project is already configured with uv. Simply run:
uv sync

Development & Testing

MCP Inspector (recommended for development):

uv run mcp dev server.py

This opens an interactive web interface to test all tools, resources, and prompts.

Direct server execution:

uv run python server.py

Test API connectivity:

uv run python test_server.py

Claude Desktop Integration

Install directly into Claude Desktop:

uv run mcp install server.py --name "JSONPlaceholder API"

Usage Examples

Once connected to an MCP client, you can:

Use Tools:

  • "Get all posts from JSONPlaceholder"
  • "Show me user details for user ID 1"
  • "Search for posts containing 'dolor'"
  • "Create a new post titled 'Test' with body 'Hello World' for user 1"

Access Resources:

  • The client can load posts://all to get all posts as context
  • Load users://5 to get user 5's details as background information

Use Prompts:

  • Use the "analyze_post" prompt with post ID 1 for detailed post analysis
  • Use "user_profile_summary" with user ID 2 for comprehensive user profiling

API Information

This server uses the JSONPlaceholder API (https://jsonplaceholder.typicode.com/), which provides:

  • 100 posts
  • 10 users
  • 500 comments
  • 100 albums
  • 5000 photos
  • 200 todos

No API key is required as it's completely free and public.

Architecture

Built with FastMCP, this server demonstrates modern MCP patterns:

  • Decorator-based setup - Clean, Pythonic code
  • Type hints - Better development experience
  • Async/await - Efficient HTTP requests
  • Resource management - Proper data exposure to LLMs
  • Prompt templates - Reusable interaction patterns
  • Development tools - Built-in testing and debugging

Development

The server uses:

  • FastMCP - Modern MCP server framework
  • httpx - Async HTTP client
  • Python 3.10+ - Modern Python features
  • uv - Fast Python package management

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
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured