@chronova/mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Chronova MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server that exposes Chronova developer productivity data to AI agents. Built on the Model Context Protocol, it lets tools like Claude Desktop, Cursor, and OpenCode query your coding stats, activity, and AI-assisted coding metrics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run directly
|
|
9
|
+
npx @chronova/mcp-server
|
|
10
|
+
|
|
11
|
+
# Or install globally
|
|
12
|
+
npm install -g @chronova/mcp-server
|
|
13
|
+
chronova-mcp
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
The server resolves your API key from multiple sources in priority order:
|
|
19
|
+
|
|
20
|
+
1. **Environment variable** `CHRONOVA_API_KEY`
|
|
21
|
+
2. **Config file** `~/.chronova.cfg` — `api_key` under `[settings]`
|
|
22
|
+
3. **Config file** `~/.wakatime.cfg` — `api_key` under `[settings]` (WakaTime-compatible)
|
|
23
|
+
4. **Default**: empty (requests will fail with 401)
|
|
24
|
+
|
|
25
|
+
Similarly, `api_url` is resolved from `CHRONOVA_API_URL` env var, then the config file's `api_url` key, then the default `https://chronova.dev`.
|
|
26
|
+
|
|
27
|
+
Config files use INI format:
|
|
28
|
+
|
|
29
|
+
```ini
|
|
30
|
+
[settings]
|
|
31
|
+
api_key = waka_your-api-key-here
|
|
32
|
+
api_url = https://chronova.dev/api/v1
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Variable | Required | Default | Description |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| `CHRONOVA_API_KEY` | Yes* | — | Your Chronova API key (*or set in config file) |
|
|
38
|
+
| `CHRONOVA_API_URL` | No | `https://chronova.dev/api/v1` | Chronova API base URL |
|
|
39
|
+
| `PORT` | No | `3001` | Server listen port |
|
|
40
|
+
|
|
41
|
+
CLI flags override env vars: `--port 3001`, `--api-url https://chronova.dev`, `--help`.
|
|
42
|
+
|
|
43
|
+
## Usage with AI Clients
|
|
44
|
+
|
|
45
|
+
### Claude Desktop
|
|
46
|
+
|
|
47
|
+
Add to `claude_desktop_config.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"chronova": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["@chronova/mcp-server"],
|
|
55
|
+
"env": {
|
|
56
|
+
"CHRONOVA_API_KEY": "your-api-key"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Cursor
|
|
64
|
+
|
|
65
|
+
Add to `.cursor/mcp.json`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"chronova": {
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["@chronova/mcp-server"],
|
|
73
|
+
"env": {
|
|
74
|
+
"CHRONOVA_API_KEY": "your-api-key"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### OpenCode
|
|
82
|
+
|
|
83
|
+
Add to `opencode.json` under `mcp`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcp": {
|
|
88
|
+
"chronova": {
|
|
89
|
+
"type": "local",
|
|
90
|
+
"command": ["npx", "@chronova/mcp-server"],
|
|
91
|
+
"enabled": true,
|
|
92
|
+
"env": {
|
|
93
|
+
"CHRONOVA_API_KEY": "your-api-key"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Tools
|
|
101
|
+
|
|
102
|
+
| Tool | Description | Parameters |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `get_developer_context` | Get user profile, subscription, GitHub status, org memberships | None |
|
|
105
|
+
| `get_productivity_summary` | Aggregated coding stats by time range | `range` (required), `project` (optional) |
|
|
106
|
+
| `get_ai_insights` | AI vs manual coding analytics | `range` (required) |
|
|
107
|
+
| `get_recent_activity` | Recent coding heartbeats with filters and pagination | `date`, `start`, `end`, `project`, `language`, `editor`, `page`, `per_page` (all optional) |
|
|
108
|
+
|
|
109
|
+
Named ranges: `today`, `last_7_days`, `last_30_days`, `last_3_months`, `last_6_months`, `last_year`, `all_time`. Custom: `YYYY-MM-DD_to_YYYY-MM-DD`.
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm run dev # Watch mode
|
|
115
|
+
npm test # Run tests
|
|
116
|
+
npm run build # Compile TypeScript
|
|
117
|
+
npm run type-check # Type check only
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Docker
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
docker build -t chronova-mcp .
|
|
124
|
+
docker run -e CHRONOVA_API_KEY=your-key -p 3001:3001 chronova-mcp
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
Proprietary
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chronova/mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"chronova-mcp": "./dist/index.js",
|
|
8
|
+
"chronova-mcp-stdio": "./dist/stdio.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"private": false,
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"start": "node dist/index.js",
|
|
21
|
+
"dev": "tsc --watch & node --watch dist/index.js",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"type-check": "tsc --noEmit",
|
|
24
|
+
"semantic-release": "semantic-release"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
33
|
+
"cors": "^2.8.6",
|
|
34
|
+
"express": "^5.2.1",
|
|
35
|
+
"zod": "^4.4.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
39
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
40
|
+
"@semantic-release/git": "^10.0.1",
|
|
41
|
+
"@semantic-release/github": "^11.0.3",
|
|
42
|
+
"@semantic-release/npm": "^12.0.2",
|
|
43
|
+
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
44
|
+
"@types/cors": "^2.8.19",
|
|
45
|
+
"@types/express": "^5.0.6",
|
|
46
|
+
"@types/node": "^25.8.0",
|
|
47
|
+
"@types/supertest": "^7.2.0",
|
|
48
|
+
"semantic-release": "^24.2.3",
|
|
49
|
+
"supertest": "^7.2.2",
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"vitest": "^4.1.6"
|
|
52
|
+
}
|
|
53
|
+
}
|