库存管理服务器

一个基于FastMCP和PostgreSQL的轻量级库存管理服务器,提供库存管理工具。

  • by chuckstory
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 chuckstory/fast_mcp_inventory

使用说明

FastMCP库存服务器

一个最小的FastMCP服务器,它公开了PostgreSQL支持的库存管理工具。

项目布局

mcp_server/
  main.py              # FastMCP entrypoint
  db/
    connection.py      # Async database pool helpers
    seed_data.py       # Idempotent seed routine
  models/
    inventory_model.py # Pydantic schemas
  tools/
    inventory_tools.py # MCP tools
Dockerfile             # Runtime image for the MCP server
requirements.txt       # Python dependencies
docker-compose.yml     # Local stack with PostgreSQL + server

使用Docker Compose运行

docker-compose up --build

该命令启动PostgreSQL和FastMCP服务器(监听 http://localhost:8000).数据库在启动时会自动迁移和播种。