MOCO 标志

MOCO

组织
niondigital

A Model Context Protocol (MCP) server that provides employee read access to the MOCO API for time tracking, project management, holiday tracking, and presence monitoring.

发布者niondigital
代码仓库moco-mcp
语言TypeScript
复刻数
6
星标数
6
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    MOCO 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 6 个 Star 和 6 个 Fork。

📊 MOCO MCP Server

A Model Context Protocol (MCP) server that provides employee read access to the MOCO API for time tracking, project management, holiday tracking, and presence monitoring.

⚡ Quick Start

bash
npx -y @niondigital/moco-mcp

That's it! The server will start and be ready to connect to your MCP client.

🚀 Installation

Prerequisites

  • Node.js ≥ 18.0.0
  • MOCO account with API access
  • MOCO API key and subdomain

MCP Client Integration

Add to your Claude Desktop claude_desktop_config.json file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "moco": {
      "command": "npx",
      "args": ["-y", "@niondigital/moco-mcp"],
      "env": {
        "MOCO_API_KEY": "your-moco-api-key",
        "MOCO_SUBDOMAIN": "your-subdomain"
      }
    }
  }
}

Add to your Cursor settings:

MacOS: ~/Library/Application Support/Cursor/User/settings.json
Windows: %APPDATA%\Cursor\User\settings.json
Linux: ~/.config/Cursor/User/settings.json

json
{
  "mcpServers": {
    "moco": {
      "command": "npx",
      "args": ["-y", "@niondigital/moco-mcp"],
      "env": {
        "MOCO_API_KEY": "your-moco-api-key",
        "MOCO_SUBDOMAIN": "your-subdomain"
      }
    }
  }
}

Add to your Windsurf MCP configuration:

json
{
   "mcpServers": {
      "moco": {
         "command": "npx",
         "args": ["-y", "@niondigital/moco-mcp"],
         "env": {
            "MOCO_API_KEY": "your-moco-api-key",
            "MOCO_SUBDOMAIN": "your-subdomain"
         }
      }
   }
}

Add the MCP server to Claude Code:

bash
claude mcp add -e MOCO_API_KEY="your-moco-api-key" -e MOCO_SUBDOMAIN="your-subdomain" moco -- npx -y @niondigital/moco-mcp

Configure Gemini CLI with MCP support:

json
{
   "mcpServers": {
      "moco": {
         "command": "npx",
         "args": ["-y", "@niondigital/moco-mcp"],
         "env": {
            "MOCO_API_KEY": "your-moco-api-key",
            "MOCO_SUBDOMAIN": "your-subdomain"
         }
      }
   }
}
  1. Go to Kiro > MCP Servers
  2. Add new MCP server by clicking + Add
  3. Paste the configuration below:
json
{
  "mcpServers": {
    "moco": {
    "command": "npx",
    "args": [
      "-y",
      "@niondigital/moco-mcp"
    ],
    "env": {
       "MOCO_API_KEY": "your-moco-api-key",
       "MOCO_SUBDOMAIN": "your-subdomain"
    },
    "disabled": false,
    "autoApprove": []
    }
  }
}
  1. Click Save to apply changes
  1. Go to Program (right side) > Install > Edit mcp.json
  2. Paste the configuration below:
json
{
  "mcpServers": {
    "moco": {
      "command": "npx",
      "args": ["-y", "@niondigital/moco-mcp"],
       "env": {
          "MOCO_API_KEY": "your-moco-api-key",
          "MOCO_SUBDOMAIN": "your-subdomain"
       }
    }
  }
}
  1. Click Save to apply changes
  2. Toggle MCP server on/off from the right hand side (under Program) or by clicking the plug icon at the bottom of the chat box

🔑 MOCO API Setup

Getting Your API Credentials

  1. Log into your MOCO account
  2. Navigate to API settings:
    • Go to Profile → Integrations
    • Or visit: https://niondigital.mocoapp.com/profile/integrations
  3. Copy the listed API key
  4. Note your subdomain:
    • From your MOCO URL: https://yourcompany.mocoapp.com
    • Your subdomain is: yourcompany

Environment Variables

You can set environment variables in several ways:

Option 1: System Environment Variables

bash
export MOCO_API_KEY="your-moco-api-key"
export MOCO_SUBDOMAIN="your-subdomain"

Option 2: .env File (for local development)

env
MOCO_API_KEY=your-moco-api-key
MOCO_SUBDOMAIN=your-subdomain

