JSON Placeholder Posts MCP
Fetches and filters posts from JSON Placeholder API by userId, with support for elicitation when userId is omitted.
README
JSON Placeholder Posts MCP
A small UV-managed FastMCP server that calls:
https://json-placeholder.mock.beeceptor.com/posts
It exposes two MCP tools:
get_posts_by_user, which returns matching posts whenuserIdis provided. IfuserIdis missing, it creates a durable pending workflow instead of using native MCP elicitation.continue_workflow, which accepts the missing input and completes a pending workflow from any pod.
The tools emit MCP server notifications with log messages and progress updates while they resolve input, fetch posts, and filter results.
Setup
uv sync
Run
For MCP clients that use stdio:
uv run json-placeholder-posts-mcp
For local HTTP testing:
uv run json-placeholder-posts-mcp --transport streamable-http
By default the HTTP server listens at:
http://127.0.0.1:8000/mcp
You can override the host and port with environment variables:
HOST=127.0.0.1 PORT=9000 uv run json-placeholder-posts-mcp --transport streamable-http
Workflow continuation uses Mongo. By default, the server connects to
mongodb://localhost:27017:
uv run json-placeholder-posts-mcp --transport streamable-http
For deployed environments, override the Mongo connection details:
MONGO_URI=mongodb://mongo:27017 \
MONGO_DATABASE=json_placeholder_posts_mcp \
MONGO_WORKFLOW_COLLECTION=elicitation_workflows \
uv run json-placeholder-posts-mcp --transport streamable-http
Technical Design
See docs/mcp-workflow-design.md for the MCP creation flow, workflow continuation pattern, elicitation decision, and multi-pod workflow ID storage design.
Tool
get_posts_by_user
Fetches all posts from the Beeceptor API and returns only posts matching the
provided userId. When userId is omitted, the server creates a pending
workflow that any pod can continue with the returned workflowId.
Input:
{
"userId": 1
}
Output:
{
"status": "completed",
"userId": 1,
"count": 2,
"posts": [],
"source": "https://json-placeholder.mock.beeceptor.com/posts"
}
Pending workflow input:
{}
Pending workflow output:
{
"status": "input_required",
"workflowId": "abc123",
"message": "Enter the userId to fetch posts for.",
"requiredInput": {
"field": "userId",
"type": "integer"
},
"expiresAt": "2026-06-18T10:15:00+00:00"
}
continue_workflow
Completes a pending workflow and clears its stored details after success or failure.
Input:
{
"workflowId": "abc123",
"userId": 1
}
Development
uv run pytest
uv run ruff check .
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.