jsonplaceholder-mcp

jsonplaceholder-mcp

An MCP server that provides tools to interact with the JSONPlaceholder fake REST API for testing and prototyping, supporting CRUD operations on posts, comments, todos, and users.

Category
Visit Server

README

JSONPlaceholder MCP Server

An MCP (Model Context Protocol) server that provides tools to interact with the JSONPlaceholder API - a free fake REST API for testing and prototyping.

Features

This MCP server exposes the following tools:

Tools

  1. get_posts - Retrieve posts from JSONPlaceholder

    • Get all posts
    • Get a specific post by ID
    • Filter posts by user ID
  2. get_users - Retrieve user information

    • Get all users
    • Get a specific user by ID
  3. get_comments - Retrieve comments

    • Get all comments
    • Get a specific comment by ID
    • Get comments for a specific post
  4. get_todos - Retrieve todos

    • Get all todos
    • Get a specific todo by ID
    • Filter todos by user ID
  5. create_post - Create a new post (simulated)

    • Requires: userId, title, body
  6. update_post - Update an existing post (simulated)

    • Requires: id
    • Optional: userId, title, body
  7. delete_post - Delete a post (simulated)

    • Requires: id

Resources

  • jsonplaceholder://api-info - Information about the JSONPlaceholder API

Installation

  1. Clone this repository:
git clone <repository-url>
cd jsonplaceholder-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

Running the Server

npm start

Development Mode

npm run dev

Watch Mode (for development)

npm run watch

Integration with Claude Desktop

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file:

macOS

Edit: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows

Edit: %APPDATA%/Claude/claude_desktop_config.json

Linux

Edit: ~/.config/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "jsonplaceholder": {
      "command": "node",
      "args": ["/absolute/path/to/jsonplaceholder-mcp/dist/index.js"]
    }
  }
}

Replace /absolute/path/to/jsonplaceholder-mcp with the actual path to your installation.

Example Usage in Claude

Once connected, you can ask Claude to:

  • "Get all posts from JSONPlaceholder"
  • "Show me user with ID 1"
  • "Get comments for post 1"
  • "Create a new post with title 'Test Post' and body 'This is a test'"
  • "Get all todos for user 1"
  • "Update post 1 with a new title"
  • "Delete post 1"

About JSONPlaceholder

JSONPlaceholder is a free fake REST API for testing and prototyping. It provides:

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

Note: All POST, PUT, PATCH, and DELETE operations are simulated and won't persist to the actual server.

API Base URL: https://jsonplaceholder.typicode.com

Development

This project uses:

  • TypeScript for type safety
  • @modelcontextprotocol/sdk - Official Anthropic MCP SDK
  • Node.js runtime

Project Structure

jsonplaceholder-mcp/
├── src/
│   └── index.ts          # Main MCP server implementation
├── dist/                 # Compiled JavaScript (generated)
├── package.json          # Project dependencies and scripts
├── tsconfig.json         # TypeScript configuration
└── README.md            # This file

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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