teamflect-mcp-server 1.0.3 → 1.0.5

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/.env.example CHANGED
@@ -1,9 +1,9 @@
1
- # Teamflect API Configuration
2
- TEAMFLECT_API_KEY=your-api-key-here
3
-
4
- # Transport Configuration
5
- # Options: 'stdio' (default) or 'http'
6
- TRANSPORT=stdio
7
-
8
- # HTTP Server Configuration (only used when TRANSPORT=http)
9
- PORT=3000
1
+ # Teamflect API Configuration
2
+ TEAMFLECT_API_KEY=your-api-key-here
3
+
4
+ # Transport Configuration
5
+ # Options: 'stdio' (default) or 'http'
6
+ TRANSPORT=stdio
7
+
8
+ # HTTP Server Configuration (only used when TRANSPORT=http)
9
+ PORT=3000
package/README.md CHANGED
@@ -1,177 +1,196 @@
1
- # Teamflect MCP Server
2
-
3
- MCP (Model Context Protocol) server for Teamflect API integration. Provides tools to interact with Teamflect's performance management features including goals, feedback, recognitions, reviews, tasks, and user management.
4
-
5
- ## Features
6
-
7
- - **Goals**: Get, create, update progress, and comment on goals
8
- - **Feedbacks**: Get feedbacks, send feedback requests (internal and external)
9
- - **Recognitions**: Get, search, and create recognitions
10
- - **Reviews**: Get reviews with filtering
11
- - **Tasks**: Get tasks and individual task details
12
- - **Users**: Get users, get user by email, update user attributes, and get available roles
13
-
14
- ## Prerequisites
15
-
16
- - Node.js >= 18
17
- - Teamflect API key from https://admin.teamflect.com
18
- - MCP client (Claude Desktop or Cursor IDE)
19
-
20
- ## Installation
21
-
22
- You can use it directly with `npx` (no installation needed) or install it globally.
23
-
24
- ### Option 1: Use with npx (Recommended - No Installation)
25
-
26
- No installation required. Just use `npx` in your MCP client configuration (see Configuration section below).
27
-
28
- ### Option 2: Install Globally
29
-
30
- ```bash
31
- npm install -g teamflect-mcp-server
32
- ```
33
-
34
- ### Option 3: Install from Source
35
-
36
- For development or customization:
37
-
38
- ```bash
39
- git clone <repository-url>
40
- cd teamflect-mcp-server
41
- npm install
42
- npm run build
43
- ```
44
-
45
- ## Configuration
46
-
47
- ### 1. Get Your API Key
48
-
49
- Get your API key from https://admin.teamflect.com → Settings → API
50
-
51
- ### 2. Configure MCP Client
52
-
53
- **Claude Desktop:** Edit `claude_desktop_config.json`
54
- - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
55
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
56
- - **Linux:** `~/.config/Claude/claude_desktop_config.json`
57
-
58
- **Cursor IDE:** Settings (Ctrl+,) → Search "MCP" → Edit settings.json
59
-
60
- **Recommended Configuration (using npm package):**
61
- ```json
62
- {
63
- "mcpServers": {
64
- "teamflect": {
65
- "command": "npx",
66
- "args": ["-y", "teamflect-mcp-server"],
67
- "env": {
68
- "TEAMFLECT_API_KEY": "your-api-key-here"
69
- }
70
- }
71
- }
72
- }
73
- ```
74
-
75
- **Alternative Configuration (source installation only):**
76
- ```json
77
- {
78
- "mcpServers": {
79
- "teamflect": {
80
- "command": "node",
81
- "args": ["/absolute/path/to/teamflect-mcp-server/dist/index.js"],
82
- "env": {
83
- "TEAMFLECT_API_KEY": "your-api-key-here"
84
- }
85
- }
86
- }
87
- }
88
- ```
89
-
90
- **Windows path format:** Use double backslashes `\\` in JSON: `"C:\\path\\to\\teamflect-mcp-server\\dist\\index.js"`
91
-
92
- ### 3. Restart Your MCP Client
93
-
94
- After configuration, completely close and restart Claude Desktop or Cursor IDE.
95
-
96
- ## Usage Examples
97
-
98
- - "Get all users from Teamflect"
99
- - "Get user john.doe@example.com"
100
- - "Get all goals"
101
- - "Create a new goal for Q1 2025"
102
- - "Get all feedbacks"
103
- - "Search for recognitions"
104
-
105
- ## Available Tools
106
-
107
- ### Goals
108
- - `teamflect_get_goals` - Get list of goals with filtering
109
- - `teamflect_get_goal` - Get a specific goal by ID
110
- - `teamflect_create_goal` - Create a new goal
111
- - `teamflect_update_goal_progress` - Update goal progress
112
- - `teamflect_comment_goal` - Add a comment to a goal
113
-
114
- ### Feedbacks
115
- - `teamflect_get_feedbacks` - Get list of feedbacks
116
- - `teamflect_send_feedback_request` - Send internal feedback request
117
- - `teamflect_send_external_feedback_request` - Send external feedback request
118
-
119
- ### Recognitions
120
- - `teamflect_get_recognition` - Get a specific recognition by ID
121
- - `teamflect_search_recognitions` - Search recognitions
122
- - `teamflect_create_recognition` - Create a new recognition
123
-
124
- ### Reviews
125
- - `teamflect_get_reviews` - Get list of reviews with filtering
126
-
127
- ### Tasks
128
- - `teamflect_get_tasks` - Get list of tasks
129
- - `teamflect_get_task` - Get a specific task by ID
130
-
131
- ### Users
132
- - `teamflect_get_users` - Get list of users with filtering and pagination
133
- - `teamflect_get_user` - Get a specific user by email
134
- - `teamflect_update_user` - Update user attributes
135
- - `teamflect_get_roles` - Get available user roles
136
-
137
- ## Troubleshooting
138
-
139
- **Server not starting:**
140
- - Check Node.js version: `node --version` (should be >= 18)
141
- - For source installation: Run `npm run build` and verify `dist/index.js` exists
142
-
143
- **Package not found:**
144
- - Verify package is published: `npm view teamflect-mcp-server`
145
- - Check npm registry: `npm config get registry` (should be https://registry.npmjs.org/)
146
- - Ensure you're connected to the internet
147
-
148
- **MCP client doesn't see server:**
149
- - Verify JSON syntax is valid (use https://jsonlint.com)
150
- - For source installation: Ensure `dist/index.js` exists (run `npm run build`)
151
- - Restart MCP client completely
152
-
153
- **Tools not working:**
154
- - Verify API key is correct and has necessary permissions
155
- - Test API directly: `curl https://api.teamflect.com/api/v1/user/getUsers -H "Authorization: Bearer YOUR_API_KEY"`
156
-
157
- ## Environment Variables
158
-
159
- - `TEAMFLECT_API_KEY` (required): Your Teamflect API key
160
- - `TRANSPORT` (optional): `stdio` (default) or `http`
161
- - `PORT` (optional): Port for HTTP transport (default: 3000)
162
-
163
- ## Development
164
-
165
- ```bash
166
- npm run build # Build the project
167
- npm run dev # Run in development mode with watch
168
- npm start # Run the server
169
- ```
170
-
171
- ## API Documentation
172
-
173
- https://api.teamflect.com/api/v1/
174
-
175
- ## License
176
-
177
- MIT
1
+ # Teamflect MCP Server
2
+
3
+ MCP (Model Context Protocol) server for Teamflect API integration. Provides tools to interact with Teamflect's performance management features including goals, feedback, recognitions, reviews, tasks, and user management.
4
+
5
+ ## Features
6
+
7
+ - **Goals**: Get, create, update progress, and comment on goals
8
+ - **Feedbacks**: Get feedbacks, send feedback requests (internal and external)
9
+ - **Recognitions**: Get, search, and create recognitions
10
+ - **Reviews**: Get reviews with filtering
11
+ - **Tasks**: Get tasks and individual task details
12
+ - **Users**: Get users, get user by email, update user attributes, and get available roles
13
+
14
+ ## Prerequisites
15
+
16
+ - Node.js >= 18
17
+ - Teamflect API key from https://admin.teamflect.com
18
+ - MCP client (Claude Desktop or Cursor IDE)
19
+
20
+ ## Installation
21
+
22
+ You can use it directly with `npx` (no installation needed) or install it globally.
23
+
24
+ ### Option 1: Use with npx (Recommended - No Installation)
25
+
26
+ No installation required. Just use `npx` in your MCP client configuration (see Configuration section below).
27
+
28
+ ### Option 2: Install Globally
29
+
30
+ ```bash
31
+ npm install -g teamflect-mcp-server
32
+ ```
33
+
34
+ ### Option 3: Install from Source
35
+
36
+ For development or customization:
37
+
38
+ ```bash
39
+ git clone <repository-url>
40
+ cd teamflect-mcp-server
41
+ npm install
42
+ npm run build
43
+ ```
44
+
45
+ ## Configuration
46
+
47
+ ### 1. Get Your API Key
48
+
49
+ Get your API key from https://admin.teamflect.com → Settings → API
50
+
51
+ ### 2. Configure MCP Client
52
+
53
+ **Claude Desktop:** Edit `claude_desktop_config.json`
54
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
55
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
56
+ - **Linux:** `~/.config/Claude/claude_desktop_config.json`
57
+
58
+ **Cursor IDE:** Settings (Ctrl+,) → Search "MCP" → Edit settings.json
59
+
60
+ **Recommended Configuration (using npm package):**
61
+ ```json
62
+ {
63
+ "mcpServers": {
64
+ "teamflect": {
65
+ "command": "npx",
66
+ "args": ["-y", "teamflect-mcp-server"],
67
+ "env": {
68
+ "TEAMFLECT_API_KEY": "your-api-key-here"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ **Alternative Configuration (source installation only):**
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "teamflect": {
80
+ "command": "node",
81
+ "args": ["/absolute/path/to/teamflect-mcp-server/dist/index.js"],
82
+ "env": {
83
+ "TEAMFLECT_API_KEY": "your-api-key-here"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ **Windows path format:** Use double backslashes `\\` in JSON: `"C:\\path\\to\\teamflect-mcp-server\\dist\\index.js"`
91
+
92
+ ### 3. Restart Your MCP Client
93
+
94
+ After configuration, completely close and restart Claude Desktop or Cursor IDE.
95
+
96
+ ## Updating
97
+
98
+ **If using `npx` (recommended):** Cursor automatically uses the latest published version each time it starts. No action needed - just restart Cursor after a new version is published.
99
+
100
+ **If installed globally:** Update manually:
101
+ ```bash
102
+ npm install -g teamflect-mcp-server@latest
103
+ ```
104
+ Then restart Cursor IDE or Claude Desktop.
105
+
106
+ **If installed from source:** Pull updates and rebuild:
107
+ ```bash
108
+ cd /path/to/teamflect-mcp-server
109
+ git pull
110
+ npm install
111
+ npm run build
112
+ ```
113
+ Then restart your MCP client.
114
+
115
+ ## Usage Examples
116
+
117
+ - "Get all users from Teamflect"
118
+ - "Get user john.doe@example.com"
119
+ - "Get all goals"
120
+ - "Create a new goal for Q1 2025"
121
+ - "Get all feedbacks"
122
+ - "Search for recognitions"
123
+
124
+ ## Available Tools
125
+
126
+ ### Goals
127
+ - `teamflect_get_goals` - Get list of goals with filtering
128
+ - `teamflect_get_goal` - Get a specific goal by ID
129
+ - `teamflect_create_goal` - Create a new goal
130
+ - `teamflect_update_goal_progress` - Update goal progress
131
+ - `teamflect_comment_goal` - Add a comment to a goal
132
+
133
+ ### Feedbacks
134
+ - `teamflect_get_feedbacks` - Get list of feedbacks
135
+ - `teamflect_send_feedback_request` - Send internal feedback request
136
+ - `teamflect_send_external_feedback_request` - Send external feedback request
137
+
138
+ ### Recognitions
139
+ - `teamflect_get_recognition` - Get a specific recognition by ID
140
+ - `teamflect_search_recognitions` - Search recognitions
141
+ - `teamflect_create_recognition` - Create a new recognition
142
+
143
+ ### Reviews
144
+ - `teamflect_get_reviews` - Get list of reviews with filtering
145
+
146
+ ### Tasks
147
+ - `teamflect_get_tasks` - Get list of tasks
148
+ - `teamflect_get_task` - Get a specific task by ID
149
+
150
+ ### Users
151
+ - `teamflect_get_users` - Get list of users with filtering and pagination
152
+ - `teamflect_get_user` - Get a specific user by email
153
+ - `teamflect_update_user` - Update user attributes
154
+ - `teamflect_get_roles` - Get available user roles
155
+
156
+ ## Troubleshooting
157
+
158
+ **Server not starting:**
159
+ - Check Node.js version: `node --version` (should be >= 18)
160
+ - For source installation: Run `npm run build` and verify `dist/index.js` exists
161
+
162
+ **Package not found:**
163
+ - Verify package is published: `npm view teamflect-mcp-server`
164
+ - Check npm registry: `npm config get registry` (should be https://registry.npmjs.org/)
165
+ - Ensure you're connected to the internet
166
+
167
+ **MCP client doesn't see server:**
168
+ - Verify JSON syntax is valid (use https://jsonlint.com)
169
+ - For source installation: Ensure `dist/index.js` exists (run `npm run build`)
170
+ - Restart MCP client completely
171
+
172
+ **Tools not working:**
173
+ - Verify API key is correct and has necessary permissions
174
+ - Test API directly: `curl https://api.teamflect.com/api/v1/user/getUsers -H "Authorization: Bearer YOUR_API_KEY"`
175
+
176
+ ## Environment Variables
177
+
178
+ - `TEAMFLECT_API_KEY` (required): Your Teamflect API key
179
+ - `TRANSPORT` (optional): `stdio` (default) or `http`
180
+ - `PORT` (optional): Port for HTTP transport (default: 3000)
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ npm run build # Build the project
186
+ npm run dev # Run in development mode with watch
187
+ npm start # Run the server
188
+ ```
189
+
190
+ ## API Documentation
191
+
192
+ https://api.teamflect.com/api/v1/
193
+
194
+ ## License
195
+
196
+ MIT
@@ -22,54 +22,54 @@ export function registerFeedbackTools(server, apiClient) {
22
22
  }).strict();
23
23
  server.registerTool("teamflect_get_feedbacks", {
24
24
  title: "Get Feedbacks",
25
- description: `Retrieve a list of feedbacks from Teamflect based on filters.
26
-
27
- This tool searches for feedbacks matching the specified criteria. You can filter by status, the person the feedback is about, who submitted it, and date ranges. Results are paginated.
28
-
29
- Args:
30
- - status (string, optional): Filter by feedback status
31
- - aboutEmail (string, optional): Filter by the person the feedback is about (email address)
32
- - submittedByEmail (string, optional): Filter by the person who submitted the feedback (email address)
33
- - startDate (string, optional): Filter by submission start date in ISO format (YYYY-MM-DD)
34
- - endDate (string, optional): Filter by submission end date in ISO format (YYYY-MM-DD)
35
- - limit (number, optional): Maximum results to return, between 1-300 (default: 20)
36
- - offset (number, optional): Number of results to skip for pagination (default: 0)
37
- - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
38
-
39
- Returns:
40
- For JSON format: Structured data with schema:
41
- {
42
- "total": number,
43
- "count": number,
44
- "offset": number,
45
- "feedbacks": [
46
- {
47
- "feedbackId": string,
48
- "about": {"displayName": string, "mail": string},
49
- "status": string,
50
- "submittedBy": {"displayName": string},
51
- "createdAt": string,
52
- "submittedAt": string,
53
- "questions": [
54
- {
55
- "question": string,
56
- "answer": string,
57
- "additionalAnswer": string,
58
- "questionType": string
59
- }
60
- ]
61
- }
62
- ],
63
- "has_more": boolean,
64
- "next_offset": number
65
- }
66
-
67
- Examples:
68
- - Use when: "Get all feedbacks about john@example.com" -> params with aboutEmail="john@example.com"
69
- - Use when: "List feedbacks submitted this month" -> params with startDate/endDate filters
70
-
71
- Error Handling:
72
- - Returns "Error: Authentication failed" if API key is invalid
25
+ description: `Retrieve a list of feedbacks from Teamflect based on filters.
26
+
27
+ This tool searches for feedbacks matching the specified criteria. You can filter by status, the person the feedback is about, who submitted it, and date ranges. Results are paginated.
28
+
29
+ Args:
30
+ - status (string, optional): Filter by feedback status
31
+ - aboutEmail (string, optional): Filter by the person the feedback is about (email address)
32
+ - submittedByEmail (string, optional): Filter by the person who submitted the feedback (email address)
33
+ - startDate (string, optional): Filter by submission start date in ISO format (YYYY-MM-DD)
34
+ - endDate (string, optional): Filter by submission end date in ISO format (YYYY-MM-DD)
35
+ - limit (number, optional): Maximum results to return, between 1-300 (default: 20)
36
+ - offset (number, optional): Number of results to skip for pagination (default: 0)
37
+ - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
38
+
39
+ Returns:
40
+ For JSON format: Structured data with schema:
41
+ {
42
+ "total": number,
43
+ "count": number,
44
+ "offset": number,
45
+ "feedbacks": [
46
+ {
47
+ "feedbackId": string,
48
+ "about": {"displayName": string, "mail": string},
49
+ "status": string,
50
+ "submittedBy": {"displayName": string},
51
+ "createdAt": string,
52
+ "submittedAt": string,
53
+ "questions": [
54
+ {
55
+ "question": string,
56
+ "answer": string,
57
+ "additionalAnswer": string,
58
+ "questionType": string
59
+ }
60
+ ]
61
+ }
62
+ ],
63
+ "has_more": boolean,
64
+ "next_offset": number
65
+ }
66
+
67
+ Examples:
68
+ - Use when: "Get all feedbacks about john@example.com" -> params with aboutEmail="john@example.com"
69
+ - Use when: "List feedbacks submitted this month" -> params with startDate/endDate filters
70
+
71
+ Error Handling:
72
+ - Returns "Error: Authentication failed" if API key is invalid
73
73
  - Returns "Error: Rate limit exceeded" if too many requests`,
74
74
  inputSchema: GetFeedbacksInputSchema,
75
75
  annotations: {
@@ -227,23 +227,23 @@ Error Handling:
227
227
  }).strict();
228
228
  server.registerTool("teamflect_send_feedback_request", {
229
229
  title: "Send Feedback Request",
230
- description: `Send a new feedback request in Teamflect.
231
-
232
- This tool creates and sends a feedback request to collect feedback about a person. The request includes questions that need to be answered.
233
-
234
- Args:
235
- - aboutEmail (string, required): Email address of the person the feedback is about
236
- - questions (array, required): Array of question objects, each with:
237
- - question (string): Question text (1-1000 characters)
238
- - questionType (string): Question type identifier
239
- - dueDate (string, optional): Due date for feedback submission in ISO format (YYYY-MM-DD)
240
- - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
241
-
242
- Returns:
243
- The created feedback request with its ID and status.
244
-
245
- Error Handling:
246
- - Returns "Error: Bad request" if required fields are missing or invalid
230
+ description: `Send a new feedback request in Teamflect.
231
+
232
+ This tool creates and sends a feedback request to collect feedback about a person. The request includes questions that need to be answered.
233
+
234
+ Args:
235
+ - aboutEmail (string, required): Email address of the person the feedback is about
236
+ - questions (array, required): Array of question objects, each with:
237
+ - question (string): Question text (1-1000 characters)
238
+ - questionType (string): Question type identifier
239
+ - dueDate (string, optional): Due date for feedback submission in ISO format (YYYY-MM-DD)
240
+ - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
241
+
242
+ Returns:
243
+ The created feedback request with its ID and status.
244
+
245
+ Error Handling:
246
+ - Returns "Error: Bad request" if required fields are missing or invalid
247
247
  - Returns "Error: Permission denied" if you don't have permission to send feedback requests`,
248
248
  inputSchema: SendFeedbackRequestInputSchema,
249
249
  annotations: {
@@ -297,24 +297,24 @@ Error Handling:
297
297
  }).strict();
298
298
  server.registerTool("teamflect_send_external_feedback_request", {
299
299
  title: "Send External Feedback Request",
300
- description: `Send a new external feedback request in Teamflect.
301
-
302
- This tool creates and sends a feedback request to an external person (someone outside your organization) to collect feedback about a person.
303
-
304
- Args:
305
- - aboutEmail (string, required): Email address of the person the feedback is about
306
- - externalEmail (string, required): Email address of the external person to request feedback from
307
- - questions (array, required): Array of question objects, each with:
308
- - question (string): Question text (1-1000 characters)
309
- - questionType (string): Question type identifier
310
- - dueDate (string, optional): Due date for feedback submission in ISO format (YYYY-MM-DD)
311
- - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
312
-
313
- Returns:
314
- The created external feedback request with its ID and status.
315
-
316
- Error Handling:
317
- - Returns "Error: Bad request" if required fields are missing or invalid
300
+ description: `Send a new external feedback request in Teamflect.
301
+
302
+ This tool creates and sends a feedback request to an external person (someone outside your organization) to collect feedback about a person.
303
+
304
+ Args:
305
+ - aboutEmail (string, required): Email address of the person the feedback is about
306
+ - externalEmail (string, required): Email address of the external person to request feedback from
307
+ - questions (array, required): Array of question objects, each with:
308
+ - question (string): Question text (1-1000 characters)
309
+ - questionType (string): Question type identifier
310
+ - dueDate (string, optional): Due date for feedback submission in ISO format (YYYY-MM-DD)
311
+ - response_format ('markdown' | 'json', optional): Output format (default: 'markdown')
312
+
313
+ Returns:
314
+ The created external feedback request with its ID and status.
315
+
316
+ Error Handling:
317
+ - Returns "Error: Bad request" if required fields are missing or invalid
318
318
  - Returns "Error: Permission denied" if you don't have permission to send external feedback requests`,
319
319
  inputSchema: SendExternalFeedbackRequestInputSchema,
320
320
  annotations: {
@@ -1 +1 @@
1
- {"version":3,"file":"goals.d.ts","sourceRoot":"","sources":["../../src/tools/goals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CA4exF"}
1
+ {"version":3,"file":"goals.d.ts","sourceRoot":"","sources":["../../src/tools/goals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAgfxF"}