Serves as the runtime environment for the MCP server, providing access to the MoCo API for time tracking, project management, and presence monitoring functions.
Used to implement the MCP server with full type safety, ensuring reliable integration with the MoCo API.
📊 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
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
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
Add to your Windsurf MCP configuration:
Add the MCP server to Claude Code:
Configure Gemini CLI with MCP support:
- Go to
Kiro
>MCP Servers
- Add new MCP server by clicking
+ Add
- Paste the configuration below:
- Click
Save
to apply changes
- Go to
Program
(right side) >Install
>Edit mcp.json
- Paste the configuration below:
- Click
Save
to apply changes - 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
- Log into your MoCo account
- Navigate to API settings:
- Go to Profile → Integrations
- Or visit:
https://niondigital.mocoapp.com/profile/integrations
- Copy the listed API key
- Note your subdomain:
- From your MoCo URL:
https://yourcompany.mocoapp.com
- Your subdomain is:
yourcompany
- From your MoCo URL:
Environment Variables
You can set environment variables in several ways:
Option 1: System Environment Variables
Option 2: .env File (for local development)
Option 3: MCP Client Configuration (recommended)
Use the env
section in your MCP client configuration as shown above.
🛠️ Available Tools
Tool | Description | Parameters |
---|---|---|
get_activities | Get activities within a date range with summation and optional project filtering | startDate , endDate (ISO 8601), projectId (optional) |
get_user_projects | List all assigned projects or search by query | query (optional) |
get_user_project_tasks | Get all tasks for a specific assigned project | projectId |
get_user_holidays | Get holiday overview for a year with calculations | year |
get_user_presences | Get presence data within a date range with daily summaries | startDate , endDate (ISO 8601) |
get_user_sick_days | Get sick days overview for a year with calculations | year |
get_public_holidays | Get public holidays for a year with working days calculations | year |
🎯 Available Prompts
The MoCo MCP server provides 8 intelligent prompts that orchestrate multiple tools to deliver comprehensive insights:
Prompt | Description | Key Parameters |
---|---|---|
weekly_time_report | Generates detailed weekly time tracking report with project breakdown | week_start , include_billable_analysis |
vacation_planning_assistant | Assists with vacation planning by analyzing available days and holidays | planned_start_date , planned_end_date |
personal_productivity_insights | Analyzes work habits and provides productivity recommendations | analysis_period , focus_area |
monthly_business_review | Creates comprehensive business reports with trends and metrics | month , year , include_comparisons |
smart_work_life_balance_advisor | Evaluates work-life balance with personalized recommendations | analysis_weeks , target_hours_per_week |
project_time_analysis | Detailed project time analysis with efficiency metrics | project_ids , time_period |
team_capacity_overview | Team capacity planning with absence and resource analysis | planning_horizon , include_holidays |
work_hours_compliance_check | Compliance check for working time regulations | check_period , max_weekly_hours , max_daily_hours |
Prompt Examples
Weekly Time Report:
Vacation Planning:
Work-Life Balance Analysis:
Compliance Check:
📝 Tool Examples
Get Activities
Filter all activities in a date range:
Filter activities for a specific project:
Sample Output:
Get User Projects
List all assigned projects:
Search projects:
Get User Project Tasks
Get User Holidays
Sample Output:
Get User Presences
Sample Output:
Get User Sick Days
Get Public Holidays
Sample Output:
🔧 Advanced Configuration
If you want to run from source:
Then configure your MCP client to use the local path:
🔍 Troubleshooting
Common Issues
❌ Authentication Error:
- 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:
- Use only the subdomain part:
company
(notcompany.mocoapp.com
) - Remove
https://
and.mocoapp.com
from the subdomain
❌ Node.js Version Error:
- Update Node.js to version 18 or higher
- Check your version:
node --version
❌ npx Connection Issues:
- 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:
Testing Connection
You can test the server manually:
🌟 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
- ⚡ Fast Performance: Efficient API calls with proper caching
- 🛡️ Type Safety: Full TypeScript implementation
- 🧩 Comprehensive Tools: 7 specialized tools for different use cases
- 🎯 Intelligent Prompts: 8 AI-powered prompts for complex analysis and insights
- 📅 Date Validation: Automatic date format validation
- 🔍 Error Handling: User-friendly error messages
- 🌐 Multi-Client Support: Works with all major MCP clients
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Run tests:
npm test
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🆘 Support
- MoCo API Issues: MoCo API Documentation
- MCP Protocol: MCP Documentation
- This Package: GitHub Issues
📈 Changelog
v1.0.0
- ✨ Initial release with 7 MCP tools
- 🚀 NPM package with
npx
support - 📚 Multi-client installation guides
- 🔧 Full TypeScript implementation
- ⚡ Automatic pagination and error handling
- 🎯 Project filtering for activities
- 📊 Comprehensive time tracking and project management
- 🎅 Public holidays tracking for working days calculation
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
Provides a Model Context Protocol interface to MoCo time tracking and project management systems, enabling AI assistants to retrieve work activities, projects, tasks, holidays, and presence data.
- ⚡ Quick Start
- 🚀 Installation
- 🔑 MoCo API Setup
- 🛠️ Available Tools
- 🎯 Available Prompts
- 📝 Tool Examples
- 🔧 Advanced Configuration
- 🔍 Troubleshooting
- 🌟 Features
- 🤝 Contributing
- 📄 License
- 🆘 Support
- 📈 Changelog
Related Resources
Related MCP Servers
- -securityFlicense-qualityA versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.Last updated -14Python
- AsecurityAlicenseAqualityA Model Context Protocol server for time manipulation tasks, enabling AI models to get the current date/time and calculate duration between timestamps.Last updated -2TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that integrates with TickTick task management service, allowing AI assistants to list, create, update, and complete tasks with proper timezone handling.Last updated -94JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI tools to automatically log their activities with detailed metrics like timestamps, token usage, and costs into daily markdown worklog files.Last updated -11JavaScriptMIT License