Commit e9491a6
authored
refactor(kiloclaw): replace Linear CLI with Linear MCP server (#1635)
## Summary
A refactor targeting #1407:
After exploring other options for the Linear integration, the official
Linear MCP server turned out to be a better fit than the CLI. All
OpenClaw instances are already deployed with the `mcporter` package and
skill, which give KiloClaw MCP abilities anyways. Importantly, unlike
the CLI, mcporter also allows us to avoid ever writing our actual API
key to a file, which significantly reduces the overhead for managing
this integration. This PR targets feature/kiloclaw-linear-cli with the
scoped changes to switch-over to this MCP integration only, to simplify
the reviewer's experience.
## Changes
- Undo the changes to both `Dockerfile`s — the target branch will have
no diff after this PR merges.
- Strip all on-disk credential cleanup logic from `configureLinear()` —
no new files to manage anymore, so the function no longer needs
`BootstrapDeps`
- Add Linear MCP server entry to `writeMcporterConfig()` when
`LINEAR_API_KEY` is set; remove it when unset. Preserves existing
user-configured servers. The key is stored in the file as
`${LINEAR_API_KEY}` verbatim and read from the environment by mcporter.
- Replace CLI usage documentation in the TOOLS.md agent section with a
pointer to the Linear MCP server and mcporter skill
- Simplify `configureLinear` tests (no more fs/exec mocking) and add
`writeMcporterConfig` tests covering add, remove, preserve, and
multi-server scenarios
## Verification
- [x] `pnpm format:check` passes
- [x] `pnpm lint` passes
- [x] Tests pass (`vitest` in kiloclaw workspace)
- [x] E2E tested on a fresh instance
## New Loom — Kilo Team only
https://www.loom.com/share/5ca9897104e84a3baf560818b7a3bcf7
## Action for reviewer
Please let me know your preference for merge, whether it's into the
feature/kiloclaw-cli branch, or into main directly.File tree
6 files changed
+145
-234
lines changed- kiloclaw
- controller/src
6 files changed
+145
-234
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
502 | | - | |
| 501 | + | |
503 | 502 | | |
504 | 503 | | |
505 | | - | |
| 504 | + | |
506 | 505 | | |
507 | 506 | | |
508 | 507 | | |
509 | | - | |
| 508 | + | |
510 | 509 | | |
511 | | - | |
512 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 517 | + | |
631 | 518 | | |
632 | | - | |
633 | 519 | | |
634 | 520 | | |
635 | | - | |
| 521 | + | |
636 | 522 | | |
637 | | - | |
638 | | - | |
639 | 523 | | |
640 | 524 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
| 525 | + | |
663 | 526 | | |
664 | 527 | | |
| 528 | + | |
665 | 529 | | |
666 | 530 | | |
667 | 531 | | |
| |||
878 | 742 | | |
879 | 743 | | |
880 | 744 | | |
881 | | - | |
| 745 | + | |
882 | 746 | | |
883 | 747 | | |
884 | 748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
342 | 334 | | |
343 | | - | |
| 335 | + | |
344 | 336 | | |
345 | | - | |
| 337 | + | |
346 | 338 | | |
347 | | - | |
348 | 339 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 340 | + | |
368 | 341 | | |
369 | 342 | | |
370 | 343 | | |
| |||
590 | 563 | | |
591 | 564 | | |
592 | 565 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 566 | + | |
622 | 567 | | |
623 | | - | |
624 | | - | |
625 | | - | |
| 568 | + | |
| 569 | + | |
626 | 570 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | 571 | | |
631 | 572 | | |
632 | 573 | | |
633 | 574 | | |
634 | 575 | | |
635 | 576 | | |
636 | | - | |
| 577 | + | |
637 | 578 | | |
638 | 579 | | |
639 | 580 | | |
| |||
718 | 659 | | |
719 | 660 | | |
720 | 661 | | |
721 | | - | |
| 662 | + | |
722 | 663 | | |
723 | 664 | | |
724 | 665 | | |
| |||
0 commit comments