Option 3: MCP Client Configuration (recommended) Use the env section in your MCP client configuration as shown above.

🛠️ Available Tools

ToolDescriptionParameters
get_activitiesGet activities within a date range with summation and optional project filteringstartDate, endDate (ISO 8601), projectId (optional)
get_user_projectsList all assigned projects or search by queryquery (optional)
get_user_project_tasksGet all tasks for a specific assigned projectprojectId
get_user_holidaysGet holiday overview for a year with calculationsyear
get_user_presencesGet presence data within a date range with daily summariesstartDate, endDate (ISO 8601)
get_user_sick_daysGet sick days overview for a year with calculationsyear
get_public_holidaysGet public holidays for a year with working days calculationsyear

🎯 Available Prompts

The MoCo MCP server provides 8 intelligent prompts that orchestrate multiple tools to deliver comprehensive insights:

PromptDescriptionKey Parameters
weekly_time_reportGenerates detailed weekly time tracking report with project breakdownweek_start, include_billable_analysis
vacation_planning_assistantAssists with vacation planning by analyzing available days and holidaysplanned_start_date, planned_end_date
personal_productivity_insightsAnalyzes work habits and provides productivity recommendationsanalysis_period, focus_area
monthly_business_reviewCreates comprehensive business reports with trends and metricsmonth, year, include_comparisons
smart_work_life_balance_advisorEvaluates work-life balance with personalized recommendationsanalysis_weeks, target_hours_per_week
project_time_analysisDetailed project time analysis with efficiency metricsproject_ids, time_period
team_capacity_overviewTeam capacity planning with absence and resource analysisplanning_horizon, include_holidays
work_hours_compliance_checkCompliance check for working time regulationscheck_period, max_weekly_hours, max_daily_hours

Prompt Examples

Weekly Time Report:

json
{
  "name": "weekly_time_report",
  "arguments": {
    "week_start": "2024-01-15",
    "include_billable_analysis": true
  }
}

Vacation Planning:

json
{
  "name": "vacation_planning_assistant",
  "arguments": {
    "planned_start_date": "2024-07-15",
    "planned_end_date": "2024-07-29"
  }
}

Work-Life Balance Analysis:

json
{
  "name": "smart_work_life_balance_advisor",
  "arguments": {
    "analysis_weeks": 6,
    "target_hours_per_week": 40
  }
}

Compliance Check:

json
{
  "name": "work_hours_compliance_check",
  "arguments": {
    "check_period": "last_month",
    "max_weekly_hours": 48,
    "max_daily_hours": 10
  }
}

📝 Tool Examples

Get Activities

Filter all activities in a date range:

json
{
  "name": "get_activities",
  "arguments": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-31"
  }
}

Filter activities for a specific project:

json
{
  "name": "get_activities",
  "arguments": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-31",
    "projectId": 123456
  }
}

Sample Output:

Activities from 2024-01-01 to 2024-01-31:

2024-01-15:
  Project 123 (Website Redesign):
    Task 456 (Frontend Development): 4.5h (4:30)
    Task 789 (Backend API): 3.25h (3:15)
    Project total: 7.75h (7:45)
  Daily total: 7.75h (7:45)

Grand total: 7.75h (7:45)

Get User Projects

List all assigned projects:

json
{
  "name": "get_user_projects",
  "arguments": {}
}

Search projects:

json
{
  "name": "get_user_projects",
  "arguments": {
    "query": "website"
  }
}

Get User Project Tasks

json
{
  "name": "get_user_project_tasks",
  "arguments": {
    "projectId": 123456
  }
}

Get User Holidays

json
{
  "name": "get_user_holidays",
  "arguments": {
    "year": 2024
  }
}

Sample Output:

Holiday overview for 2024:

Taken holiday days:
- 2024-03-15: 1.0 day
- 2024-04-22: 0.5 day
- 2024-07-08: 1.0 day

Summary:
- Taken vacation: 2.5 days
- Annual entitlement: 25 days
- Utilization: 10% (2.5/25)
- Remaining vacation: 22.5 days

Get User Presences

json
{
  "name": "get_user_presences",
  "arguments": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-07"
  }
}

Sample Output:

Presences from 2024-01-01 to 2024-01-07:

Daily presences:
- 2024-01-01: 8.25h (8:15)
- 2024-01-02: 7.5h (7:30)
- 2024-01-03: 8.0h (8:00)

Grand total: 23.75h (23:45)

