You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note**: Screenshots for setup will be provided in a future update.
181
181
182
182
### Windows Users
183
183
@@ -305,191 +305,4 @@ To test the connection to Azure DevOps:
305
305
306
306
```bash
307
307
npm run test-connection
308
-
```
309
-
310
-
## Publishing
311
-
312
-
To publish to npm:
313
-
314
-
```bash
315
-
npm run build
316
-
npm publish
317
-
```
318
-
319
-
## Continuous Integration and Deployment
320
-
321
-
This project uses GitHub Actions for automated builds, testing, and publishing.
322
-
323
-
### Status Badges
324
-
325
-
The status badges at the top of the README provide real-time information about the project:
326
-
327
-
-**CI**: Shows the status of the continuous integration workflow (build and tests)
328
-
-**Publish**: Indicates the status of the npm publishing workflow
329
-
-**Version Bump**: Indicates the status of the version bump workflow
330
-
-**npm version**: Shows the latest published version on npm
331
-
-**License**: Indicates the project license type
332
-
333
-
### CI Workflow
334
-
335
-
The CI workflow runs on every push to the main and develop branches, as well as on pull requests:
336
-
337
-
- Builds the project with Node.js 16.x, 18.x, and 20.x
338
-
- Runs linting and formatting checks
339
-
- Performs security checks to prevent sensitive data exposure
340
-
- Ensures the build completes successfully
341
-
342
-
You can see the workflow details in `.github/workflows/ci.yml`.
343
-
344
-
### CD Workflow (Publishing)
345
-
346
-
The publishing workflow runs when:
347
-
- Any change is pushed to the main branch (except documentation & config files)
348
-
- A new GitHub release is created
349
-
- Manually triggered via GitHub Actions interface
350
-
351
-
It performs the following steps:
352
-
1. Runs all checks and builds the package
353
-
2. Extracts the package version from package.json
354
-
3. Checks if that version already exists on npm
355
-
4. If the version exists, automatically bumps the patch version
356
-
5. Creates a GitHub release for the new version
357
-
6. Publishes the package to npm
358
-
359
-
To use this workflow, you need to:
360
-
1. Add an `NPM_TOKEN` secret to your GitHub repository settings
361
-
2. Either:
362
-
- Push code changes to the main branch (auto-versioning will handle the rest)
363
-
- Manually trigger the workflow from the Actions tab
364
-
- Create a GitHub release
365
-
366
-
The workflow supports automatic version bumping when a version conflict is detected, making continuous delivery seamless without manual version management.
367
-
368
-
You can see the workflow details in `.github/workflows/publish.yml`.
369
-
370
-
## Troubleshooting
371
-
372
-
### Summary of Common Issues and Solutions
373
-
374
-
1.**Best Practices for Connection**:
375
-
- Use Command mode when possible (more reliable)
376
-
- If using SSE mode, set the port directly in the command line with `PORT=9836 npm run sse-server`
377
-
- Always verify the server is running before trying to connect from Cursor
378
-
379
-
2.**Port Configuration**:
380
-
- The most reliable way to change the port is using the environment variable directly: `PORT=9836 npm run sse-server`
381
-
- Make sure to use the same port in Cursor when adding the MCP server: `http://localhost:9836/sse`
382
-
383
-
3.**Session Management Issues**:
384
-
- If you see "Session not found" errors in the console, try restarting both the server and Cursor
385
-
- Clear Cursor's application data (Help > Clear Application Data) if problems persist
386
-
387
-
4.**Connection Errors**:
388
-
- For "Failed to create client" errors, make sure the server is running and accessible
389
-
- Check that no firewalls or security software are blocking the connection
390
-
- Try using a different port if the default port (3000) is in use
391
-
392
-
### MCP Server Not Connecting
393
-
394
-
- Make sure your Azure DevOps credentials in the `.env` file are correct
395
-
- Check that your personal access token has the necessary permissions:
396
-
- Code (read)
397
-
- Pull Request Threads (read)
398
-
- Work Items (read)
399
-
- If using SSE mode, ensure the server is running before adding the MCP server in Cursor
400
-
401
-
### Command Not Found
402
-
403
-
- If running with npx, make sure you have Node.js installed
404
-
- If using the global installation, try reinstalling: `npm install -g cursor-azure-devops-mcp`
405
-
406
-
### SSE Connection Issues
407
-
408
-
If you encounter JSON validation errors when connecting via SSE mode:
409
-
410
-
1.**Use Command Mode Instead**: The command mode is more reliable and recommended for most users.
411
-
412
-
2.**Check Cursor Version**: Ensure you're using Cursor version 0.46.9 or newer, as older versions had known issues with SSE connections.
413
-
414
-
3.**Run with Debug Logs**: Start the SSE server with debug logs:
415
-
```bash
416
-
DEBUG=* npm run sse-server
417
-
```
418
-
419
-
4.**Port Conflicts**: Make sure no other service is using port 3000. You can change the port by setting the `PORT` environment variable:
420
-
```bash
421
-
PORT=3001 npm run sse-server
422
-
```
423
-
Then use `http://localhost:3001/sse` as the SSE endpoint URL.
424
-
425
-
5.**Network Issues**: Make sure your firewall isn't blocking the connection.
426
-
427
-
6.**Verify Server is Running**: Make sure you can access the server's home page at `http://localhost:3000`
428
-
429
-
### "Cannot set headers after they are sent to the client" Error
430
-
431
-
If you encounter this error when running the SSE server:
432
-
433
-
1.**Check for duplicate header settings**: This error occurs when the application tries to set HTTP headers after they've already been sent. In the SSE implementation, make sure you're not manually setting headers that the `SSEServerTransport` already sets.
434
-
435
-
2.**Avoid manual header manipulation**: The `SSEServerTransport` class from the MCP SDK handles the necessary headers for SSE connections. Don't set these headers manually:
436
-
```javascript
437
-
// Don't set these manually in your route handlers
0 commit comments