# JSONPlaceholder MCP

> JSONPlaceholder provides a reliable mock REST API for simulating data interactions. It lets your AI agent perform full CRUD operations—creating, reading, updating, and deleting posts, comments, albums, photos, and todos. Perfect for developers prototyping complex logic or testing client integrations without needing to set up a live backend.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** rest-api, mock-data, testing, prototyping, crud

## Description

This MCP connects your agent to JSONPlaceholder, the industry-standard fake REST API. You use this tool when you need to test out how your AI workflow handles structured data—like simulating content creation or verifying user relationships—without touching a real database. If you're building an agent that needs to process posts, fetch associated comments, and manage media metadata, this is what you want. It lets your client run through full CRUD lifecycles; for instance, you can use `create_post` to draft content, then `list_comments` to see feedback, before simulating a final update with `update_post`. When developing complex agentic behaviors that require predictable data responses, Vinkius makes connecting this mock API simple. You get the full spectrum of testing tools—from listing users via `list_users` to tracking task completion status using `list_todos`—all in one place.

## Tools

### create_post
Generates a new fake post record when called by the agent.

### delete_post
Simulates deleting an existing post by its ID.

### get_album_photos
Retrieves all photo records associated with a given album ID.

### get_album
Fetches the details for one specific album by its unique ID.

### get_comment
Looks up and returns all data for a single comment record using its ID.

### get_photo
Retrieves the details of a specific photo by ID.

### get_post_comments
Gathers all comments belonging to one specified post.

### get_post
Fetches the content and metadata for a single post by its ID.

### get_todo
Retrieves details for one specific to-do item using its ID.

### get_user_albums
Gets all album records associated with a specified user's account.

### get_user_posts
Retrieves posts written by a specific user ID.

### get_user_todos
Gets all to-do items owned by a specified user.

### get_user
Looks up and returns the profile details for one specific user ID.

### list_albums
Lists all albums, with an option to filter them by a user's ID.

### list_comments
Retrieves multiple comments, allowing filtering based on the parent post ID.

### list_photos
Lists all photo records, with an option to filter them by album ID.

### list_posts
Gets a list of posts, which can be filtered by the user who wrote them.

### list_todos
Retrieves multiple to-do items, with an option to filter them by owner ID.

### list_users
Returns a list of all user accounts available in the system.

### patch_post
Updates specific fields (partial update) of an existing post record.

### update_post
Replaces all content of a post, requiring the full set of data to modify it.

## Prompt Examples

**Prompt:** 
```
List all posts for user 1.
```

**Response:** 
```
I've retrieved the posts for user 1. There are 10 posts available, including titles like 'sunt aut facere...' and 'qui est esse'. Would you like to see the full body of any specific post?
```

**Prompt:** 
```
Get the details for comment ID 5.
```

**Response:** 
```
Inspecting comment 5... It was posted by 'Hayden@althea.biz' with the body: 'harum non quasi et ratione...'. It is linked to post ID 1.
```

**Prompt:** 
```
Create a new post for user 10 with title 'MCP Test' and body 'Testing JSONPlaceholder'.
```

**Response:** 
```
Simulating post creation... Success! A new post has been 'created' with ID 101 for user 10. Title: 'MCP Test'. Note: Since this is a mock API, the data isn't permanently stored.
```

## Capabilities

### Simulate Content Lifecycle
Execute full CRUD operations on posts, allowing your agent to draft, save, modify, and delete content records.

### Map User Relationships
Retrieve user-specific resources like albums or posts using tools such as `get_user_albums` to map out connections between different data types.

### Process Discussion Threads
Fetch and manage comment records, linking specific comments (`get_comment`) back to their parent post for context.

### Manage Media Metadata
Query albums and photos using tools like `list_albums` or `get_album_photos` to simulate a media library workflow.

### Verify State Logic
Check the status of tasks by listing todos via `list_todos`, ensuring your agent can handle different completion statuses.

## Use Cases

### Building a Content Review Agent
A product designer needs to show how an AI agent drafts content. The agent calls `create_post`, then uses `list_photos` and `get_album_photos` to pull in supporting media context, finally using `patch_post` to tag the draft for review.

