productive-io-mcp
Enables interaction with Productive.io task management platform, allowing users to retrieve tasks and filter by assignee, status, or project.
README
Productive.io MCP Server
A Model Context Protocol (MCP) server for interacting with Productive.io task management platform.
Features
- 🔧 Extensible Architecture - Plugin-based tool system for easy extension
- 📦 Modular Design - Clean separation of concerns with TypeScript
- 🔒 Type-Safe - Full TypeScript support with strict type checking
- ⚙️ Configuration Management - Environment-based configuration
- 🎯 Easy to Extend - Add new tools by creating a single class
Installation
# Install dependencies
pnpm install
# Build the project
npm run build
Configuration
For Claude Desktop
Add the MCP server to your Claude Desktop config file with environment variables:
Location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"productive.io": {
"command": "node",
"args": ["/Users/joelkrause/dev/productive-mcp/build/index.js"],
"env": {
"PRODUCTIVE_API_TOKEN": "your-api-token-here",
"PRODUCTIVE_ORGANIZATION_ID": "your-organization-id",
"PRODUCTIVE_USER_ID": "your-user-id"
}
}
}
}
For Development/Testing
You can also use a .env file (use .env.example as a template):
cp .env.example .env
Required environment variables:
PRODUCTIVE_API_TOKEN- Your Productive.io API tokenPRODUCTIVE_ORGANIZATION_ID- Your organization IDPRODUCTIVE_USER_ID- Your user ID
Available Tools
get_task
Get a single task from Productive.io by URL.
Parameters:
url(string) - Productive.io task URL
get_tasks
Get multiple tasks with optional filters.
Parameters:
assignee_id(string, optional) - Filter by assignee IDstatus(number, optional) - Filter by status (1=Open, 2=Closed)project_id(string, optional) - Filter by project ID
Project Structure
src/
├── config/ # Configuration management
│ └── index.ts # Environment-based config loader
├── services/ # API clients and services
│ └── ProductiveApiClient.ts # Typed Productive.io API client
├── tools/ # MCP tools (plugins)
│ ├── base/ # Base tool class
│ │ └── BaseTool.ts
│ ├── get-task/ # Individual tool modules
│ │ ├── index.ts # Tool implementation
│ │ ├── handler.ts # Business logic (includes URL extraction)
│ │ └── schema.ts # Zod validation schema
│ ├── get-tasks/
│ │ ├── index.ts
│ │ ├── handler.ts
│ │ └── schema.ts
│ └── index.ts # Tool registry and auto-registration
├── types/ # TypeScript type definitions
│ ├── config.types.ts
│ ├── productive.types.ts
│ └── tool.types.ts
└── index.ts # Main entry point
Adding a New Tool
Adding a new tool is simple with the extensible architecture:
1. Create a new tool directory
mkdir -p src/tools/your-tool
2. Create the schema (src/tools/your-tool/schema.ts)
import { z } from "zod";
export const YourToolSchema = z.object({
param1: z.string().describe("Description of param1"),
param2: z.number().optional().describe("Optional param2"),
});
export type YourToolInput = z.infer<typeof YourToolSchema>;
3. Create the handler (src/tools/your-tool/handler.ts)
import { ProductiveApiClient } from "../../services/ProductiveApiClient.js";
import { ToolResponse } from "../../types/tool.types.js";
export async function handleYourTool(
input: YourToolInput,
apiClient: ProductiveApiClient
): Promise<ToolResponse> {
try {
// Your logic here
const result = await apiClient.someMethod();
return {
content: [{ type: "text", text: "Success!" }],
};
} catch (error) {
return {
content: [
{
type: "text",
text: `Error: ${error instanceof Error ? error.message : "Unknown"}`,
},
],
isError: true,
};
}
}
4. Create the tool class (src/tools/your-tool/index.ts)
import { BaseTool } from "../base/BaseTool.js";
import { ProductiveApiClient } from "../../services/ProductiveApiClient.js";
import { ToolResponse } from "../../types/tool.types.js";
import { YourToolSchema, YourToolInput } from "./schema.js";
import { handleYourTool } from "./handler.js";
export class YourTool extends BaseTool<YourToolInput> {
readonly name = "your_tool";
readonly description = "Description of what your tool does";
readonly schema = YourToolSchema;
private apiClient: ProductiveApiClient;
constructor(apiClient?: ProductiveApiClient) {
super();
this.apiClient = apiClient || new ProductiveApiClient();
}
async execute(input: YourToolInput): Promise<ToolResponse> {
return handleYourTool(input, this.apiClient);
}
}
5. Register the tool (src/tools/index.ts)
import { YourTool } from "./your-tool/index.js";
export function getAllTools(): Tool[] {
return [
new GetTaskTool(),
new GetTasksTool(),
new YourTool(), // Add your tool here
];
}
That's it! Your new tool will be automatically registered and available.
Development
# Build the project
npm run build
# Watch mode for development
npm run dev
# Type checking only
npm run typecheck
# Clean build directory
npm run clean
# Clean and rebuild
npm run rebuild
Architecture Benefits
Extensibility
- Plugin-based: New tools are self-contained modules
- Auto-registration: Tools are automatically registered from the registry
- No core changes: Adding tools doesn't require modifying the main server code
Type Safety
- Full TypeScript: Strict type checking enabled
- Type inference: Zod schemas provide runtime validation and compile-time types
- API types: Fully typed Productive.io API responses
Maintainability
- Separation of concerns: Each tool has its own directory with schema, handler, and implementation
- Reusable components: BaseTool provides common functionality
- Clear structure: Easy to navigate and understand
Best Practices
- Error handling: Consistent error responses across all tools
- Configuration: Environment-based configuration management
- Documentation: JSDoc comments throughout the codebase
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。