Allows cloning of the NANDA servers repository to deploy the office supplies inventory MCP server
Office Supplies Inventory NANDA Service using MCP Server + NANDA Registry + NANDA host client
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.
Overview
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:
- Get a list of all available items in the inventory
- Retrieve detailed information about specific items by name
Prerequisites
- Python 3.9 or higher
- Dependencies listed in
requirements.txt
Files in this Repository
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 dependencies
Quick Start
Local Setup
- Clone this repository:
- Choose one of the environment setup options below:
Option A: Using Python venv
- Create a Python virtual environment:
- Activate the virtual environment:
- On Linux/macOS:
- On Windows:
- On Linux/macOS:
- Install dependencies:
Option B: Using Conda
- Create a new conda environment:
- Activate the conda environment:
- Install dependencies:
Running the Server Locally to Test
After setting up your environment using either option above:
- Run the server:
- The server will be available at: http://localhost:8080
Testing with MCP Inspector
- Install the MCP 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 item
CSV Data Format
The server expects an inventory.csv
file with at least the following column:
item_name
: The name of the inventory item
Additional 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.
Deployment
Preparing for Cloud Deployment
- Make sure your repository includes:
- All code files
requirements.txt
build.sh
andrun.sh
scripts
- Set executable permissions on the shell scripts:For Windows, run
Create AWS account
1.
Deploying to AWS AppRunner
- 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:
- Python 3.11 runtime
- Build command:
./build.sh
- Run command:
./run.sh
- Port: 8080
- Deploy and wait for completion
- Test the public endpoint with MCP Inspector
Registering on NANDA Registry
- Go to NANDA Registry
- Login or create an account
- Click "Register a new server"
- Fill in the details:
- Server name
- Description
- Public endpoint URL (without
/sse
) - Tags and categories
- Register your server
Usage in NANDA Host, a Browser based Client
- Visit nanda.mit.edu
- Go to the NANDA host
- Add your Anthropic API key
- Find your MCP server in the registry
- Add it to your host
- Test by asking questions that use your server's functionality
Troubleshooting
- Ensure your CSV file is properly formatted
- Test the server locally before deploying
- Verify your public endpoint works with MCP Inspector before registering
- Check the logs on AWS if deployment fails
Additional Resources
Check out this video tutorial for a walkthrough of setting up and using the MCP server:
Acknowledgments
Based on the NANDA Servers repository. Follow ProjectNanda at https://nanda.mit.edu
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP server that allows AI assistants to query and retrieve information about office supplies inventory from a CSV file.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation contextLast updated -730211TypeScriptMIT License
- AsecurityAlicenseAqualityAn open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.Last updated -1053PythonMIT License
- AsecurityFlicenseAqualityA powerful MCP server that enables AI assistants to interact with Microsoft Graph API for managing Outlook emails, Calendar events, OneDrive files, and Contacts through natural language commands.Last updated -208Python
- -securityFlicense-qualityA MCP Server that gives AI assistants the ability to remember information about users across conversations using vector search technology.Last updated -