Statistics:
- Working days: 3
- Average per day: 7.92h (7:55)

Get User Sick Days

json
{
  "name": "get_user_sick_days",
  "arguments": {
    "year": 2024
  }
}

Get Public Holidays

json
{
  "name": "get_public_holidays",
  "arguments": {
    "year": 2024
  }
}

Sample Output:

Public holidays for 2024:

Holiday dates:
- 2024-01-01: New Year's Day
- 2024-04-01: Good Friday
- 2024-04-03: Easter Monday
- 2024-05-01: Labor Day
- 2024-05-09: Ascension Day
- 2024-05-20: Whit Monday
- 2024-10-03: German Unity Day
- 2024-12-25: Christmas Day
- 2024-12-26: Boxing Day

Summary:
- Total public holidays: 9 days
- Approximate working days: 251 days

🔧 Advanced Configuration

If you want to run from source:

bash
git clone https://github.com/niondigital/moco-mcp.git
cd moco-mcp
npm install
npm run build
npm start

Then configure your MCP client to use the local path:

json
{
  "mcpServers": {
    "moco": {
      "command": "node",
      "args": ["/path/to/moco-mcp/dist/index.js"],
      "env": {
        "MOCO_API_KEY": "your-moco-api-key",
        "MOCO_SUBDOMAIN": "your-subdomain"
      }
    }
  }
}
dockerfile
FROM node:18-alpine
WORKDIR /app
RUN npm install -g @niondigital/moco-mcp
ENV MOCO_API_KEY=""
ENV MOCO_SUBDOMAIN=""
CMD ["@niondigital/moco-mcp"]

🔍 Troubleshooting

Common Issues

❌ Authentication Error:

API authentication failed. Please check MOCO_API_KEY.
  • Verify your API key is correct and has necessary permissions
  • Check if the API key is properly set in environment variables
  • Ensure the key hasn't expired

❌ Subdomain Error:

MOCO_SUBDOMAIN should only contain the subdomain name
  • Use only the subdomain part: company (not company.mocoapp.com)
  • Remove https:// and .mocoapp.com from the subdomain

❌ Node.js Version Error:

This package requires Node.js >= 18.0.0
  • Update Node.js to version 18 or higher
  • Check your version: node --version

❌ npx Connection Issues:

Error: Cannot find module '@niondigital/moco-mcp'
  • Ensure you have internet connection
  • Try: npx --yes @niondigital/moco-mcp
  • Clear npx cache: npx clear-npx-cache

❌ MCP Client Not Finding Tools:

  • Restart your MCP client after configuration changes
  • Check that environment variables are properly set
  • Verify JSON configuration syntax is correct

Debug Mode

For debugging, you can run the server with additional logging:

bash
NODE_ENV=development npx -y @niondigital/moco-mcp

Testing Connection

You can test the server manually:

bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | npx -y @niondigital/moco-mcp

🌟 Features

  • ✅ Read-only Access: Safe API integration with no data modification
  • 🔄 Automatic Pagination: Handles large datasets seamlessly
  • 📊 Smart Aggregation: Automatic summation by date, project, and task
  • 🎯 Project Filtering: Filter activities by specific projects
  • 🧩 Comprehensive Tools: 7 specialized tools for different use cases
  • 🎯 Intelligent Prompts: 8 AI-powered prompts for complex analysis and insights
  • 🌐 Multi-Client Support: Works with all major MCP clients

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Run tests: npm test
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🆘 Support

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "moco": {
      "command": "npx",
      "args": [
        "-y",
        "@niondigital/moco-mcp"
      ],
      "env": {
        "MOCO_API_KEY": "your-moco-api-key",
        "MOCO_SUBDOMAIN": "your-subdomain"
      }
    }
  }
}

将 MOCO MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 MOCO 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 MOCO 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 MOCO MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "moco": {
      "command": "npx",
      "args": [
        "-y",
        "@niondigital/moco-mcp"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 MOCO MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 MOCO MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 MOCO 帮我完成这项任务吗?
MOCO
当然。我已阅读。
以下是我使用 MOCO 得到的结果。

常见问题

MOCO MCP 服务器有什么用途?

MOCO 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 MOCO MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 MOCO,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 MOCO MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 MOCO 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 MOCO MCP 连接到 TypingMind?

MOCO 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

MOCO MCP 在 TypingMind 中提供哪些工具?

MOCO 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 MOCO MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 MOCO 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