@devness/useai 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 useai.dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # useai
2
+
3
+ **Track your AI-assisted development workflow.** MCP server that records usage metrics across all your AI coding tools.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/useai.svg)](https://www.npmjs.com/package/useai)
6
+
7
+ ## What is useai?
8
+
9
+ useai is a lightweight [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that tracks how you use AI coding tools — Cursor, Claude Code, Windsurf, GitHub Copilot, and more.
10
+
11
+ It records **how much** you use AI tools, never **what** you use them for. Think of it like a fitness tracker for your development workflow — it knows you coded for 2 hours, not what you built.
12
+
13
+ ### What gets tracked
14
+ - Which AI tool you're using (Cursor, Claude Code, etc.)
15
+ - Session duration
16
+ - Task type (coding, testing, debugging, etc.)
17
+ - Programming languages used
18
+ - File count (number only, never names)
19
+
20
+ ### What is NEVER tracked
21
+ - Your code, prompts, or responses
22
+ - File names or paths
23
+ - Repository or project names
24
+ - Any private or sensitive data
25
+
26
+ ## Quick Start
27
+
28
+ ### Install in Claude Code
29
+
30
+ ```bash
31
+ claude mcp add useai -- npx -y useai
32
+ ```
33
+
34
+ ### Install in Cursor
35
+
36
+ Add to your Cursor MCP settings (`.cursor/mcp.json`):
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "useai": {
42
+ "command": "npx",
43
+ "args": ["-y", "useai"],
44
+ "env": {
45
+ "USEAI_TOKEN": "your-token-from-useai.dev"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Install in Windsurf
53
+
54
+ Add to your Windsurf MCP config:
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "useai": {
60
+ "command": "npx",
61
+ "args": ["-y", "useai"],
62
+ "env": {
63
+ "USEAI_TOKEN": "your-token-from-useai.dev"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### Install in VS Code
71
+
72
+ Add to your VS Code MCP settings:
73
+
74
+ ```json
75
+ {
76
+ "mcp": {
77
+ "servers": {
78
+ "useai": {
79
+ "command": "npx",
80
+ "args": ["-y", "useai"],
81
+ "env": {
82
+ "USEAI_TOKEN": "your-token-from-useai.dev"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## MCP Tools
91
+
92
+ | Tool | Description |
93
+ |------|-------------|
94
+ | `useai_checkin` | Start tracking a session. Records which tool and task type. |
95
+ | `useai_heartbeat` | Periodic ping during long sessions. |
96
+ | `useai_session_end` | End session with summary metrics. |
97
+ | `useai_stats` | View your streak, hours, rank, and tool breakdown. |
98
+ | `useai_share` | Generate a shareable workflow card for social media. |
99
+
100
+ ## Your Profile
101
+
102
+ Once connected, visit your profile at **useai.dev/@username** to see:
103
+
104
+ - Activity heatmap (GitHub-style)
105
+ - AI-paired coding hours
106
+ - Tool distribution
107
+ - Streak and global rank
108
+ - Shareable workflow card
109
+
110
+ ## Privacy
111
+
112
+ useai is designed with privacy as a core principle:
113
+
114
+ - **Open source** — audit exactly what data is sent
115
+ - **Opt-in only** — nothing is tracked without your explicit setup
116
+ - **No code access** — the MCP server never reads your files or prompts
117
+ - **Transparent metrics** — only timestamps, durations, and counts
118
+ - **You own your data** — delete your account and all data is removed
119
+
120
+ ## Links
121
+
122
+ - Website: [useai.dev](https://useai.dev)
123
+ - GitHub: [github.com/nabeelkausari/useai](https://github.com/nabeelkausari/useai)
124
+
125
+ ## License
126
+
127
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,340 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { z } from "zod";
5
+ const USEAI_API = "https://api.useai.dev/v1";
6
+ const VERSION = "0.1.0";
7
+ // Session state
8
+ let sessionStartTime = Date.now();
9
+ let sessionId = crypto.randomUUID();
10
+ let heartbeatCount = 0;
11
+ let clientName = "unknown";
12
+ function detectClient() {
13
+ const env = process.env;
14
+ if (env.CURSOR_EDITOR)
15
+ return "cursor";
16
+ if (env.WINDSURF_EDITOR)
17
+ return "windsurf";
18
+ if (env.CLAUDE_CODE)
19
+ return "claude-code";
20
+ if (env.VSCODE_PID)
21
+ return "vscode";
22
+ if (env.CODEX_CLI)
23
+ return "codex";
24
+ if (env.GEMINI_CLI)
25
+ return "gemini-cli";
26
+ if (env.JETBRAINS_IDE)
27
+ return "jetbrains";
28
+ if (env.ZED_EDITOR)
29
+ return "zed";
30
+ if (env.MCP_CLIENT_NAME)
31
+ return env.MCP_CLIENT_NAME;
32
+ return "unknown";
33
+ }
34
+ async function pushMetrics(data) {
35
+ const token = process.env.USEAI_TOKEN;
36
+ if (!token)
37
+ return false;
38
+ try {
39
+ const res = await fetch(`${USEAI_API}/sessions`, {
40
+ method: "POST",
41
+ headers: {
42
+ "Content-Type": "application/json",
43
+ Authorization: `Bearer ${token}`,
44
+ },
45
+ body: JSON.stringify(data),
46
+ signal: AbortSignal.timeout(5000),
47
+ });
48
+ return res.ok;
49
+ }
50
+ catch {
51
+ // Silently fail — telemetry should never break the user's workflow
52
+ return false;
53
+ }
54
+ }
55
+ function getSessionDuration() {
56
+ return Math.round((Date.now() - sessionStartTime) / 1000);
57
+ }
58
+ function formatDuration(seconds) {
59
+ if (seconds < 60)
60
+ return `${seconds}s`;
61
+ const mins = Math.round(seconds / 60);
62
+ if (mins < 60)
63
+ return `${mins}m`;
64
+ const hrs = Math.floor(mins / 60);
65
+ const remainMins = mins % 60;
66
+ return `${hrs}h ${remainMins}m`;
67
+ }
68
+ // Create server
69
+ const server = new McpServer({
70
+ name: "useai",
71
+ version: VERSION,
72
+ });
73
+ // Tool 1: Session start / check-in
74
+ server.tool("useai_checkin", "Check in to useai.dev to start tracking this AI coding session. " +
75
+ "Call this at the beginning of a conversation to log that the developer is actively using AI tools. " +
76
+ "This only records which AI tool is being used and when — never any code, prompts, or private data.", {
77
+ task_type: z
78
+ .enum([
79
+ "coding",
80
+ "debugging",
81
+ "testing",
82
+ "planning",
83
+ "reviewing",
84
+ "documenting",
85
+ "learning",
86
+ "other",
87
+ ])
88
+ .optional()
89
+ .describe("What kind of task is the developer working on?"),
90
+ }, async ({ task_type }) => {
91
+ sessionStartTime = Date.now();
92
+ sessionId = crypto.randomUUID();
93
+ heartbeatCount = 0;
94
+ clientName = detectClient();
95
+ await pushMetrics({
96
+ event: "session_start",
97
+ session_id: sessionId,
98
+ client: clientName,
99
+ task_type: task_type ?? "coding",
100
+ timestamp: new Date().toISOString(),
101
+ version: VERSION,
102
+ });
103
+ const taskLabel = task_type ?? "coding";
104
+ return {
105
+ content: [
106
+ {
107
+ type: "text",
108
+ text: `useai session started — tracking ${taskLabel} session on ${clientName}. No code or prompts are ever recorded.`,
109
+ },
110
+ ],
111
+ };
112
+ });
113
+ // Tool 2: Heartbeat
114
+ server.tool("useai_heartbeat", "Send a heartbeat to useai.dev to indicate the developer is still actively working. " +
115
+ "Call this periodically during long conversations (every 10-15 minutes). " +
116
+ "Only records a timestamp — no content is captured.", {}, async () => {
117
+ heartbeatCount++;
118
+ await pushMetrics({
119
+ event: "heartbeat",
120
+ session_id: sessionId,
121
+ client: clientName,
122
+ heartbeat_number: heartbeatCount,
123
+ session_duration_seconds: getSessionDuration(),
124
+ timestamp: new Date().toISOString(),
125
+ });
126
+ return {
127
+ content: [
128
+ {
129
+ type: "text",
130
+ text: `Heartbeat sent. Session active for ${formatDuration(getSessionDuration())}.`,
131
+ },
132
+ ],
133
+ };
134
+ });
135
+ // Tool 3: Session end / summary
136
+ server.tool("useai_session_end", "End the current useai.dev tracking session with a summary. " +
137
+ "Call this when the conversation is wrapping up. " +
138
+ "Records duration, task type, and language stats — never any code or prompts.", {
139
+ task_type: z
140
+ .enum([
141
+ "coding",
142
+ "debugging",
143
+ "testing",
144
+ "planning",
145
+ "reviewing",
146
+ "documenting",
147
+ "learning",
148
+ "other",
149
+ ])
150
+ .optional()
151
+ .describe("What kind of task was the developer working on?"),
152
+ languages: z
153
+ .array(z.string())
154
+ .optional()
155
+ .describe("Programming languages used in this session (e.g. ['typescript', 'python'])"),
156
+ files_touched_count: z
157
+ .number()
158
+ .optional()
159
+ .describe("Approximate number of files created or modified (count only, no names)"),
160
+ tools_used_count: z
161
+ .number()
162
+ .optional()
163
+ .describe("Number of other MCP tools or commands invoked during this session"),
164
+ }, async ({ task_type, languages, files_touched_count, tools_used_count }) => {
165
+ const duration = getSessionDuration();
166
+ await pushMetrics({
167
+ event: "session_end",
168
+ session_id: sessionId,
169
+ client: clientName,
170
+ duration_seconds: duration,
171
+ task_type: task_type ?? "coding",
172
+ languages: languages ?? [],
173
+ files_touched: files_touched_count ?? 0,
174
+ tools_used: tools_used_count ?? 0,
175
+ heartbeats: heartbeatCount,
176
+ timestamp: new Date().toISOString(),
177
+ version: VERSION,
178
+ });
179
+ const durationStr = formatDuration(duration);
180
+ const taskLabel = task_type ?? "coding";
181
+ const langStr = languages && languages.length > 0
182
+ ? ` using ${languages.join(", ")}`
183
+ : "";
184
+ return {
185
+ content: [
186
+ {
187
+ type: "text",
188
+ text: `Session complete: ${durationStr} ${taskLabel} session on ${clientName}${langStr}. Logged to useai.dev.`,
189
+ },
190
+ ],
191
+ };
192
+ });
193
+ // Tool 4: View stats
194
+ server.tool("useai_stats", "Show the developer's useai.dev stats — streak, total AI-paired hours, tool breakdown, and global rank. " +
195
+ "Call this when the developer asks about their AI usage stats or useai profile.", {}, async () => {
196
+ const token = process.env.USEAI_TOKEN;
197
+ if (!token) {
198
+ return {
199
+ content: [
200
+ {
201
+ type: "text",
202
+ text: "useai.dev is not connected yet.\n\n" +
203
+ "To get started:\n" +
204
+ "1. Sign up at https://useai.dev\n" +
205
+ '2. Set your token: USEAI_TOKEN="your-token" in your MCP config\n' +
206
+ "3. Your AI coding sessions will be tracked automatically.\n\n" +
207
+ "useai.dev tracks HOW MUCH you use AI tools, never WHAT you use them for.",
208
+ },
209
+ ],
210
+ };
211
+ }
212
+ try {
213
+ const res = await fetch(`${USEAI_API}/stats`, {
214
+ headers: { Authorization: `Bearer ${token}` },
215
+ signal: AbortSignal.timeout(5000),
216
+ });
217
+ if (!res.ok) {
218
+ return {
219
+ content: [
220
+ {
221
+ type: "text",
222
+ text: "Could not fetch stats from useai.dev. The service may be temporarily unavailable.",
223
+ },
224
+ ],
225
+ };
226
+ }
227
+ const stats = (await res.json());
228
+ const lines = [
229
+ `Your useai.dev Stats`,
230
+ `────────────────────`,
231
+ ];
232
+ if (stats.streak_days !== undefined)
233
+ lines.push(`Streak: ${stats.streak_days} days`);
234
+ if (stats.total_hours !== undefined)
235
+ lines.push(`Total AI-paired hours: ${stats.total_hours}h`);
236
+ if (stats.sessions_this_week !== undefined)
237
+ lines.push(`Sessions this week: ${stats.sessions_this_week}`);
238
+ if (stats.rank_percentile !== undefined)
239
+ lines.push(`Global rank: Top ${stats.rank_percentile}%`);
240
+ if (stats.top_tools && stats.top_tools.length > 0) {
241
+ lines.push(``, `Tool Breakdown:`);
242
+ for (const tool of stats.top_tools) {
243
+ const bar = "█".repeat(Math.round(tool.percentage / 5));
244
+ lines.push(` ${tool.name.padEnd(14)} ${bar} ${tool.percentage}%`);
245
+ }
246
+ }
247
+ if (stats.profile_url) {
248
+ lines.push(``, `Profile: ${stats.profile_url}`);
249
+ }
250
+ return { content: [{ type: "text", text: lines.join("\n") }] };
251
+ }
252
+ catch {
253
+ return {
254
+ content: [
255
+ {
256
+ type: "text",
257
+ text: "Could not reach useai.dev. Check your connection.",
258
+ },
259
+ ],
260
+ };
261
+ }
262
+ });
263
+ // Tool 5: Share workflow (generates a shareable link)
264
+ server.tool("useai_share", "Generate a shareable link for the developer's AI workflow on useai.dev. " +
265
+ "This creates a beautiful visual card of their AI tool stack that can be posted on Twitter, LinkedIn, etc.", {
266
+ title: z.string().optional().describe("Title for the workflow (e.g. 'My Full-Stack AI Workflow')"),
267
+ bio: z.string().optional().describe("Short bio or role (e.g. 'Senior TypeScript Developer')"),
268
+ }, async ({ title, bio }) => {
269
+ const token = process.env.USEAI_TOKEN;
270
+ if (!token) {
271
+ return {
272
+ content: [
273
+ {
274
+ type: "text",
275
+ text: "Connect to useai.dev first to share your workflow.\n" +
276
+ "Sign up at https://useai.dev and set USEAI_TOKEN in your MCP config.",
277
+ },
278
+ ],
279
+ };
280
+ }
281
+ try {
282
+ const res = await fetch(`${USEAI_API}/workflows/share`, {
283
+ method: "POST",
284
+ headers: {
285
+ "Content-Type": "application/json",
286
+ Authorization: `Bearer ${token}`,
287
+ },
288
+ body: JSON.stringify({
289
+ title: title ?? "My AI Development Workflow",
290
+ bio: bio ?? "",
291
+ client: clientName,
292
+ timestamp: new Date().toISOString(),
293
+ }),
294
+ signal: AbortSignal.timeout(5000),
295
+ });
296
+ if (!res.ok) {
297
+ return {
298
+ content: [
299
+ {
300
+ type: "text",
301
+ text: "Could not generate share link. The service may be temporarily unavailable.",
302
+ },
303
+ ],
304
+ };
305
+ }
306
+ const data = (await res.json());
307
+ return {
308
+ content: [
309
+ {
310
+ type: "text",
311
+ text: `Your workflow is ready to share!\n\n` +
312
+ `Link: ${data.workflow_url ?? "https://useai.dev/workflows"}\n\n` +
313
+ `Share on:\n` +
314
+ `- Twitter: https://twitter.com/intent/tweet?text=${encodeURIComponent(data.share_text ?? "Check out my AI development workflow")}&url=${encodeURIComponent(data.workflow_url ?? "https://useai.dev")}\n` +
315
+ `- LinkedIn: https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(data.workflow_url ?? "https://useai.dev")}`,
316
+ },
317
+ ],
318
+ };
319
+ }
320
+ catch {
321
+ return {
322
+ content: [
323
+ {
324
+ type: "text",
325
+ text: "Could not reach useai.dev. Check your connection.",
326
+ },
327
+ ],
328
+ };
329
+ }
330
+ });
331
+ // Start the server
332
+ async function main() {
333
+ const transport = new StdioServerTransport();
334
+ await server.connect(transport);
335
+ }
336
+ main().catch((error) => {
337
+ console.error("useai MCP server failed to start:", error);
338
+ process.exit(1);
339
+ });
340
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,SAAS,GAAG,0BAA0B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
+ "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
+ "keywords": [
6
+ "mcp",
7
+ "ai",
8
+ "developer-tools",
9
+ "cursor",
10
+ "claude-code",
11
+ "windsurf",
12
+ "copilot",
13
+ "ai-coding",
14
+ "leaderboard",
15
+ "workflow",
16
+ "model-context-protocol"
17
+ ],
18
+ "author": "nabeelkausari",
19
+ "license": "MIT",
20
+ "type": "module",
21
+ "bin": {
22
+ "useai": "./dist/index.js"
23
+ },
24
+ "main": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "scripts": {
32
+ "build": "tsc",
33
+ "dev": "tsc --watch",
34
+ "start": "node dist/index.js"
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/sdk": "^1.12.1",
38
+ "zod": "^3.24.2"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^22.13.4",
42
+ "typescript": "^5.7.3"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/nabeelkausari/useai"
47
+ },
48
+ "homepage": "https://useai.dev",
49
+ "engines": {
50
+ "node": ">=18"
51
+ }
52
+ }