A Model Context Protocol (MCP) server for integrating Noko time tracking with Claude Desktop.
- Full Noko API v2 integration
- Secure authentication handling
- Time entry management
- Project and user listing
- Error handling and validation
- Async/await support
- Ensure you have Python 3.9+ installed
- Clone this repository:
git clone https://github.com/yourusername/mcp-nokotime.git
cd mcp-nokotime
- Install
uv
if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create and activate a virtual environment:
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
- Install the package in development mode:
uv pip install -e .
- Test the server:
python -m nokotime.server
-
Open Claude Desktop settings at:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- MacOS:
-
Add or update the Noko server configuration:
{
"mcpServers": {
"noko": {
"command": "/Users/sirkitree/repos/mcp-nokotime/.venv/bin/python3",
"args": [
"-m",
"nokotime.server"
],
"env": {
"NOKO_API_TOKEN": "your_existing_token",
"PYTHONPATH": "/Users/sirkitree/repos/mcp-nokotime"
}
}
}
}
Important Notes:
- The
command
should point to Python in your virtual environment (shown above is an example path) - Keep your existing
NOKO_API_TOKEN
value; don't replace it with the example value shown above - Make sure you've completed all installation steps before starting Claude Desktop
- Restart Claude Desktop after making configuration changes
- If you get connection errors, check Claude Desktop logs at
~/Library/Logs/Claude/mcp*.log
Lists time entries with optional filters.
Example:
{
"from": "2023-12-01",
"to": "2023-12-31",
"user_ids": [123],
"project_ids": [456]
}
Creates a new time entry.
Example:
{
"date": "2023-12-14",
"minutes": 60,
"description": "Working on project documentation",
"project_id": 123
}
Lists all available projects.
Example:
{
"state": "active" // Options: "active", "archived", "all"
}
Lists all users.
Example:
{
"state": "active" // Options: "active", "suspended", "all"
}
Run the test suite with:
pytest
For test coverage report:
pytest --cov=nokotime
src/nokotime/server.py
: Main server implementationsrc/nokotime/tools.py
: Tool definitions and schemastests/
: Test suiteconftest.py
: Test fixtures and configurationtest_server.py
: Server teststest_tools.py
: Tool schema tests
-
Authentication Errors
- Ensure your Noko API token is valid
- Check that the token is correctly set in Claude Desktop configuration
- Verify the
X-NokoToken
header is being sent with requests
-
Connection Issues
- Check your internet connection
- Verify the Noko API is accessible
- Check for any firewall restrictions
-
Tool Errors
- Ensure request parameters match the tool schemas
- Check date formats are YYYY-MM-DD
- Verify project and user IDs exist in your Noko account
-
Virtual Environment Issues
- Make sure the virtual environment is activated when installing packages
- Verify the path to Python in the Claude Desktop configuration matches your virtual environment
- On Windows, use backslashes in paths:
.venv\Scripts\python
To enable debug logging, set the environment variable:
export MCP_DEBUG=1
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
MIT License - see LICENSE file for details