### Debugging User Profile Views
An engineer needs to verify a user profile page. They call `get_user`, then use `list_posts` and `get_user_todos` to pull in all related activity, ensuring the agent correctly aggregates multiple data sources for one view.

### Simulating Comment Threading
Testing a comment section. The agent calls `get_post` first, then uses `list_comments` and `get_comment` to pull all existing replies, proving the client can build context around nested data.

## Benefits

- You can test the entire content creation flow. Use `create_post` to generate initial draft content and then use `update_post` or `patch_post` later in your workflow to simulate revisions, validating that your client handles both full replacements and partial field updates correctly.
- Verify complex user relationships without needing real credentials. You can check who owns what by calling tools like `get_user_posts` or `get_user_albums`, ensuring your agent accurately links data across users and content types.
- Simulate media handling realistically. By using `list_photos` (filtered by albumId) and then fetching specific photos with `get_photo`, you ensure your agent knows how to manage hierarchical resource calls, which is critical for modern applications.
- Test state-based logic rigorously. Use `list_todos` or `get_todo` to confirm your agent correctly interprets data status (e.g., 'completed' vs. 'pending'), making sure the business rules are encoded right from the start.
- It eliminates setup time. Instead of spending hours building a mock database, you subscribe and immediately begin testing complex data retrieval patterns using tools like `list_comments` or `get_post_comments`.

## How It Works

The bottom line is that you get predictable, structured mock API responses instantly, letting you test your agent's logic without any backend setup.

1. Subscribe to this MCP on Vinkius. No API keys are required for this public testing service, but you might provide a placeholder string if prompted.
2. Instruct your AI client to perform the desired data action (e.g., 'Get all posts for user 5').
3. The agent executes the tool call against JSONPlaceholder and receives structured mock data in response.

## Frequently Asked Questions

**How do I use JSONPlaceholder with my agent?**
You connect this MCP to your preferred AI client via Vinkius. Your agent simply calls the tools (like `list_users` or `get_post`) by name, and the connection handles the communication flow.

**Can I delete a post using JSONPlaceholder?**
Yes, you use the `delete_post` tool. This simulates the action of removing content, allowing your agent to test its deletion logic without affecting any live data.

**Does list_users give me enough info about a user?**
It gives basic user profile information. If you need detailed activity or associated posts, you must follow up by calling tools like `get_user_posts` or `get_user_albums`, passing the retrieved ID.

**What if I need to update only one field of a post?**
Use the `patch_post` tool. This allows you to send only the specific fields that changed, which is cleaner and more accurate than calling `update_post`, which requires replacing the entire resource.

**Does calling `get_user` require any form of API key or authentication?**
No, it doesn't. This MCP is designed as a public mock service for prototyping and testing. You can call tools like `get_user` immediately from your agent without needing to manage keys or credentials.

**If I run many queries using `list_posts`, will the JSONPlaceholder MCP enforce rate limits?**
No, you won't encounter rate limits. Since this is a mock API, it’s built for stress testing and prototyping complex agent behaviors. You can make high volumes of calls to simulate heavy traffic safely.

**How do I ensure precise data retrieval when using `list_photos`?**
You filter by passing specific IDs as parameters. To narrow down the results, you should include an `albumId`. This allows your agent to retrieve exactly the photos tied to a known album.

**Is the data created using `create_post` saved anywhere permanently?**
No, it simulates success but doesn't save. The MCP is strictly for demonstrating CRUD lifecycles within your AI client; any posts you 'create' are temporary mock records.

**Can I filter posts by a specific user?**
Yes! Use the `list_posts` tool with the `userId` parameter to retrieve only the posts created by that specific user ID.

**Does creating or updating a post actually save the data?**
No. JSONPlaceholder is a fake API. Tools like `create_post`, `update_post`, and `delete_post` simulate the response as if the action succeeded, but the server state remains unchanged.

**How do I find comments for a specific post?**
Use the `list_comments` tool and provide the `postId`. This will return all comments associated with that specific post ID.