mcp-demo-app
MCP Demo App is a Node.js and Express-based API server utilizing TypeScript, designed to manage products and orders with MCP integration. It offers RESTful API endpoints with authentication, using JSON files for data storage, and allows advanced querying through its MCP server tools.
MCP Demo App
A simple Node.js/Express API server using TypeScript for managing products and orders, with Model Context Protocol (MCP) integration.
Features
- RESTful API for products and orders
- Bearer token authentication
- Data stored in JSON files
- MCP server exposing tools for product/order queries
- TypeScript for type safety
Getting Started
Prerequisites
- Node.js (v16+ recommended)
- npm
Install Dependencies
Use npm to install the necessary dependencies.
Build and Run
Build the project and use the scripts to run the API server in both development and production modes. Run the MCP server as needed.
Authentication
Bearer token authentication is required for endpoints except /health
. Valid tokens should be used in the Authorization
header.
API Endpoints
- Health Check
- Products
- Orders
MCP Server Tools
The MCP server provides tools for querying product information, listing products, fetching all orders for a product, and searching products.