JPI MCP Server
Enables AI assistants to interact with the Just Plan It (JPI) job scheduling and resource management system through 69 MCP tools covering full CRUD operations for jobs, tasks, templates, components, and resources.
README
JPI MCP Server
Model Context Protocol (MCP) server for Just Plan It (JPI) API integration. This server enables AI assistants to interact with the JPI job scheduling and resource management system.
Features
- 69 MCP Tools covering all JPI API endpoints
- Full CRUD operations for all JPI entities
- Batch operations for efficient bulk updates
- Cross-job task operations
- Type-safe TypeScript implementation
- Comprehensive error handling
Quick Start
Prerequisites
- Node.js 18+
- A JPI API token (get from Just Plan It)
Claude Code CLI
claude mcp add jpi \
--transport stdio \
--env JPI_API_TOKEN=your-api-token-here \
--scope user \
-- npx -y jpi-mcp
Claude Desktop
Add to your Claude Desktop configuration file:
{
"mcpServers": {
"jpi": {
"command": "npx",
"args": ["-y", "jpi-mcp"],
"env": {
"JPI_API_TOKEN": "your-api-token-here"
}
}
}
}
Direct CLI Usage
For other CLI tools or direct shell usage:
Unix/macOS/Linux:
JPI_API_TOKEN=your-token npx -y jpi-mcp
Windows PowerShell:
$env:JPI_API_TOKEN="your-token"; npx -y jpi-mcp
Windows CMD:
set JPI_API_TOKEN=your-token && npx -y jpi-mcp
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
JPI_API_TOKEN |
Yes | - | Your JPI API token |
JPI_BASE_URL |
No | https://api.just-plan-it.com |
JPI API base URL |
Architecture
jpi-mcp/
├── src/
│ ├── index.ts # MCP server setup, 69 tool definitions, request handlers
│ ├── client.ts # JpiClient class - HTTP client for JPI API v1
│ └── types/ # TypeScript types matching JPI API schemas
│ ├── index.ts # Re-exports all types
│ ├── enums.ts # OrderStatus, Strategy, TaskStatus, EventType, etc.
│ ├── schemas.ts # Common schemas (Identifier, HyperLink, ResourceGroupConstraint)
│ ├── jobs.ts # Job, Task, JobComponentReference types
│ ├── components.ts # Component, ComponentTask types
│ ├── templates.ts # JobTemplate, TemplateTask, TemplateComponentReference types
│ ├── resources.ts # Resource, ResourceGroup, ResourceCategory types
│ ├── settings.ts # Application settings types
│ └── events.ts # JPI event/change log types
└── package.json
Key Concepts
Jobs & Tasks
- Job: A production order or work order containing one or more tasks
- Task: A single operation within a job (e.g., cutting, welding, painting)
- Predecessors: Tasks that must complete before a task can start
- TaskConnections: Linked tasks for scheduling coordination
Components & References
- Component: A reusable template of tasks that can be referenced by jobs
- JCR (Job Component Reference): Links a component to a job, creating tasks automatically
- TCR (Template Component Reference): Links a component to a job template
Resource Hierarchy
Resource Categories
└── Resource Groups
└── Resources (machines, workers, etc.)
Time Units
IMPORTANT: All time fields in the JPI API are in SECONDS, not minutes.
| Field | Unit | Example |
|---|---|---|
ProductionTimePerUnit |
seconds | 3600 = 1 hour |
SetupTime |
seconds | 900 = 15 minutes |
TeardownTime |
seconds | 600 = 10 minutes |
TransferTime |
seconds | 300 = 5 minutes |
Field Naming Convention
All API fields use PascalCase to match the JPI API exactly (e.g., DueDate, TaskNo, ResourceGroupConstraints).
Available Tools (69 Total)
Helper (1 tool)
| Tool | Description |
|---|---|
jpi_api_info |
Get API information and available endpoints |
Components (9 tools)
| Tool | Description |
|---|---|
jpi_list_components |
List all components |
jpi_create_component |
Create a new component |
jpi_get_component |
Get a component by GUID |
jpi_update_component |
Update a component |
jpi_delete_component |
Delete a component |
jpi_get_component_task |
Get a component task |
jpi_add_component_task |
Add a task to a component |
jpi_update_component_task |
Update a component task |
jpi_delete_component_task |
Delete a component task |
Jobs (27 tools)
| Tool | Description |
|---|---|
jpi_list_jobs |
List all jobs |
jpi_list_jobs_summary |
List jobs without task details (~80% smaller) |
jpi_list_jobs_at_risk |
List jobs at risk of missing due dates |
jpi_create_job |
Create a new job with tasks |
jpi_get_job |
Get a job by GUID |
jpi_update_job |
Update a job |
jpi_delete_job |
Delete a job |
jpi_get_task |
Get a job task |
jpi_add_task |
Add a task to a job |
jpi_update_task |
Update a job task |
jpi_delete_task |
Delete a job task |
jpi_get_jcr |
Get a Job Component Reference |
jpi_add_jcr |
Add a JCR to a job |
jpi_update_jcr |
Update a JCR |
jpi_delete_jcr |
Delete a JCR |
jpi_create_jobs_batch |
Create multiple jobs |
jpi_update_jobs_batch |
Update multiple jobs |
jpi_delete_jobs_batch |
Delete multiple jobs |
jpi_add_tasks_batch |
Add multiple tasks to a job |
jpi_update_tasks_batch |
Update multiple tasks |
jpi_delete_tasks_batch |
Delete multiple tasks |
jpi_add_jcrs_batch |
Add multiple JCRs |
jpi_update_jcrs_batch |
Update multiple JCRs |
jpi_delete_jcrs_batch |
Delete multiple JCRs |
jpi_create_tasks_cross_jobs |
Create tasks across multiple jobs |
jpi_update_tasks_cross_jobs |
Update tasks across multiple jobs |
jpi_delete_tasks_cross_jobs |
Delete tasks across multiple jobs |
Job Templates (13 tools)
| Tool | Description |
|---|---|
jpi_list_templates |
List all templates |
jpi_create_template |
Create a new template |
jpi_get_template |
Get a template by GUID |
jpi_update_template |
Update a template |
jpi_delete_template |
Delete a template |
jpi_get_template_task |
Get a template task |
jpi_add_template_task |
Add a task to a template |
jpi_update_template_task |
Update a template task |
jpi_delete_template_task |
Delete a template task |
jpi_get_tcr |
Get a Template Component Reference |
jpi_add_tcr |
Add a TCR to a template |
jpi_update_tcr |
Update a TCR |
jpi_delete_tcr |
Delete a TCR |
JPI Events (2 tools)
| Tool | Description |
|---|---|
jpi_get_events |
Get events (change log) after a timestamp |
jpi_get_events_filtered |
Get events filtered by type |
Resource Categories (5 tools)
| Tool | Description |
|---|---|
jpi_list_resource_categories |
List all categories |
jpi_create_resource_category |
Create a category |
jpi_get_resource_category |
Get a category |
jpi_update_resource_category |
Update a category |
jpi_delete_resource_category |
Delete a category |
Resource Groups (5 tools)
| Tool | Description |
|---|---|
jpi_list_resource_groups |
List all groups |
jpi_create_resource_group |
Create a group |
jpi_get_resource_group |
Get a group |
jpi_update_resource_group |
Update a group |
jpi_delete_resource_group |
Delete a group |
Resources (5 tools)
| Tool | Description |
|---|---|
jpi_list_resources |
List all resources |
jpi_create_resource |
Create a resource |
jpi_get_resource |
Get a resource |
jpi_update_resource |
Update a resource |
jpi_delete_resource |
Delete a resource |
Settings (2 tools)
| Tool | Description |
|---|---|
jpi_get_settings |
Get application settings |
jpi_update_settings |
Update settings |
Usage Examples
Create a Job with Tasks
{
"Name": "Production Order 001",
"JobNo": "PO-001",
"DueDate": "2024-12-31T17:00:00",
"ReleaseDate": "2024-12-01T08:00:00",
"Strategy": "Asap",
"OrderStatus": "Released",
"Customer": "ACME Corp",
"Quantity": 100,
"Tasks": [
{
"TaskNo": "T010",
"Name": "Laser Cutting",
"ProductionTimePerUnit": 60,
"SetupTime": 900,
"ResourceGroupConstraints": [
{
"ResourceGroup": "resource-group-guid-here"
}
]
},
{
"TaskNo": "T020",
"Name": "Welding",
"ProductionTimePerUnit": 120,
"PredecessorTaskNos": ["T010"],
"ResourceGroupConstraints": [
{
"ResourceGroup": "welding-group-guid"
}
]
}
]
}
Update Task Status
{
"jobGuid": "job-guid-here",
"taskGuid": "task-guid-here",
"TaskStatus": "Started"
}
Batch Create Jobs
{
"jobs": [
{ "Name": "Job 1", "Tasks": [...] },
{ "Name": "Job 2", "Tasks": [...] },
{ "Name": "Job 3", "Tasks": [...] }
]
}
Enums & Types
OrderStatus
| Value | Description |
|---|---|
Quoted |
Job is quoted but not ordered |
Ordered |
Job is ordered but not released |
Released |
Job is released for production |
Standby |
Job is on standby |
Strategy
| Value | Description |
|---|---|
Asap |
Schedule as soon as possible |
Jit |
Just-in-time scheduling |
ASAP_PLUS |
ASAP with buffer |
JIT_PLUS |
JIT with buffer |
TaskStatus
| Value | Description |
|---|---|
Planned |
Task is planned |
Started |
Task has started |
Finished |
Task is complete |
None |
No status |
Standby |
Task is on standby |
Error Handling
All tools return structured error responses:
{
"error": true,
"status": 400,
"statusText": "Bad Request",
"message": "JPI API Error: 400 Bad Request",
"body": {
"details": "Validation failed for field 'Name'"
}
}
Development
Build
npm run build
Watch Mode
npm run dev
Run Locally
JPI_API_TOKEN=your-token npm start
From Source
git clone https://github.com/anthropics/jpi-mcp.git
cd jpi-mcp
npm install
npm run build
npm start
API Reference
This MCP server wraps the JPI REST API v1. For detailed API documentation:
License
MIT
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。