@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.
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Type definitions for Flagdeck MCP Server
3
+ */
4
+ export interface FlagdeckConfig {
5
+ apiUrl: string;
6
+ apiKey: string;
7
+ environment?: string;
8
+ }
9
+ export interface Flag {
10
+ id: string;
11
+ key: string;
12
+ name: string;
13
+ description?: string;
14
+ valueType: 'boolean' | 'string' | 'number' | 'json';
15
+ defaultValue: any;
16
+ status: 'active' | 'inactive' | 'archived';
17
+ projectId: string;
18
+ environments?: FlagEnvironment[];
19
+ targetingRules?: TargetingRule[];
20
+ rolloutPercentage?: number;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ }
24
+ export interface FlagEnvironment {
25
+ environmentKey: string;
26
+ enabled: boolean;
27
+ value?: any;
28
+ targetingRules?: TargetingRule[];
29
+ rolloutPercentage?: number;
30
+ }
31
+ export interface TargetingRule {
32
+ id?: string;
33
+ attribute: string;
34
+ operator: 'equals' | 'notEquals' | 'contains' | 'notContains' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'in' | 'notIn' | 'startsWith' | 'endsWith' | 'matches';
35
+ value: any;
36
+ description?: string;
37
+ }
38
+ export interface CreateFlagInput {
39
+ key: string;
40
+ name: string;
41
+ description?: string;
42
+ valueType: 'boolean' | 'string' | 'number' | 'json';
43
+ defaultValue: any;
44
+ targetingRules?: TargetingRule[];
45
+ rolloutPercentage?: number;
46
+ }
47
+ export interface UpdateFlagInput {
48
+ name?: string;
49
+ description?: string;
50
+ status?: 'active' | 'inactive' | 'archived';
51
+ defaultValue?: any;
52
+ }
53
+ export interface EvaluationContext {
54
+ userId?: string;
55
+ sessionId?: string;
56
+ email?: string;
57
+ plan?: string;
58
+ country?: string;
59
+ [key: string]: any;
60
+ }
61
+ export interface EvaluationResult {
62
+ flagKey: string;
63
+ value: any;
64
+ variant?: string;
65
+ reason: string;
66
+ metadata?: {
67
+ ruleId?: string;
68
+ rolloutPercentage?: number;
69
+ };
70
+ }
71
+ export interface Project {
72
+ id: string;
73
+ name: string;
74
+ slug: string;
75
+ description?: string;
76
+ organizationId: string;
77
+ createdAt: string;
78
+ updatedAt: string;
79
+ }
80
+ export interface Environment {
81
+ key: string;
82
+ name: string;
83
+ description?: string;
84
+ projectId: string;
85
+ color?: string;
86
+ requireApproval?: boolean;
87
+ createdAt: string;
88
+ updatedAt: string;
89
+ }
90
+ export interface NaturalLanguageRequest {
91
+ input: string;
92
+ context?: Record<string, any>;
93
+ }
94
+ export interface NaturalLanguageResponse {
95
+ flag: Flag;
96
+ aiMetadata: {
97
+ originalInput: string;
98
+ parsedIntent: any;
99
+ confidence: number;
100
+ updateAction?: string;
101
+ };
102
+ }
103
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,YAAY,EAAE,GAAG,CAAC;IAClB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,S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,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Type definitions for Flagdeck MCP Server
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@flagdeck/mcp-server",
3
+ "version": "0.1.0",
4
+ "description": "Model Context Protocol server for Flagdeck - enables AI agents to manage feature flags",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "flagdeck-mcp": "dist/index.js",
10
+ "flagdeck-mcp-setup": "dist/setup.js"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "dev": "tsx watch src/index.ts",
15
+ "start": "node dist/index.js",
16
+ "setup": "tsx src/setup.ts",
17
+ "test": "jest",
18
+ "test:watch": "jest --watch",
19
+ "lint": "eslint src --ext .ts",
20
+ "type-check": "tsc --noEmit"
21
+ },
22
+ "keywords": [
23
+ "mcp",
24
+ "model-context-protocol",
25
+ "feature-flags",
26
+ "flagdeck",
27
+ "ai",
28
+ "llm",
29
+ "claude",
30
+ "anthropic"
31
+ ],
32
+ "author": "Flagdeck",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/flagdeck/flagdeck.git",
37
+ "directory": "packages/@flagdeck/mcp-server"
38
+ },
39
+ "dependencies": {
40
+ "@modelcontextprotocol/sdk": "^0.5.0",
41
+ "zod": "^3.22.4"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.11.0",
45
+ "typescript": "^5.3.3",
46
+ "tsx": "^4.7.0",
47
+ "eslint": "^8.56.0",
48
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
49
+ "@typescript-eslint/parser": "^6.19.0",
50
+ "jest": "^29.7.0",
51
+ "@types/jest": "^29.5.11",
52
+ "ts-jest": "^29.1.1"
53
+ },
54
+ "engines": {
55
+ "node": ">=18.0.0"
56
+ },
57
+ "files": [
58
+ "dist",
59
+ "README.md",
60
+ "LICENSE"
61
+ ]
62
+ }