planty-mcp
v1.0.2
Published
An MCP server for plant care management.
Readme
planty-mcp
An MCP server for plant care management. This is a personal project providing tools to track plants, watering schedules, growth measurements, and images.
Usage
- Visit https://planty-mcp.onrender.com
- Click "Generate API Key"
- Save the API key
- Configure your MCP client
- Endpoint:
https://planty-mcp.onrender.com/sse - API Key:
planty_live_xxx... - Use Bearer token
- Endpoint:
- Start using
planty-mcp
Architecture
┌─────────────────┐ ┌─────────────────┐
│ MCP Client │ │ Web Client │
└────────┬────────┘ └────────┬────────┘
│ │
│ STDIO │ HTTPS + Bearer Token
│ │
v v
┌────────────────────────────────────────────┐
│ Planty MCP Server │
│ ┌──────────────┐ ┌─────────────────┐ │
│ │ STDIO Server │ │ HTTP/SSE Server │ │
│ │ (server.ts) │ │ (http.ts) │ │
│ └──────┬───────┘ └────────┬────────┘ │
│ │ │ │
│ │ v │
│ │ ┌─────────────────┐ │
│ │ │ Auth Middleware │ │
│ │ │ (validates │ │
│ │ │ API keys) │ │
│ │ └────────┬────────┘ │
│ │ │ │
│ │ v │
│ │ ┌─────────────────┐ │
│ │ │ API Routes │ │
│ │ │ /api/me │ │
│ │ │ /api/add-email │ │
│ │ └────────┬────────┘ │
│ │ │ │
│ v v │
│ ┌──────────────────────────────────────┐ │
│ │ PlantDatabase │ │
│ │ - Users & API Keys (auth) │ │
│ │ - Plants, Watering, Growth, Images │ │
│ └────────────────┬─────────────────────┘ │
└────────────────────┼───────────────────────┘
│
v
┌────────────────┐
│ PostgreSQL │
└────────────────┘Features
- Plant collection management
- Watering tracking and scheduling
- Growth measurement logging
- Plant image references
- Multi-user support with API key authentication
- STDIO for MCP clients, HTTP/SSE for web clients
Stack
- TypeScript
- Node.js
- PostgreSQL
- Express
- MCP SDK
- Biome
Get Started
Local
pnpm install
# Create .env file based on .env.example
pnpm dev:http
pnpm devDocker
# Start with Postgres
docker-compose up -dAPI
HTTP
GET /- Landing (public)POST /api/generate-key- Generate API key (public)GET /api/me- Get user info (auth)POST /api/add-email- Add email (auth)GET /sse- MCP connection through SSE (auth)POST /message- Send MCP messages (auth)
Tools
add_plant- Add new plantlist_plants- List all plantsget_plant- Get plant detailsupdate_plant- Update plant infodelete_plant- Remove plantwater_plant- Record watering eventget_watering_history- View watering logsget_watering_schedule- Get plants needing wateradd_growth_log- Log growth measurementsget_growth_logs- View growth historyadd_plant_image- Add image referenceget_plant_images- Get plant images
Environment
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_NAME=
MCP_USER_ID= # STDIO
PORT= # HTTP