zone-vip-mcp
v0.1.6
Published
MCP server for logging working hours to zone system
Maintainers
Readme
Zone VIP MCP
A Model Context Protocol (MCP) server for logging working hours to the Zone system. This tool allows you to easily track and submit your work hours directly from your development environment.
Features
- 🕒 Log working hours to Zone system
- 🔄 Automatic repository and branch detection
- 🔐 Token-based authentication
- 📝 Detailed work descriptions
- 🚀 Easy to use with npx
Installation
Using npx (Recommended)
You can run this tool directly without installation:
npx zone-vip-mcpGlobal Installation
npm install -g zone-vip-mcpLocal Installation
npm install zone-vip-mcpUsage
This is an MCP server that provides a logHours tool for logging working hours. It's designed to be used with MCP-compatible clients.
Prerequisites
- You need to be in a Git repository
- You need a valid Zone system authentication token
- The repository should be registered in the Zone system
Tool Parameters
The logHours tool accepts the following parameters:
hours(number, required): Hours worked (0.1 - 24)description(string, required): Description of work donetoken(string, optional): Zone system authentication tokencwd(string, optional): Working directory path (auto-detected if not provided)
Example Usage with MCP Client
// Example of calling the logHours tool
{
"hours": 2.5,
"description": "Implemented user authentication feature",
"token": "your-zone-auth-token",
"cwd": "/path/to/your/project"
}Configuration
Authentication Token
The first time you use the tool, you'll need to provide your Zone system authentication token. The token will be stored for subsequent uses until the session ends.
Git Repository Setup
Make sure your project is:
- A Git repository
- Has a remote origin
- Is registered in the Zone system
API Endpoints
This tool connects to the Zone system API at https://zone.haier.net:30931 and uses the following endpoints:
/zone/bff-service/branches/listBy- Get task information/zone/task-service/tasks/{taskId}/work-logs- Log work hours/zone/code-service/repos- Get repository information
Development
Requirements
- Node.js >= 16.0.0
- Git
Local Development
- Clone the repository:
git clone <your-repo-url>
cd zone-vip-mcp- Install dependencies:
npm install- Run the server:
npm startProject Structure
src/
├── server.js # Main MCP server entry point
├── logHours.js # Core hours logging functionality
├── api.js # Zone system API integration
├── token.js # Token management
└── utils.js # Git utilities (branch, repo detection)Publishing to NPM
To publish this package to npm:
- Update the version in
package.json - Make sure you're logged in to npm:
npm login - Publish:
npm publish
License
ISC
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Support
If you encounter any issues or have questions, please open an issue on the GitHub repository.
