@flagdeck/mcp-server 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 +21 -0
- package/README.md +468 -0
- package/dist/client.d.ts +76 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +243 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +236 -0
- package/dist/server.js.map +1 -0
- package/dist/setup.d.ts +7 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +144 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/index.d.ts +28 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +428 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +103 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +62 -0
package/dist/setup.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Interactive setup for Flagdeck MCP Server
|
|
4
|
+
* Helps users configure the MCP server with their API credentials
|
|
5
|
+
*/
|
|
6
|
+
import * as readline from 'readline';
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
import * as os from 'os';
|
|
10
|
+
const rl = readline.createInterface({
|
|
11
|
+
input: process.stdin,
|
|
12
|
+
output: process.stdout,
|
|
13
|
+
});
|
|
14
|
+
function question(query) {
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
rl.question(query, resolve);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async function validateApiKey(apiKey, apiUrl) {
|
|
20
|
+
try {
|
|
21
|
+
const response = await fetch(`${apiUrl}/health`, {
|
|
22
|
+
headers: {
|
|
23
|
+
'X-API-Key': apiKey,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
return response.ok;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function getClaudeConfigPath() {
|
|
33
|
+
const platform = os.platform();
|
|
34
|
+
if (platform === 'darwin') {
|
|
35
|
+
// macOS
|
|
36
|
+
return path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
|
|
37
|
+
}
|
|
38
|
+
else if (platform === 'win32') {
|
|
39
|
+
// Windows
|
|
40
|
+
return path.join(os.homedir(), 'AppData', 'Roaming', 'Claude', 'claude_desktop_config.json');
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
// Linux
|
|
44
|
+
return path.join(os.homedir(), '.config', 'Claude', 'claude_desktop_config.json');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function updateClaudeConfig(config) {
|
|
48
|
+
const configPath = await getClaudeConfigPath();
|
|
49
|
+
let existingConfig = { mcpServers: {} };
|
|
50
|
+
// Read existing config if it exists
|
|
51
|
+
if (fs.existsSync(configPath)) {
|
|
52
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
53
|
+
existingConfig = JSON.parse(content);
|
|
54
|
+
}
|
|
55
|
+
// Ensure mcpServers exists
|
|
56
|
+
if (!existingConfig.mcpServers) {
|
|
57
|
+
existingConfig.mcpServers = {};
|
|
58
|
+
}
|
|
59
|
+
// Get the path to the built MCP server
|
|
60
|
+
const mcpServerPath = path.join(__dirname, 'index.js');
|
|
61
|
+
// Add or update Flagdeck MCP server configuration
|
|
62
|
+
existingConfig.mcpServers.flagdeck = {
|
|
63
|
+
command: 'node',
|
|
64
|
+
args: [mcpServerPath],
|
|
65
|
+
env: {
|
|
66
|
+
FLAGDECK_API_KEY: config.apiKey,
|
|
67
|
+
FLAGDECK_API_URL: config.apiUrl,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
// Create directory if it doesn't exist
|
|
71
|
+
const configDir = path.dirname(configPath);
|
|
72
|
+
if (!fs.existsSync(configDir)) {
|
|
73
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
74
|
+
}
|
|
75
|
+
// Write updated config
|
|
76
|
+
fs.writeFileSync(configPath, JSON.stringify(existingConfig, null, 2));
|
|
77
|
+
console.log(`\n✅ Configuration saved to: ${configPath}`);
|
|
78
|
+
}
|
|
79
|
+
async function main() {
|
|
80
|
+
console.log('╔═══════════════════════════════════════════════════════╗');
|
|
81
|
+
console.log('║ ║');
|
|
82
|
+
console.log('║ Flagdeck MCP Server Setup ║');
|
|
83
|
+
console.log('║ ║');
|
|
84
|
+
console.log('╚═══════════════════════════════════════════════════════╝\n');
|
|
85
|
+
console.log('This wizard will help you configure the Flagdeck MCP Server for Claude Desktop.\n');
|
|
86
|
+
// Step 1: Get API URL
|
|
87
|
+
const defaultApiUrl = 'https://api.flagdeck.com';
|
|
88
|
+
const apiUrlInput = await question(`Enter your Flagdeck API URL (default: ${defaultApiUrl}): `);
|
|
89
|
+
const apiUrl = apiUrlInput.trim() || defaultApiUrl;
|
|
90
|
+
// Step 2: Get API Key
|
|
91
|
+
console.log('\n📋 To get your API key:');
|
|
92
|
+
console.log(' 1. Open Flagdeck in your browser');
|
|
93
|
+
console.log(' 2. Navigate to your project');
|
|
94
|
+
console.log(' 3. Go to Settings → API Keys');
|
|
95
|
+
console.log(' 4. Create a new API key (the project is auto-detected from the key)\n');
|
|
96
|
+
const apiKey = await question('Enter your Flagdeck API Key: ');
|
|
97
|
+
if (!apiKey.trim()) {
|
|
98
|
+
console.log('\n❌ API key is required. Exiting...');
|
|
99
|
+
rl.close();
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
// Step 3: Validate API key
|
|
103
|
+
console.log('\n🔍 Validating API key...');
|
|
104
|
+
const isValid = await validateApiKey(apiKey.trim(), apiUrl);
|
|
105
|
+
if (!isValid) {
|
|
106
|
+
console.log('⚠️ Warning: Could not validate API key. The server may be unreachable or the key may be invalid.');
|
|
107
|
+
const proceed = await question('Do you want to continue anyway? (y/N): ');
|
|
108
|
+
if (proceed.toLowerCase() !== 'y') {
|
|
109
|
+
console.log('\n❌ Setup cancelled.');
|
|
110
|
+
rl.close();
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
console.log('✅ API key validated successfully!');
|
|
116
|
+
}
|
|
117
|
+
// Step 4: Save configuration
|
|
118
|
+
console.log('\n💾 Saving configuration...');
|
|
119
|
+
try {
|
|
120
|
+
await updateClaudeConfig({
|
|
121
|
+
apiKey: apiKey.trim(),
|
|
122
|
+
apiUrl: apiUrl.trim(),
|
|
123
|
+
});
|
|
124
|
+
console.log('\n╔═══════════════════════════════════════════════════════╗');
|
|
125
|
+
console.log('║ ║');
|
|
126
|
+
console.log('║ ✅ Setup Complete! ║');
|
|
127
|
+
console.log('║ ║');
|
|
128
|
+
console.log('╚═══════════════════════════════════════════════════════╝\n');
|
|
129
|
+
console.log('📝 Next steps:');
|
|
130
|
+
console.log(' 1. Restart Claude Desktop completely (quit and reopen)');
|
|
131
|
+
console.log(' 2. The Flagdeck MCP server will connect and auto-detect your project');
|
|
132
|
+
console.log(' 3. Try asking Claude: "List my feature flags"\n');
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
console.error('\n❌ Error saving configuration:', error.message);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
rl.close();
|
|
139
|
+
}
|
|
140
|
+
main().catch((error) => {
|
|
141
|
+
console.error('Error:', error);
|
|
142
|
+
process.exit(1);
|
|
143
|
+
});
|
|
144
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,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C,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;QACvF,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;IAEpE,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,KAAK,EAAE,CAAC;AACb,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Definitions
|
|
3
|
+
* Defines all available tools for AI agents
|
|
4
|
+
*/
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
export declare const listProjectsTool: Tool;
|
|
7
|
+
export declare const getProjectTool: Tool;
|
|
8
|
+
export declare const listEnvironmentsTool: Tool;
|
|
9
|
+
export declare const listFlagsTool: Tool;
|
|
10
|
+
export declare const getFlagTool: Tool;
|
|
11
|
+
export declare const createFlagTool: Tool;
|
|
12
|
+
export declare const updateFlagTool: Tool;
|
|
13
|
+
export declare const deleteFlagTool: Tool;
|
|
14
|
+
export declare const toggleFlagTool: Tool;
|
|
15
|
+
export declare const archiveFlagTool: Tool;
|
|
16
|
+
export declare const evaluateFlagTool: Tool;
|
|
17
|
+
export declare const evaluateBatchTool: Tool;
|
|
18
|
+
export declare const setFlagTargetingTool: Tool;
|
|
19
|
+
export declare const duplicateFlagTool: Tool;
|
|
20
|
+
export declare const bulkArchiveFlagsTool: Tool;
|
|
21
|
+
export declare const listWebhooksTool: Tool;
|
|
22
|
+
export declare const createWebhookTool: Tool;
|
|
23
|
+
export declare const deleteWebhookTool: Tool;
|
|
24
|
+
export declare const toggleWebhookTool: Tool;
|
|
25
|
+
export declare const getFlagMetricsTool: Tool;
|
|
26
|
+
export declare const getProjectMetricsTool: Tool;
|
|
27
|
+
export declare const getApiKeyInfoTool: Tool;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,gBAAgB,EAAE,IAO9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAY5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IAYlC,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,IAqB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,IAoBzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAkC5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAmC5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAiB5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAiB7B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,IA6B9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IAsB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IA+ClC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IAgB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IAelC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,IAS9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IAqB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IAW/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IAW/B,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,IAahC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,IAWnC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,IAS/B,CAAC"}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Definitions
|
|
3
|
+
* Defines all available tools for AI agents
|
|
4
|
+
*/
|
|
5
|
+
// Project & Environment Tools
|
|
6
|
+
export const listProjectsTool = {
|
|
7
|
+
name: 'list_projects',
|
|
8
|
+
description: 'List all projects accessible to your API key',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export const getProjectTool = {
|
|
15
|
+
name: 'get_project',
|
|
16
|
+
description: 'Get details of a specific project',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
projectId: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export const listEnvironmentsTool = {
|
|
28
|
+
name: 'list_environments',
|
|
29
|
+
description: 'List all environments in a project (e.g., development, staging, production)',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
projectId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
// Flag Management Tools
|
|
41
|
+
export const listFlagsTool = {
|
|
42
|
+
name: 'list_flags',
|
|
43
|
+
description: 'List all feature flags in a project. Can filter by status or search term.',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
projectId: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
50
|
+
},
|
|
51
|
+
status: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
enum: ['active', 'inactive', 'archived'],
|
|
54
|
+
description: 'Filter flags by status',
|
|
55
|
+
},
|
|
56
|
+
search: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Search flags by name or key',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const getFlagTool = {
|
|
64
|
+
name: 'get_flag',
|
|
65
|
+
description: 'Get details of a specific flag by ID or key',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
projectId: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
72
|
+
},
|
|
73
|
+
flagId: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
description: 'The ID of the flag',
|
|
76
|
+
},
|
|
77
|
+
flagKey: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'The key of the flag (alternative to flagId)',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
export const createFlagTool = {
|
|
85
|
+
name: 'create_flag',
|
|
86
|
+
description: 'Create a new feature flag. After creation, use set_flag_targeting to configure rollout percentage or targeting rules.',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
projectId: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
93
|
+
},
|
|
94
|
+
key: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Unique key for the flag (kebab-case recommended, e.g., "new-feature")',
|
|
97
|
+
},
|
|
98
|
+
name: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Human-readable name for the flag',
|
|
101
|
+
},
|
|
102
|
+
description: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Description of what this flag controls',
|
|
105
|
+
},
|
|
106
|
+
valueType: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
enum: ['boolean', 'string', 'number', 'json'],
|
|
109
|
+
description: 'Type of the flag value (default: boolean)',
|
|
110
|
+
},
|
|
111
|
+
defaultValue: {
|
|
112
|
+
description: 'Default value when flag is enabled (should match valueType)',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
required: ['key', 'name', 'valueType', 'defaultValue'],
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
export const updateFlagTool = {
|
|
119
|
+
name: 'update_flag',
|
|
120
|
+
description: 'Update a feature flag name, description, status, or default value. ' +
|
|
121
|
+
'To change rollout percentage or targeting rules, use set_flag_targeting instead.',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
projectId: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
128
|
+
},
|
|
129
|
+
flagId: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
description: 'The ID of the flag to update',
|
|
132
|
+
},
|
|
133
|
+
name: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description: 'New name for the flag',
|
|
136
|
+
},
|
|
137
|
+
description: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'New description',
|
|
140
|
+
},
|
|
141
|
+
status: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
enum: ['active', 'inactive', 'archived'],
|
|
144
|
+
description: 'New status',
|
|
145
|
+
},
|
|
146
|
+
defaultValue: {
|
|
147
|
+
description: 'New default value',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
required: ['flagId'],
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
export const deleteFlagTool = {
|
|
154
|
+
name: 'delete_flag',
|
|
155
|
+
description: 'Permanently delete a feature flag. This action cannot be undone.',
|
|
156
|
+
inputSchema: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: {
|
|
159
|
+
projectId: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
162
|
+
},
|
|
163
|
+
flagId: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'The ID of the flag to delete',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
required: ['flagId'],
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
export const toggleFlagTool = {
|
|
172
|
+
name: 'toggle_flag',
|
|
173
|
+
description: 'Toggle a flag between active and inactive status',
|
|
174
|
+
inputSchema: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
projectId: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
180
|
+
},
|
|
181
|
+
flagId: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: 'The ID of the flag to toggle',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
required: ['flagId'],
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
export const archiveFlagTool = {
|
|
190
|
+
name: 'archive_flag',
|
|
191
|
+
description: 'Archive a feature flag (soft delete - can be restored)',
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: 'object',
|
|
194
|
+
properties: {
|
|
195
|
+
projectId: {
|
|
196
|
+
type: 'string',
|
|
197
|
+
description: 'The ID of the project (optional if FLAGDECK_PROJECT_ID is set)',
|
|
198
|
+
},
|
|
199
|
+
flagId: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
description: 'The ID of the flag to archive',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
required: ['flagId'],
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
// Flag Evaluation Tools
|
|
208
|
+
export const evaluateFlagTool = {
|
|
209
|
+
name: 'evaluate_flag',
|
|
210
|
+
description: 'Evaluate a feature flag for a specific user/context. Returns the flag value and evaluation reason.',
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
flagKey: {
|
|
215
|
+
type: 'string',
|
|
216
|
+
description: 'The key of the flag to evaluate',
|
|
217
|
+
},
|
|
218
|
+
context: {
|
|
219
|
+
type: 'object',
|
|
220
|
+
description: 'User/evaluation context with attributes for targeting (e.g., userId, email, plan, country)',
|
|
221
|
+
properties: {
|
|
222
|
+
userId: { type: 'string' },
|
|
223
|
+
sessionId: { type: 'string' },
|
|
224
|
+
email: { type: 'string' },
|
|
225
|
+
plan: { type: 'string' },
|
|
226
|
+
country: { type: 'string' },
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
environment: {
|
|
230
|
+
type: 'string',
|
|
231
|
+
description: 'Environment to evaluate in (default: production or FLAGDECK_ENVIRONMENT)',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
required: ['flagKey', 'context'],
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
export const evaluateBatchTool = {
|
|
238
|
+
name: 'evaluate_batch',
|
|
239
|
+
description: 'Evaluate multiple flags at once for a user/context. More efficient than individual evaluations.',
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
flagKeys: {
|
|
244
|
+
type: 'array',
|
|
245
|
+
items: { type: 'string' },
|
|
246
|
+
description: 'Array of flag keys to evaluate',
|
|
247
|
+
},
|
|
248
|
+
context: {
|
|
249
|
+
type: 'object',
|
|
250
|
+
description: 'User/evaluation context with attributes for targeting',
|
|
251
|
+
},
|
|
252
|
+
environment: {
|
|
253
|
+
type: 'string',
|
|
254
|
+
description: 'Environment to evaluate in',
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
required: ['flagKeys', 'context'],
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
export const setFlagTargetingTool = {
|
|
261
|
+
name: 'set_flag_targeting',
|
|
262
|
+
description: 'Set rollout percentage and/or targeting rules for a feature flag in the current environment. ' +
|
|
263
|
+
'Use rolloutPercentage (0-100) to gradually roll out to a percentage of users. ' +
|
|
264
|
+
'Use rules to target specific users by attribute (e.g., plan=premium, country=US). ' +
|
|
265
|
+
'The API key determines which environment is updated — no env ID needed.',
|
|
266
|
+
inputSchema: {
|
|
267
|
+
type: 'object',
|
|
268
|
+
properties: {
|
|
269
|
+
flagId: {
|
|
270
|
+
type: 'string',
|
|
271
|
+
description: 'The ID of the flag to update',
|
|
272
|
+
},
|
|
273
|
+
rolloutPercentage: {
|
|
274
|
+
type: 'number',
|
|
275
|
+
minimum: 0,
|
|
276
|
+
maximum: 100,
|
|
277
|
+
description: 'Percentage of users to enable the flag for (0 = off for all, 100 = on for all)',
|
|
278
|
+
},
|
|
279
|
+
rules: {
|
|
280
|
+
type: 'array',
|
|
281
|
+
description: 'Targeting rules — users matching these rules get the flag. ' +
|
|
282
|
+
'Each rule has: attribute (e.g. "plan", "country", "email"), ' +
|
|
283
|
+
'operator (equals, notEquals, contains, in, notIn, greaterThan, lessThan, startsWith, endsWith, matches), ' +
|
|
284
|
+
'and value.',
|
|
285
|
+
items: {
|
|
286
|
+
type: 'object',
|
|
287
|
+
properties: {
|
|
288
|
+
attribute: { type: 'string', description: 'User attribute to match (e.g. "plan", "country", "email")' },
|
|
289
|
+
operator: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
enum: ['equals', 'notEquals', 'contains', 'notContains', 'in', 'notIn', 'greaterThan', 'lessThan', 'startsWith', 'endsWith', 'matches'],
|
|
292
|
+
},
|
|
293
|
+
value: { description: 'Value to compare against (string, number, or array for "in"/"notIn")' },
|
|
294
|
+
},
|
|
295
|
+
required: ['attribute', 'operator', 'value'],
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
useTargeting: {
|
|
299
|
+
type: 'boolean',
|
|
300
|
+
description: 'Whether to enable targeting rules (defaults to true when rules are provided)',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
required: ['flagId'],
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
export const duplicateFlagTool = {
|
|
307
|
+
name: 'duplicate_flag',
|
|
308
|
+
description: 'Duplicate an existing feature flag. Creates a copy with the same configuration. ' +
|
|
309
|
+
'Optionally provide a custom key, name, and description for the copy.',
|
|
310
|
+
inputSchema: {
|
|
311
|
+
type: 'object',
|
|
312
|
+
properties: {
|
|
313
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
314
|
+
flagId: { type: 'string', description: 'The ID of the flag to duplicate' },
|
|
315
|
+
key: { type: 'string', description: 'Key for the new flag (auto-generated if omitted)' },
|
|
316
|
+
name: { type: 'string', description: 'Name for the new flag (auto-generated if omitted)' },
|
|
317
|
+
description: { type: 'string', description: 'Description for the new flag' },
|
|
318
|
+
},
|
|
319
|
+
required: ['flagId'],
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
export const bulkArchiveFlagsTool = {
|
|
323
|
+
name: 'bulk_archive_flags',
|
|
324
|
+
description: 'Archive multiple feature flags at once. More efficient than archiving one by one.',
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: 'object',
|
|
327
|
+
properties: {
|
|
328
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
329
|
+
flagIds: {
|
|
330
|
+
type: 'array',
|
|
331
|
+
items: { type: 'string' },
|
|
332
|
+
description: 'Array of flag IDs to archive',
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
required: ['flagIds'],
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
// Webhook Tools
|
|
339
|
+
export const listWebhooksTool = {
|
|
340
|
+
name: 'list_webhooks',
|
|
341
|
+
description: 'List all webhooks configured for the project',
|
|
342
|
+
inputSchema: {
|
|
343
|
+
type: 'object',
|
|
344
|
+
properties: {
|
|
345
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
export const createWebhookTool = {
|
|
350
|
+
name: 'create_webhook',
|
|
351
|
+
description: 'Create a new webhook to receive notifications when flags change. ' +
|
|
352
|
+
'Events include: flag.created, flag.updated, flag.deleted, flag.toggled, flag.archived.',
|
|
353
|
+
inputSchema: {
|
|
354
|
+
type: 'object',
|
|
355
|
+
properties: {
|
|
356
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
357
|
+
name: { type: 'string', description: 'Name for the webhook' },
|
|
358
|
+
url: { type: 'string', description: 'The URL to send webhook payloads to (must be HTTPS)' },
|
|
359
|
+
events: {
|
|
360
|
+
type: 'array',
|
|
361
|
+
items: { type: 'string' },
|
|
362
|
+
description: 'Events to subscribe to. Options: flag.created, flag.updated, flag.deleted, ' +
|
|
363
|
+
'flag.toggled, flag.archived, flag.duplicated, flag.evaluation',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
required: ['name', 'url', 'events'],
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
export const deleteWebhookTool = {
|
|
370
|
+
name: 'delete_webhook',
|
|
371
|
+
description: 'Delete a webhook',
|
|
372
|
+
inputSchema: {
|
|
373
|
+
type: 'object',
|
|
374
|
+
properties: {
|
|
375
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
376
|
+
webhookId: { type: 'string', description: 'The ID of the webhook to delete' },
|
|
377
|
+
},
|
|
378
|
+
required: ['webhookId'],
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
export const toggleWebhookTool = {
|
|
382
|
+
name: 'toggle_webhook',
|
|
383
|
+
description: 'Enable or disable a webhook',
|
|
384
|
+
inputSchema: {
|
|
385
|
+
type: 'object',
|
|
386
|
+
properties: {
|
|
387
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
388
|
+
webhookId: { type: 'string', description: 'The ID of the webhook to toggle' },
|
|
389
|
+
},
|
|
390
|
+
required: ['webhookId'],
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
// Metrics Tools
|
|
394
|
+
export const getFlagMetricsTool = {
|
|
395
|
+
name: 'get_flag_metrics',
|
|
396
|
+
description: 'Get evaluation metrics for a specific feature flag. ' +
|
|
397
|
+
'Returns evaluation counts, error rates, and variant distribution.',
|
|
398
|
+
inputSchema: {
|
|
399
|
+
type: 'object',
|
|
400
|
+
properties: {
|
|
401
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
402
|
+
flagId: { type: 'string', description: 'The ID of the flag to get metrics for' },
|
|
403
|
+
},
|
|
404
|
+
required: ['flagId'],
|
|
405
|
+
},
|
|
406
|
+
};
|
|
407
|
+
export const getProjectMetricsTool = {
|
|
408
|
+
name: 'get_project_metrics',
|
|
409
|
+
description: 'Get overall metrics and analytics summary for the project. ' +
|
|
410
|
+
'Returns total evaluations, active flags count, top flags by usage, and error rates.',
|
|
411
|
+
inputSchema: {
|
|
412
|
+
type: 'object',
|
|
413
|
+
properties: {
|
|
414
|
+
projectId: { type: 'string', description: 'The ID of the project (optional)' },
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
// API Key Info Tool
|
|
419
|
+
export const getApiKeyInfoTool = {
|
|
420
|
+
name: 'get_api_key_info',
|
|
421
|
+
description: 'Get information about the current API key — including which project and environment it belongs to. ' +
|
|
422
|
+
'Useful when the user asks about their API key or wants to know which project/environment is active.',
|
|
423
|
+
inputSchema: {
|
|
424
|
+
type: 'object',
|
|
425
|
+
properties: {},
|
|
426
|
+
},
|
|
427
|
+
};
|
|
428
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;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