jsquared-2/dummy-json-mcp
If you are the rightful owner of dummy-json-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Dummy JSON MCP is a local and self-hostable remote MCP server for interacting with the Dummy JSON API.
Dummy JSON MCP
Introduction
This project provides a local and self-hostable remote MCP server for the Dummy JSON API to give AI agents the ability to interact with the DummyJSON API.
The server features tools for the following capabilities:
- Images: generate dynamic images and identicons in base64 format
- Carts: view cart information
- Products: search for and view products and product categories
This project also features a demo chatbot-style client in the project to showcase the capabilities of the MCP server's tools.
Table of Contents
Getting Started
Project Installation
Both methods to run the MCP server require that the repository is cloned locally through the following command:
git clone https://github.com/jsquared-2/dummy-json-mcp.git
From there cd
into the directory:
cd dummy-json-mcp
Local Server
[!IMPORTANT] The
uv
package manager is required to execute the server locally.
In an MCP-enabled tool of your choosing, copy the following config, where <repository-path>
is the path to the repository installation:
{
"mcpServers": {
"dummy-json-mcp": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"<repository-path>/src/server/server.py",
"--no-banner"
]
}
}
Remote Server
[!IMPORTANT] This method requires the presence of Docker.
Alternatively, the MCP server can be self-hosted in a remote mode making it accessible via URL.
Once the project is installed, the Dockerfile can be used to build an image that runs the server in the streamable-http
transport mode when run as a container.
[!TIP] The
compose.yml
file can be used as a convenient way to start up the server. The commanddocker compose up -d
can be used to build and start up the container in a detached state.
Once the server is running remotely, copy the following config to the settings of an MCP-enabled tool of your choosing (making sure that the URL matches the expected URL of where the remote server is being hosted):
{
"mcpServers": {
"dummy-json-mcp": {
"type": "streamable-http",
"url": "http://localhost:8000/mcp"
}
}
}
Demo Client
The demo client is a chatbot-style MCP client that supports ollama models, and allows testing out the MCP server in stdio
transport mode.
[!IMPORTANT] If the client does not start, execute the following command to install the client packages:
uv sync --group client
To start the client execute the following command from within the project directory:
uv run streamlit run src/client/client.py