Office Supplies Inventory NANDA Service

Office Supplies Inventory NANDA Service

MCP server that allows AI assistants to query and retrieve information about office supplies inventory from a CSV file.

Category
访问服务器

README

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 implementation
  • inventory.csv: CSV file containing the office supply inventory data
  • build.sh: Script for setting up the environment
  • run.sh: Script for running the server
  • requirements.txt: List of Python dependencies

Quick Start

Local Setup

  1. Clone this repository:

    git clone https://github.com/aidecentralized/nanda-servers.git
    cd office-supplies-shop-server
    
  2. Choose one of the environment setup options below:

Option A: Using Python venv

  1. Create a Python virtual environment:

    python -m venv venv
    
  2. Activate the virtual environment:

    • On Linux/macOS:
      source venv/bin/activate
      
    • On Windows:
      venv\Scripts\activate
      
  3. Install dependencies:

    pip install -r requirements.txt
    

Option B: Using Conda

  1. Create a new conda environment:

    conda create --name inventory_env python=3.11
    
  2. Activate the conda environment:

    conda activate inventory_env
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Running the Server Locally to Test

After setting up your environment using either option above:

  1. Run the server:

    python officesupply.py
    
  2. The server will be available at: http://localhost:8080

Testing with MCP Inspector

  1. Install the MCP Inspector:

    npx @modelcontextprotocol/inspector
    
  2. Open the URL provided by the inspector in your browser

  3. Connect using SSE transport type

  4. Enter your server URL with /sse at the end (e.g., http://localhost:8080/sse)

  5. Test the available tools:

    • get_items: Lists all item names in the inventory
    • get_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

  1. Make sure your repository includes:

    • All code files
    • requirements.txt
    • build.sh and run.sh scripts
  2. Set 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

Deploying to AWS AppRunner

  1. Create AWS account

  2. Add your credit card for billing

  3. Go to AWS AppRunner (https://console.aws.amazon.com/apprunner)

  4. Log in (if you’re not already)

  5. 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.

  6. Create a new service from your source code repository

  7. Configure the service:

    • Python 3.11 runtime
    • Build command: ./build.sh
    • Run command: ./run.sh
    • Port: 8080
  8. Deploy and wait for completion

  9. Test the public endpoint with MCP Inspector

Registering on NANDA Registry

  1. Go to NANDA Registry
  2. Login or create an account
  3. Click "Register a new server"
  4. Fill in the details:
    • Server name
    • Description
    • Public endpoint URL (without /sse)
    • Tags and categories
  5. Register your server

Usage in NANDA Host, a Browser based Client

  1. Visit nanda.mit.edu
  2. Go to the NANDA host
  3. Add your Anthropic API key
  4. Find your MCP server in the registry
  5. Add it to your host
  6. 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: MCP Server Tutorial

Acknowledgments

Based on the NANDA Servers repository. Follow ProjectNanda at https://nanda.mit.edu

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选