mcp-server-fakestore

habibsalimov/mcp-server-fakestore

3.2

If you are the rightful owner of mcp-server-fakestore and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Server for Fake Store API is a beginner-friendly server that provides seamless access to e-commerce data through the Fake Store API, ideal for learning MCP development and building AI applications.

Tools
9
Resources
0
Prompts
0

🛍️ MCP Server for Fake Store API

npm version License: MIT TypeScript

A beginner-friendly Model Context Protocol (MCP) server that provides seamless access to the Fake Store API. Perfect for learning MCP development and building AI applications with e-commerce data.

✨ Features

  • 🚀 Easy to Use: Simple setup and configuration
  • 🔧 10 MCP Tools: Complete access to products, carts, and users
  • 📦 TypeScript: Full type safety and IntelliSense support
  • Response Caching: Built-in caching for better performance
  • 📝 Comprehensive Logging: Winston-powered logging system
  • Well Tested: Jest test suite with high coverage
  • 📖 Well Documented: Extensive documentation and examples

📋 Prerequisites

  • Node.js >= 18.0.0
  • npm >= 9.0.0

🚀 Quick Start

Installation

npm install -g @habibsalimov/mcp-server-fakestore

Usage with Claude Desktop

Add the server configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "fakestore": {
      "command": "npx",
      "args": ["-y", "@habibsalimov/mcp-server-fakestore"]
    }
  }
}

Restart Claude Desktop, and you're ready to go!

🛠️ Available Tools

Products (4 tools)

Tool NameDescriptionParameters
fakestore_get_productsGet all productslimit?, sort?
fakestore_get_productGet single product by IDid
fakestore_get_categoriesGet all categories-
fakestore_get_products_by_categoryGet products by categorycategory

Carts (3 tools)

Tool NameDescriptionParameters
fakestore_get_cartsGet all shopping cartslimit?, sort?
fakestore_get_cartGet single cart by IDid
fakestore_get_user_cartsGet carts for a useruserId

Users (2 tools)

Tool NameDescriptionParameters
fakestore_get_usersGet all userslimit?
fakestore_get_userGet single user by IDid

💡 Example Usage with Claude

You: "Show me all electronics products"
Claude: *Uses fakestore_get_products_by_category with category="electronics"*

You: "What's in user 1's shopping cart?"
Claude: *Uses fakestore_get_user_carts with userId=1*

You: "Get details for product ID 5"
Claude: *Uses fakestore_get_product with id=5*

🏗️ Development

Clone and Install

git clone https://github.com/habibsalimov/mcp-server-fakestore.git
cd mcp-server-fakestore
npm install

Build

npm run build

Run Tests

npm test
npm run test:coverage

Lint and Format

npm run lint
npm run format

Development Mode

npm run dev

📁 Project Structure

mcp-server-fakestore/
├── src/
│   ├── api/              # API client and endpoints
│   ├── tools/            # MCP tools implementation
│   ├── types/            # TypeScript type definitions
│   ├── utils/            # Utility functions
│   ├── server.ts         # MCP server setup
│   └── index.ts          # Entry point
├── tests/                # Jest tests
├── docs/                 # Documentation
├── examples/             # Usage examples
└── dist/                 # Compiled output

📚 Documentation

  • - Detailed installation and configuration
  • - Examples and use cases
  • - How to contribute
  • - Technical architecture

🤝 Contributing

Contributions are welcome! Please read our for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the file for details.

🙏 Acknowledgments

📧 Support


Made with ❤️ by Habib Salimov