@fruition/fcp-mcp-server 1.16.0 → 1.16.2
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/dist/index.js +26 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,7 +43,27 @@ const UNROO_API_URL = process.env.UNROO_API_URL || 'https://app.unroo.io';
|
|
|
43
43
|
const UNROO_API_KEY = process.env.UNROO_API_KEY || '';
|
|
44
44
|
// User identity for Unroo attribution
|
|
45
45
|
// Without this, all actions are attributed to whoever created the FCP API key
|
|
46
|
-
|
|
46
|
+
// Falls back to git config user.email for zero-config setup
|
|
47
|
+
function detectUserEmail() {
|
|
48
|
+
if (process.env.FCP_USER_EMAIL)
|
|
49
|
+
return process.env.FCP_USER_EMAIL;
|
|
50
|
+
try {
|
|
51
|
+
const email = execSync('git config user.email', {
|
|
52
|
+
encoding: 'utf-8',
|
|
53
|
+
timeout: 3000,
|
|
54
|
+
stdio: ['pipe', 'pipe', 'ignore'],
|
|
55
|
+
}).trim();
|
|
56
|
+
if (email) {
|
|
57
|
+
console.error(`[MCP Server] Auto-detected user email: ${email}`);
|
|
58
|
+
return email;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Not in a git repo or no email configured
|
|
63
|
+
}
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
const FCP_USER_EMAIL = detectUserEmail();
|
|
47
67
|
// If no Unroo key, use FCP as proxy (unified key setup)
|
|
48
68
|
const USE_FCP_UNROO_PROXY = !UNROO_API_KEY;
|
|
49
69
|
// Helper to check if Unroo functionality is available (either mode)
|
|
@@ -550,6 +570,11 @@ class UnrooClient {
|
|
|
550
570
|
// Direct Unroo API call
|
|
551
571
|
url = `${this.baseUrl}${path}`;
|
|
552
572
|
headers['X-API-Key'] = this.apiKey;
|
|
573
|
+
// Pass user identity so Unroo attributes actions to the actual user
|
|
574
|
+
// (otherwise all actions show as the API key owner)
|
|
575
|
+
if (FCP_USER_EMAIL) {
|
|
576
|
+
headers['X-FCP-User-Email'] = FCP_USER_EMAIL;
|
|
577
|
+
}
|
|
553
578
|
}
|
|
554
579
|
const response = await fetch(url, {
|
|
555
580
|
...options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fruition/fcp-mcp-server",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"description": "MCP Server for FCP Launch Coordination System - enables Claude Code to interact with FCP launches and track development time",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|