MCP server that allows AI assistants to query and retrieve information about office supplies inventory from a CSV file.
Create a NANDA service using Model Context Protocol (MCP) server code that provides information about office supplies inventory. This service allows AI assistants to query and retrieve information about office supplies using the MCP standard. You will use cloud hosted server and a web based NANDA host client. No need to install a local server.
You can deploy a consumer facing web-app for any standard inventory using the same framework.
This project implements a NANDA service using MCP server code that serves office inventory data from a CSV file. It provides tools that allow AI assistants to:
requirements.txt
officesupply.py
: The main server implementationinventory.csv
: CSV file containing the office supply inventory databuild.sh
: Script for setting up the environmentrun.sh
: Script for running the serverrequirements.txt
: List of Python dependenciesClone this repository:
git clone https://github.com/aidecentralized/nanda-servers.git cd office-supplies-shop-server
Choose one of the environment setup options below:
Create a Python virtual environment:
python -m venv venv
Activate the virtual environment:
source venv/bin/activate
venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Create a new conda environment:
conda create --name inventory_env python=3.11
Activate the conda environment:
conda activate inventory_env
Install dependencies:
pip install -r requirements.txt
After setting up your environment using either option above:
Run the server:
python officesupply.py
The server will be available at: http://localhost:8080
Install the MCP Inspector:
npx @modelcontextprotocol/inspector
Open the URL provided by the inspector in your browser
Connect using SSE transport type
Enter your server URL with /sse
at the end (e.g., http://localhost:8080/sse
)
Test the available tools:
get_items
: Lists all item names in the inventoryget_item_info
: Retrieves details about a specific itemThe server expects an inventory.csv
file with at least the following column:
item_name
: The name of the inventory itemAdditional columns will be included in the item details returned by get_item_info
.
Within this purview, you can edit the CSV file for your requirements, and the MCP server should work for your CSV file as well.
Make sure your repository includes:
requirements.txt
build.sh
and run.sh
scriptsSet executable permissions on the shell scripts:
chmod +x build.sh run.sh
For Windows, run
wsl chmod +x build.sh run.sh
Create AWS account
Add your credit card for billing
Go to AWS AppRunner (https://console.aws.amazon.com/apprunner)
Log in (if you’re not already)
Once you're in the App Runner dashboard, you’ll see a blue “Create service” button near the top right of the page. Click that.
Create a new service from your source code repository
Configure the service:
./build.sh
./run.sh
Deploy and wait for completion
Test the public endpoint with MCP Inspector
/sse
)Check out this video tutorial for a walkthrough of setting up and using the MCP server:
Based on the NANDA Servers repository. Follow ProjectNanda at https://nanda.mit.edu
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!