dev-playbooks 2.3.0 → 2.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-playbooks",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "AI-powered spec-driven development workflow",
5
5
  "keywords": [
6
6
  "devbooks",
@@ -1,1246 +0,0 @@
1
- # Recommended MCP Servers
2
-
3
- > Detailed configuration and usage guide for MCP servers recommended by this repo.
4
- >
5
- > Date: 2026-01-18
6
- > Scope: User scope (available to all projects)
7
-
8
- ---
9
-
10
- ## Table of contents
11
-
12
- 1. [Overview](#overview)
13
- 2. [CKB (Code Knowledge Backend)](#ckb-code-knowledge-backend)
14
- 3. [Context7](#context7)
15
- 4. [GitHub MCP Server](#github-mcp-server)
16
- 5. [Playwright MCP](#playwright-mcp)
17
- 6. [Configuration locations](#configuration-locations)
18
- 7. [Common use cases](#common-use-cases)
19
- 8. [Troubleshooting](#troubleshooting)
20
- 9. [Maintenance and updates](#maintenance-and-updates)
21
- 10. [References](#references)
22
-
23
- ---
24
-
25
- ## Overview
26
-
27
- ### Currently configured MCP servers
28
-
29
- | Server | Type | Scope | Primary capability |
30
- |---|---|---|---|
31
- | **ckb** | Code analysis | User scope | Symbol search, reference finding, impact analysis |
32
- | **context7** | Docs | User scope | Fetch up-to-date library docs and examples |
33
- | **github** | GitHub integration | User scope | Repos, issues, PRs, actions automation |
34
- | **playwright** | Browser automation | User scope | Web automation, scraping, and interaction |
35
-
36
- **Config file**: `~/.claude.json` (top-level `mcpServers` field)
37
-
38
- **Scope**: all projects
39
-
40
- ---
41
-
42
- ## CKB (Code Knowledge Backend)
43
-
44
- ### Basics
45
-
46
- - **Version**: 7.5.0
47
- - **Type**: language-agnostic code understanding layer
48
- - **Install path**: `/usr/local/bin/ckb`
49
- - **GitHub**: https://github.com/simplyliz/codemcp
50
-
51
- ### Capabilities
52
-
53
- - Symbol search: quickly find functions, classes, variables
54
- - Find references: locate all usages of a symbol
55
- - Impact analysis: assess the scope of code changes
56
- - Architecture view: project structure and dependencies
57
- - Git integration: blame info and history tracking
58
-
59
- ### Backend support
60
-
61
- - **LSP** (Language Server Protocol): Python, TypeScript, Go, etc.
62
- - **SCIP**: pre-computed indexes (for Go/Java/TypeScript)
63
- - **Git**: repository history and blame info
64
-
65
- ### Configuration
66
-
67
- ```json
68
- {
69
- "mcpServers": {
70
- "ckb": {
71
- "command": "/usr/local/bin/ckb",
72
- "args": ["mcp"]
73
- }
74
- }
75
- }
76
- ```
77
-
78
- ### Installation
79
-
80
- #### 1. Install the CKB binary
81
-
82
- ```bash
83
- # clone repo
84
- cd ~/Projects/mcps
85
- git clone https://github.com/simplyliz/codemcp.git
86
- cd codemcp
87
-
88
- # set Go proxy (for users in China)
89
- export GOPROXY=https://goproxy.cn,direct
90
- export GOSUMDB=sum.golang.google.cn
91
-
92
- # build
93
- go build -o ckb ./cmd/ckb
94
-
95
- # install to system path
96
- sudo cp ckb /usr/local/bin/ckb
97
- sudo chmod +x /usr/local/bin/ckb
98
-
99
- # verify
100
- ckb --version
101
- ```
102
-
103
- #### 2. Install Python LSP support
104
-
105
- ```bash
106
- pip3 install python-lsp-server
107
-
108
- # verify
109
- python3 -m pylsp --version
110
- ```
111
-
112
- #### 3. Initialize CKB for a project
113
-
114
- ```bash
115
- cd /path/to/your/project
116
- ckb init
117
- ```
118
-
119
- This creates `.ckb/config.json`.
120
-
121
- ### Project configuration file
122
-
123
- Location: `project/.ckb/config.json`
124
-
125
- ```json
126
- {
127
- "backends": {
128
- "lsp": {
129
- "enabled": true,
130
- "servers": {
131
- "python": {
132
- "command": "python3",
133
- "args": ["-m", "pylsp"]
134
- }
135
- }
136
- },
137
- "git": {
138
- "enabled": true
139
- }
140
- }
141
- }
142
- ```
143
-
144
- ### Usage examples
145
-
146
- Search for symbols:
147
- ```
148
- Use CKB to search for FastAPI symbols in the project
149
- ```
150
-
151
- Find references:
152
- ```
153
- Use CKB to find all references to the get_user function
154
- ```
155
-
156
- Impact analysis:
157
- ```
158
- Use CKB to analyze the impact of modifying the User class
159
- ```
160
-
161
- ### Common commands
162
-
163
- ```bash
164
- # check system status
165
- ckb status
166
-
167
- # search symbols
168
- ckb search <symbol-name>
169
-
170
- # find references
171
- ckb refs <symbol-name>
172
-
173
- # get architecture overview
174
- ckb arch
175
-
176
- # run diagnostics
177
- ckb doctor
178
- ```
179
-
180
- ### Supported languages
181
-
182
- - Python (via LSP)
183
- - TypeScript/JavaScript (via LSP)
184
- - Go (via SCIP + LSP)
185
- - Java (via SCIP)
186
- - Any project with Git history
187
-
188
- ### Notes
189
-
190
- Each project needs separate initialization: although the CKB MCP server is user-scoped (available globally), each project requires `ckb init` to create project-specific configuration.
191
-
192
- ---
193
-
194
- ## Context7
195
-
196
- ### Basics
197
-
198
- - **npm package**: `@upstash/context7-mcp`
199
- - **Version**: 2.0.0+
200
- - **Type**: real-time library documentation service
201
- - **Install**: `npx` (auto-download)
202
- - **Website**: https://context7.com
203
- - **GitHub**: https://github.com/upstash/context7
204
-
205
- ### Capabilities
206
-
207
- - Real-time docs: latest, version-specific library docs
208
- - Code examples: up-to-date examples and API usage
209
- - Library matching: detect and match libraries used in the project
210
- - Seamless workflow: no context switching to browser tabs
211
- - Reduces hallucinations: avoids outdated or non-existent APIs
212
- - Broad support: popular libraries and frameworks
213
-
214
- ### Configuration
215
-
216
- ```json
217
- {
218
- "mcpServers": {
219
- "context7": {
220
- "command": "npx",
221
- "args": ["-y", "@upstash/context7-mcp"]
222
- }
223
- }
224
- }
225
- ```
226
-
227
- Configuration with API key (optional; for higher rate limits and private repos):
228
-
229
- ```json
230
- {
231
- "mcpServers": {
232
- "context7": {
233
- "command": "npx",
234
- "args": ["-y", "@upstash/context7-mcp"],
235
- "env": {
236
- "CONTEXT7_API_KEY": "your-api-key"
237
- }
238
- }
239
- }
240
- }
241
- ```
242
-
243
- ### Environment variables
244
-
245
- | Variable | Required | Description |
246
- |---|:---:|---|
247
- | `CONTEXT7_API_KEY` | no | Optional API key for higher rate limits and private repo access |
248
-
249
- Get an API key: https://context7.com/dashboard
250
-
251
- ### Available tools
252
-
253
- Context7 provides tools for LLMs:
254
-
255
- 1. `resolve-library-id`: resolve a library name into a Context7 library ID
256
- 2. `query-docs`: fetch docs for a library ID
257
-
258
- ### Usage examples
259
-
260
- Recommended rule (add to `CLAUDE.md` or tool settings):
261
-
262
- ```markdown
263
- Always use context7 when I need code generation, setup or configuration steps, or
264
- library/API documentation. This means you should automatically use the Context7 MCP
265
- tools to resolve library id and get library docs without me having to explicitly ask.
266
- ```
267
-
268
- After adding the rule, ask normally:
269
-
270
- ```
271
- Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to /login.
272
- ```
273
-
274
- Manual trigger (if you do not have an auto rule):
275
-
276
- ```
277
- Configure a Cloudflare Worker script to cache JSON API responses for 5 minutes. use context7
278
- ```
279
-
280
- Known library ID (advanced):
281
-
282
- ```
283
- Implement basic auth using Supabase.
284
- use library /supabase/supabase for API and docs.
285
- ```
286
-
287
- ### Supported libraries and frameworks
288
-
289
- Context7 supports thousands of libraries, including (not limited to):
290
-
291
- Web frameworks:
292
- - Next.js, React, Vue, Angular, Svelte
293
- - Express, Fastify, Koa, NestJS
294
-
295
- Cloud services:
296
- - AWS SDK, Google Cloud, Azure
297
- - Cloudflare Workers, Vercel, Netlify
298
-
299
- Databases:
300
- - MongoDB, PostgreSQL, MySQL
301
- - Supabase, Firebase, PlanetScale
302
-
303
- Utilities:
304
- - Lodash, Axios, Prisma
305
- - TailwindCSS, shadcn/ui
306
-
307
- Search for more: https://context7.com
308
-
309
- ### Proxy configuration
310
-
311
- Context7 supports standard HTTPS proxy environment variables:
312
-
313
- ```bash
314
- export https_proxy=http://proxy.example.com:8080
315
- export HTTPS_PROXY=http://proxy.example.com:8080
316
- ```
317
-
318
- ### Troubleshooting
319
-
320
- Context7 connection failures:
321
- - network issues
322
- - proxy misconfiguration
323
- - rate limiting (no API key)
324
-
325
- ```bash
326
- # test connectivity
327
- curl -I https://api.context7.com
328
-
329
- # check proxy settings
330
- echo "$https_proxy"
331
- ```
332
-
333
- Invalid API key:
334
- 1. Confirm the key is correct and not expired
335
- 2. Regenerate the key
336
- 3. Update your config
337
-
338
- Library resolution failures:
339
- 1. Use a more specific library name
340
- 2. Check spelling
341
- 3. Search on https://context7.com
342
-
343
- Library not found:
344
- 1. Check spelling
345
- 2. Search on https://context7.com
346
- 3. Submit a request to add the library if needed
347
-
348
- Slow first run:
349
- - `npx` needs to download the package (expected)
350
- - wait for completion; subsequent runs are fast
351
-
352
- ---
353
-
354
- ## GitHub MCP Server
355
-
356
- ### Basics
357
-
358
- - **Docker image**: `ghcr.io/github/github-mcp-server`
359
- - **Version**: 0.26.3+
360
- - **Type**: GitHub platform integration
361
- - **Install**: Docker (recommended) or build from source
362
- - **Repo**: https://github.com/github/github-mcp-server
363
- - **Maintained by**: GitHub
364
-
365
- ### Capabilities
366
-
367
- - Repo management: browse/search code, commits, project structure
368
- - Issue & PR automation: create/update/manage
369
- - CI/CD: monitor GitHub Actions, analyze failures, manage releases
370
- - Code security: security findings, Dependabot alerts, pattern analysis
371
- - Collaboration: discussions, notifications, activity analysis
372
- - Toolsets: gists, labels, projects, stargazers, and more
373
-
374
- ### Configuration
375
-
376
- Basic Docker config:
377
-
378
- ```json
379
- {
380
- "mcpServers": {
381
- "github": {
382
- "command": "docker",
383
- "args": [
384
- "run",
385
- "-i",
386
- "--rm",
387
- "-e",
388
- "GITHUB_PERSONAL_ACCESS_TOKEN",
389
- "ghcr.io/github/github-mcp-server"
390
- ],
391
- "env": {
392
- "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT_HERE"
393
- }
394
- }
395
- }
396
- }
397
- ```
398
-
399
- With toolsets enabled:
400
-
401
- ```json
402
- {
403
- "mcpServers": {
404
- "github": {
405
- "command": "docker",
406
- "args": [
407
- "run",
408
- "-i",
409
- "--rm",
410
- "-e",
411
- "GITHUB_PERSONAL_ACCESS_TOKEN",
412
- "-e",
413
- "GITHUB_TOOLSETS",
414
- "ghcr.io/github/github-mcp-server"
415
- ],
416
- "env": {
417
- "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT_HERE",
418
- "GITHUB_TOOLSETS": "repos,issues,pull_requests,actions"
419
- }
420
- }
421
- }
422
- }
423
- ```
424
-
425
- GitHub Enterprise (GHES / ghe.com) config:
426
-
427
- ```json
428
- {
429
- "mcpServers": {
430
- "github": {
431
- "command": "docker",
432
- "args": [
433
- "run",
434
- "-i",
435
- "--rm",
436
- "-e",
437
- "GITHUB_PERSONAL_ACCESS_TOKEN",
438
- "-e",
439
- "GITHUB_HOST",
440
- "ghcr.io/github/github-mcp-server"
441
- ],
442
- "env": {
443
- "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT_HERE",
444
- "GITHUB_HOST": "https://your-ghes-domain.com"
445
- }
446
- }
447
- }
448
- }
449
- ```
450
-
451
- ### Getting a GitHub Personal Access Token (PAT)
452
-
453
- 1. Visit https://github.com/settings/tokens
454
- 2. Generate a new token (classic)
455
- 3. Add a description (e.g. "Claude Code MCP")
456
- 4. Choose expiration (recommended: 90 days)
457
- 5. Select scopes
458
-
459
- Recommended scopes:
460
-
461
- Read-only:
462
- - `repo`
463
- - `read:org`
464
- - `read:user`
465
-
466
- Full functionality (read/write):
467
- - `repo`
468
- - `workflow`
469
- - `admin:org` (if needed)
470
- - `gist`
471
- - `notifications`
472
- - `user`
473
- - `read:discussion`
474
- - `write:discussion`
475
-
476
- Important: copy and store the token securely; you cannot view it again after leaving the page.
477
-
478
- Example `~/.claude.json` snippet:
479
-
480
- ```json
481
- {
482
- "mcpServers": {
483
- "github": {
484
- "env": {
485
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
486
- }
487
- }
488
- }
489
- }
490
- ```
491
-
492
- ### Environment variables
493
-
494
- | Variable | Required | Description |
495
- |---|:---:|---|
496
- | `GITHUB_PERSONAL_ACCESS_TOKEN` | yes | GitHub PAT |
497
- | `GITHUB_TOOLSETS` | no | Enabled toolsets (comma-separated) |
498
- | `GITHUB_TOOLS` | no | Enabled specific tools (comma-separated) |
499
- | `GITHUB_HOST` | no | GitHub Enterprise host URL |
500
- | `GITHUB_READ_ONLY` | no | Read-only mode (`1` to enable) |
501
- | `GITHUB_LOCKDOWN_MODE` | no | Lockdown mode (`1` to enable) |
502
- | `GITHUB_DYNAMIC_TOOLSETS` | no | Dynamic toolset discovery (`1` to enable) |
503
-
504
- ### Toolsets
505
-
506
- Default toolsets (when unset):
507
- - `context`: current user + GitHub context (recommended)
508
- - `repos`: repository management
509
- - `issues`: issue management
510
- - `pull_requests`: PR management
511
- - `users`: user info
512
-
513
- All toolsets:
514
- | Toolset | Description |
515
- |---|---|
516
- | `context` | current user + context |
517
- | `actions` | GitHub Actions / CI-CD |
518
- | `code_security` | code security scanning |
519
- | `dependabot` | Dependabot |
520
- | `discussions` | Discussions |
521
- | `gists` | Gists |
522
- | `git` | low-level Git API |
523
- | `issues` | Issues |
524
- | `labels` | Labels |
525
- | `notifications` | Notifications |
526
- | `orgs` | Orgs |
527
- | `projects` | Projects |
528
- | `pull_requests` | Pull requests |
529
- | `repos` | Repositories |
530
- | `secret_protection` | secret scanning |
531
- | `security_advisories` | security advisories |
532
- | `stargazers` | stargazers |
533
- | `users` | users |
534
-
535
- Special values:
536
- - `all`: enable all toolsets
537
- - `default`: default set (`context,repos,issues,pull_requests,users`)
538
-
539
- ### Usage examples
540
-
541
- Repo management:
542
- ```
543
- Use GitHub MCP to list all my repositories
544
- ```
545
-
546
- ```
547
- Fetch file contents from owner/repo: src/main.py
548
- ```
549
-
550
- ```
551
- Search owner/repo for files containing "authentication"
552
- ```
553
-
554
- Issue management:
555
- ```
556
- Create a new issue in owner/repo: title "Fix login bug", description "Users cannot log in"
557
- ```
558
-
559
- ```
560
- List all open issues in owner/repo
561
- ```
562
-
563
- ```
564
- Add a comment to issue #123: "Fixed; please verify"
565
- ```
566
-
567
- PR management:
568
- ```
569
- Create a PR in owner/repo: from feature-branch to main
570
- ```
571
-
572
- ```
573
- List PRs in owner/repo pending review
574
- ```
575
-
576
- ```
577
- Fetch review comments for PR #456
578
- ```
579
-
580
- CI/CD monitoring:
581
- ```
582
- Check recent GitHub Actions runs for owner/repo
583
- ```
584
-
585
- ```
586
- Fetch logs for workflow run ID 123456
587
- ```
588
-
589
- ### Toolset config examples
590
-
591
- Read-only mode (recommended while exploring):
592
-
593
- ```json
594
- {
595
- "env": {
596
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx",
597
- "GITHUB_READ_ONLY": "1"
598
- }
599
- }
600
- ```
601
-
602
- Specific toolsets:
603
-
604
- ```json
605
- {
606
- "env": {
607
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx",
608
- "GITHUB_TOOLSETS": "repos,issues,pull_requests,actions"
609
- }
610
- }
611
- ```
612
-
613
- Enable all:
614
-
615
- ```json
616
- {
617
- "env": {
618
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx",
619
- "GITHUB_TOOLSETS": "all"
620
- }
621
- }
622
- ```
623
-
624
- Dynamic toolset discovery:
625
-
626
- ```json
627
- {
628
- "env": {
629
- "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx",
630
- "GITHUB_DYNAMIC_TOOLSETS": "1"
631
- }
632
- }
633
- ```
634
-
635
- ### Prerequisites
636
-
637
- Docker must be installed and running:
638
-
639
- ```bash
640
- docker --version
641
- docker ps
642
- ```
643
-
644
- Optional pre-pull:
645
-
646
- ```bash
647
- docker pull ghcr.io/github/github-mcp-server
648
- ```
649
-
650
- ### Troubleshooting
651
-
652
- Docker pull failures:
653
-
654
- ```bash
655
- docker logout ghcr.io
656
- docker pull ghcr.io/github/github-mcp-server
657
- ```
658
-
659
- Docker not running:
660
-
661
- ```bash
662
- # macOS
663
- open -a Docker
664
-
665
- # Linux
666
- sudo systemctl start docker
667
- ```
668
-
669
- PAT permissions:
670
- 1. Review token scopes under https://github.com/settings/tokens
671
- 2. Add missing scopes
672
- 3. Regenerate token if needed
673
-
674
- API rate limits:
675
- - unauthenticated: 60/hour
676
- - authenticated: 5000/hour
677
-
678
- Connectivity:
679
- ```bash
680
- curl -I https://api.github.com
681
- ```
682
-
683
- GitHub Enterprise:
684
- - GHES: `https://your-ghes.com`
685
- - ghe.com: `https://yourorg.ghe.com`
686
-
687
- Tool visibility:
688
- ```bash
689
- cat ~/.claude.json | grep -A 20 '\"github\"'
690
- ```
691
-
692
- ### Security best practices
693
-
694
- - Never commit PATs to git
695
- - Rotate tokens regularly (e.g. every 90 days)
696
- - Use least privilege
697
- - Revoke tokens immediately when no longer needed
698
- - Prefer read-only mode (`GITHUB_READ_ONLY=1`) for exploration
699
- - Use lockdown mode (`GITHUB_LOCKDOWN_MODE=1`) for production contexts
700
- - Audit periodically: https://github.com/settings/security-log
701
-
702
- ---
703
-
704
- ## Playwright MCP
705
-
706
- ### Basics
707
-
708
- - **npm package**: `@playwright/mcp@latest`
709
- - **Version**: 0.0.54+
710
- - **Type**: browser automation
711
- - **Install**: `npx` (auto-download)
712
- - **Repo**: https://github.com/microsoft/playwright-mcp
713
- - **Website**: https://playwright.dev
714
- - **Maintained by**: Microsoft
715
-
716
- ### Capabilities
717
-
718
- - Browser automation via Playwright
719
- - No vision model required: uses Accessibility Tree instead of screenshots
720
- - More deterministic than screenshot-based approaches
721
- - Multi-browser: Chrome, Firefox, WebKit (Safari), Edge
722
- - Page interaction: click/type/navigate/form submit
723
- - Content extraction: text and element data
724
- - Optional features: testing, PDF export, vision-based coordinate click
725
-
726
- ### Configuration
727
-
728
- Basic config (recommended):
729
-
730
- ```json
731
- {
732
- "mcpServers": {
733
- "playwright": {
734
- "command": "npx",
735
- "args": ["@playwright/mcp@latest"]
736
- }
737
- }
738
- }
739
- ```
740
-
741
- With parameters:
742
-
743
- ```json
744
- {
745
- "mcpServers": {
746
- "playwright": {
747
- "command": "npx",
748
- "args": [
749
- "@playwright/mcp@latest",
750
- "--browser=chrome",
751
- "--viewport-size=1280x720",
752
- "--timeout-action=10000"
753
- ]
754
- }
755
- }
756
- }
757
- ```
758
-
759
- Headless:
760
-
761
- ```json
762
- {
763
- "mcpServers": {
764
- "playwright": {
765
- "command": "npx",
766
- "args": ["@playwright/mcp@latest", "--headless"]
767
- }
768
- }
769
- }
770
- ```
771
-
772
- ### Common parameters
773
-
774
- | Flag | Description | Default | Example |
775
- |---|---|---|---|
776
- | `--browser` | browser | chrome | chrome, firefox, webkit, msedge |
777
- | `--headless` | headless mode | false | `--headless` |
778
- | `--viewport-size` | window size | default | `--viewport-size=1280x720` |
779
- | `--device` | emulate device | none | `--device="iPhone 15"` |
780
- | `--timeout-action` | action timeout (ms) | 5000 | `--timeout-action=10000` |
781
- | `--timeout-navigation` | nav timeout (ms) | 60000 | `--timeout-navigation=30000` |
782
- | `--user-agent` | custom UA | default | `--user-agent="Custom UA"` |
783
- | `--ignore-https-errors` | ignore HTTPS errors | false | `--ignore-https-errors` |
784
- | `--caps` | extra capabilities | none | `--caps=vision,pdf,testing` |
785
-
786
- ### Advanced options
787
-
788
- Proxy:
789
-
790
- ```json
791
- {
792
- "mcpServers": {
793
- "playwright": {
794
- "command": "npx",
795
- "args": [
796
- "@playwright/mcp@latest",
797
- "--proxy-server=http://myproxy:3128",
798
- "--proxy-bypass=.com,chromium.org"
799
- ]
800
- }
801
- }
802
- }
803
- ```
804
-
805
- Persistent user data:
806
-
807
- ```json
808
- {
809
- "mcpServers": {
810
- "playwright": {
811
- "command": "npx",
812
- "args": ["@playwright/mcp@latest", "--user-data-dir=/path/to/profile"]
813
- }
814
- }
815
- }
816
- ```
817
-
818
- Isolated sessions:
819
-
820
- ```json
821
- {
822
- "mcpServers": {
823
- "playwright": {
824
- "command": "npx",
825
- "args": [
826
- "@playwright/mcp@latest",
827
- "--isolated",
828
- "--storage-state=/path/to/state.json"
829
- ]
830
- }
831
- }
832
- }
833
- ```
834
-
835
- Enable extra capabilities:
836
-
837
- ```json
838
- {
839
- "mcpServers": {
840
- "playwright": {
841
- "command": "npx",
842
- "args": ["@playwright/mcp@latest", "--caps=vision,pdf,testing"]
843
- }
844
- }
845
- }
846
- ```
847
-
848
- ### Default persistent profile locations
849
-
850
- macOS:
851
- ```
852
- ~/Library/Caches/ms-playwright/mcp-{channel}-profile
853
- ```
854
-
855
- Linux:
856
- ```
857
- ~/.cache/ms-playwright/mcp-{channel}-profile
858
- ```
859
-
860
- Windows:
861
- ```
862
- %USERPROFILE%\\AppData\\Local\\ms-playwright\\mcp-{channel}-profile
863
- ```
864
-
865
- You can override with `--user-data-dir`.
866
-
867
- ### Optional capabilities via `--caps`
868
-
869
- Vision:
870
- ```bash
871
- --caps=vision
872
- ```
873
-
874
- PDF:
875
- ```bash
876
- --caps=pdf
877
- ```
878
-
879
- Testing:
880
- ```bash
881
- --caps=testing
882
- ```
883
-
884
- Tracing:
885
- ```bash
886
- --caps=tracing
887
- ```
888
-
889
- ### Usage examples
890
-
891
- Basic browsing:
892
- ```
893
- Use Playwright to open a browser and visit https://example.com
894
- ```
895
-
896
- Fill a form:
897
- ```
898
- Use Playwright:
899
- 1. Visit https://forms.example.com
900
- 2. Type "testuser" into #username
901
- 3. Type "password123" into #password
902
- 4. Click #submit
903
- ```
904
-
905
- Extract content:
906
- ```
907
- Use Playwright to visit https://news.example.com and extract all article titles
908
- ```
909
-
910
- Web test:
911
- ```
912
- Use Playwright to test login:
913
- 1. Visit the login page
914
- 2. Enter credentials
915
- 3. Submit the form
916
- 4. Verify redirect to dashboard
917
- ```
918
-
919
- Screenshot:
920
- ```
921
- Use Playwright to visit https://example.com and save a screenshot
922
- ```
923
-
924
- ### When it fits / does not fit
925
-
926
- Fits:
927
- - UI automation and E2E testing
928
- - scraping data from dynamic pages
929
- - form automation
930
- - screenshots and PDF export
931
- - monitoring page changes
932
- - interacting with SPAs (React/Vue/etc.)
933
-
934
- Does not fit:
935
- - high-frequency large-scale scraping (resource heavy)
936
- - real-time monitoring where browser cost is unacceptable
937
- - simple API calls (an HTTP client is more efficient)
938
-
939
- ### Extension mode (advanced)
940
-
941
- Connect to an existing browser session via a Chrome extension:
942
-
943
- ```json
944
- {
945
- "mcpServers": {
946
- "playwright": {
947
- "command": "npx",
948
- "args": ["@playwright/mcp@latest", "--extension"]
949
- }
950
- }
951
- }
952
- ```
953
-
954
- Prereqs:
955
- 1. Install "Playwright MCP Bridge" Chrome extension
956
- 2. Only Edge/Chrome supported
957
- 3. Can reuse an already logged-in browser session
958
-
959
- ### Access restrictions and security notes
960
-
961
- Allowed origins:
962
- ```bash
963
- --allowed-origins="https://example.com;https://trusted.com"
964
- ```
965
-
966
- Blocked origins:
967
- ```bash
968
- --blocked-origins="https://malicious.com"
969
- ```
970
-
971
- Note: this is not a security boundary; it is a guardrail only.
972
-
973
- Block service workers:
974
- ```bash
975
- --block-service-workers
976
- ```
977
-
978
- Sandbox:
979
- ```bash
980
- --no-sandbox
981
- ```
982
-
983
- Warning: disabling sandbox reduces security; use only when required (e.g. some Docker contexts).
984
-
985
- ### Troubleshooting
986
-
987
- Browsers missing:
988
- ```bash
989
- npx playwright install
990
- npx playwright install chromium
991
- ```
992
-
993
- Slow first run:
994
- - downloads the package and browsers via `npx` (expected)
995
-
996
- Headless debugging:
997
- 1. remove `--headless` to watch the browser
998
- 2. enable tracing: `--caps=tracing`
999
- 3. save screenshots
1000
-
1001
- Timeouts:
1002
- ```bash
1003
- --timeout-action=30000
1004
- --timeout-navigation=90000
1005
- ```
1006
-
1007
- Permission issues:
1008
- ```bash
1009
- --grant-permissions=geolocation,clipboard-read,clipboard-write
1010
- ```
1011
-
1012
- Docker environments:
1013
- ```dockerfile
1014
- FROM mcr.microsoft.com/playwright:v1.48.0-noble
1015
- WORKDIR /app
1016
- RUN npm install -g playwright
1017
- CMD ["npx", "@playwright/mcp@latest", "--headless", "--no-sandbox"]
1018
- ```
1019
-
1020
- ### Standalone server mode (advanced)
1021
-
1022
- ```bash
1023
- # start server
1024
- npx @playwright/mcp@latest --port 8931
1025
- ```
1026
-
1027
- Client config example:
1028
- ```json
1029
- {
1030
- "mcpServers": {
1031
- "playwright": {
1032
- "url": "http://localhost:8931/mcp"
1033
- }
1034
- }
1035
- }
1036
- ```
1037
-
1038
- Characteristics:
1039
- - HTTP transport
1040
- - suitable for remote access
1041
- - works on headless systems
1042
-
1043
- ### Config file
1044
-
1045
- ```json
1046
- // playwright-mcp-config.json
1047
- {
1048
- "browser": "chrome",
1049
- "headless": true,
1050
- "viewport": { "width": 1280, "height": 720 },
1051
- "ignoreHTTPSErrors": true,
1052
- "timeout": {
1053
- "action": 10000,
1054
- "navigation": 60000
1055
- },
1056
- "proxy": {
1057
- "server": "http://myproxy:3128",
1058
- "bypass": ".com,chromium.org"
1059
- }
1060
- }
1061
- ```
1062
-
1063
- Use the config file:
1064
- ```bash
1065
- --config=/path/to/config.json
1066
- ```
1067
-
1068
- ### Best practices
1069
-
1070
- Choose the right mode:
1071
- ```bash
1072
- # local debugging: show browser
1073
- --browser=chrome
1074
-
1075
- # production: headless
1076
- --headless
1077
-
1078
- # CI: headless + no sandbox (if required)
1079
- --headless --no-sandbox
1080
- ```
1081
-
1082
- Performance:
1083
- ```bash
1084
- --timeout-action=3000
1085
- --user-data-dir=~/.playwright-profile
1086
- --shared-browser-context
1087
- ```
1088
-
1089
- Debug artifacts:
1090
- ```bash
1091
- --save-session
1092
- --save-trace
1093
- --save-video=1280x720
1094
- ```
1095
-
1096
- Permissions:
1097
- ```bash
1098
- --grant-permissions=geolocation,notifications
1099
- --allowed-origins="https://trusted.com"
1100
- ```
1101
-
1102
- Updating Playwright MCP:
1103
- ```bash
1104
- # npx uses the latest version automatically
1105
- npx clear-npx-cache
1106
- npx playwright install
1107
- ```
1108
-
1109
- ---
1110
-
1111
- ## Configuration locations
1112
-
1113
- ### User scope configuration
1114
-
1115
- **File**: `~/.claude.json`
1116
-
1117
- ```json
1118
- {
1119
- "mcpServers": {
1120
- "ckb": { },
1121
- "context7": { },
1122
- "github": { },
1123
- "playwright": { }
1124
- },
1125
- "projects": {
1126
- }
1127
- }
1128
- ```
1129
-
1130
- ### Codex CLI configuration (sync with Claude Code)
1131
-
1132
- If you use Codex CLI and want to reuse the same MCP set:
1133
-
1134
- - **Codex config file**: `~/.codex/config.toml`
1135
- - **Field**: `mcp_servers`
1136
- - **Note**: some versions require enabling `features.rmcp_client = true` to load MCP tools in Codex
1137
- - **Recommended**: use the repo script to sync from Claude config to Codex: `scripts/sync_mcp_from_claude_to_codex.py`
1138
- - **Guide**: `mcp_codex.md`
1139
-
1140
- ---
1141
-
1142
- ## Common use cases
1143
-
1144
- CKB is a good fit for:
1145
- - searching for symbols across the codebase
1146
- - finding all usages (references) of a function, class, or variable
1147
- - analyzing the impact of code changes
1148
- - understanding project architecture and dependencies
1149
- - exploring Git history and blame info
1150
-
1151
- Context7 is a good fit for:
1152
- - querying the latest library docs and APIs
1153
- - getting up-to-date code examples
1154
- - learning new libraries/frameworks
1155
- - avoiding outdated code suggestions
1156
-
1157
- GitHub MCP Server is a good fit for:
1158
- - browsing/searching GitHub repos
1159
- - creating/managing issues
1160
- - creating/reviewing PRs
1161
- - CI/CD monitoring
1162
- - collaboration and project management
1163
- - security scanning and Dependabot management
1164
-
1165
- Playwright MCP is a good fit for:
1166
- - web automation testing and E2E
1167
- - scraping dynamic pages
1168
- - form automation
1169
- - screenshots and PDFs
1170
- - monitoring page changes
1171
- - interacting with SPAs
1172
- - e-commerce flow automation tests
1173
-
1174
- ---
1175
-
1176
- ## Troubleshooting
1177
-
1178
- CKB/Context7/GitHub/Playwright:
1179
- - see their respective sections for specific troubleshooting steps
1180
-
1181
- ---
1182
-
1183
- ## Maintenance and updates
1184
-
1185
- Update CKB:
1186
- ```bash
1187
- cd ~/Projects/mcps/codemcp
1188
- git pull
1189
- go build -o ckb ./cmd/ckb
1190
- sudo cp ckb /usr/local/bin/ckb
1191
- ```
1192
-
1193
- Update Context7:
1194
- ```bash
1195
- # npx -y downloads latest automatically; nothing to do
1196
- ```
1197
-
1198
- Update GitHub MCP Server:
1199
- ```bash
1200
- docker pull ghcr.io/github/github-mcp-server
1201
- ```
1202
-
1203
- Update Playwright MCP:
1204
- ```bash
1205
- npx clear-npx-cache
1206
- npx playwright install
1207
- ```
1208
-
1209
- ---
1210
-
1211
- ## References
1212
-
1213
- CKB:
1214
- - https://github.com/simplyliz/codemcp
1215
-
1216
- Context7:
1217
- - https://context7.com
1218
- - https://github.com/upstash/context7
1219
- - https://www.npmjs.com/package/@upstash/context7-mcp
1220
- - https://context7.com/dashboard
1221
- - https://github.com/upstash/context7#-adding-projects
1222
-
1223
- GitHub MCP Server:
1224
- - https://github.com/github/github-mcp-server
1225
- - https://github.com/github/github-mcp-server/pkgs/container/github-mcp-server
1226
- - https://github.com/github/github-mcp-server#readme
1227
- - https://github.com/github/github-mcp-server/tree/main/docs
1228
- - https://github.com/settings/tokens
1229
-
1230
- Playwright MCP:
1231
- - https://github.com/microsoft/playwright-mcp
1232
- - https://playwright.dev
1233
- - https://www.npmjs.com/package/@playwright/mcp
1234
- - https://github.com/microsoft/playwright-mcp/tree/main/extension
1235
- - https://github.com/microsoft/playwright-mcp#docker
1236
-
1237
- General:
1238
- - https://modelcontextprotocol.io/
1239
- - https://docs.claude.com/en/docs/claude-code/mcp
1240
- - https://mcp.lobehub.com/
1241
-
1242
- ---
1243
-
1244
- **Document updated**: 2026-01-18
1245
- **Author**: Claude Code
1246
- **Maintenance**: update configs and usage notes periodically
@@ -1,190 +0,0 @@
1
- # DevBooks Setup Guide
2
-
3
- > This guide helps you integrate the DevBooks workflow into your project.
4
-
5
- ---
6
-
7
- ## Quick Start (Let AI Configure)
8
-
9
- Send the following prompt to your AI assistant, and it will automatically complete the configuration:
10
-
11
- ```text
12
- You are the "DevBooks Context Protocol Adapter Installer." Your goal is to integrate DevBooks' protocol-agnostic conventions (<truth-root>/<change-root> + role isolation + DoD + Skills index) into the target project's context protocol.
13
-
14
- Prerequisites (check first; stop and explain if missing):
15
- - System dependencies installed (jq, ripgrep required; scc, radon recommended)
16
- Check command: command -v jq rg scc radon
17
- If missing, run: <devbooks-root>/scripts/install-dependencies.sh
18
- - You can locate the project's "context index file" (defined by the context protocol; common: CLAUDE.md / AGENTS.md / PROJECT.md / <protocol>/project.md).
19
-
20
- Hard constraints (must follow):
21
- 1) This install only changes the "context/document index"; do not change business code, tests, or add dependencies.
22
- 2) If the target project already has a context protocol managed block, custom content must be outside the managed block to avoid being overwritten.
23
- 3) The install must explicitly state two root directories:
24
- - <truth-root>: current truth directory root
25
- - <change-root>: change package directory root
26
-
27
- Tasks (execute in order):
28
- 0) Check system dependencies:
29
- - Run: command -v jq rg scc radon
30
- - If required deps are missing (jq, rg), instruct the user to run: ./scripts/install-dependencies.sh
31
- - If recommended deps are missing (scc, radon), suggest optional install to enable complexity-weighted hotspots
32
- 1) Identify the context protocol type (at least two branches):
33
- - If DevBooks is detected (dev-playbooks/project.md exists): use DevBooks defaults (<truth-root>=dev-playbooks/specs, <change-root>=dev-playbooks/changes).
34
- - Otherwise: use the manual configuration section
35
- 2) Determine directory roots for the project:
36
- - If the project already defines "spec/change package" directories: use existing conventions as <truth-root>/<change-root>.
37
- - If not defined: recommend specs/ and changes/ at the repo root.
38
- 3) Merge template content into the project's context index file (append is fine):
39
- - Write: <truth-root>/<change-root>, change package file structure, role isolation, DoD, devbooks-* Skills index.
40
- 4) Validate (must output check results):
41
- - Whether artifact locations are consistent (proposal/design/tasks/verification/specs/evidence)
42
- - Whether Test Owner/Coder isolation and "Coder must not modify tests" are included
43
- - Whether DoD is included (MECE)
44
- - Whether devbooks-* Skills index is included
45
-
46
- After completion, output:
47
- - System dependency check results (what is installed, what is missing)
48
- - Which files you modified (list)
49
- - Final <truth-root>/<change-root> values for the project
50
- - A short "next steps" example for the user (natural language, name 2-3 key skills)
51
- ```
52
-
53
- ---
54
-
55
- ## Manual Configuration
56
-
57
- If you want to configure manually, add the following content to your project's context index file (`CLAUDE.md`, `AGENTS.md`, or `PROJECT.md`):
58
-
59
- ### Root Directory Configuration
60
-
61
- ```yaml
62
- # DevBooks directory conventions
63
- truth_root: dev-playbooks/specs/ # Current truth directory root
64
- change_root: dev-playbooks/changes/ # Change package directory root
65
- ```
66
-
67
- ### Single Change Package Structure
68
-
69
- Each change's artifacts are organized as follows:
70
-
71
- | Artifact | Path | Description |
72
- |----------|------|-------------|
73
- | Proposal | `<change-root>/<change-id>/proposal.md` | Why/What/Impact |
74
- | Design | `<change-root>/<change-id>/design.md` | What/Constraints + AC-xxx |
75
- | Plan | `<change-root>/<change-id>/tasks.md` | Trackable coding tasks |
76
- | Verification | `<change-root>/<change-id>/verification.md` | Trace matrix + MANUAL-* checklists |
77
- | Spec delta | `<change-root>/<change-id>/specs/**` | Spec delta for this change |
78
- | Evidence | `<change-root>/<change-id>/evidence/**` | Red/Green evidence (as needed) |
79
-
80
- ### Current Truth Directory Structure
81
-
82
- ```
83
- <truth-root>/
84
- ├── _meta/
85
- │ ├── project-profile.md # Project profile/constraints/gates
86
- │ └── glossary.md # Unified glossary
87
- ├── architecture/
88
- │ └── c4.md # C4 architecture map
89
- └── engineering/
90
- └── pitfalls.md # High-ROI pitfalls (optional)
91
- ```
92
-
93
- ### Role Isolation (Mandatory)
94
-
95
- ```markdown
96
- ## DevBooks Role Isolation Rules
97
-
98
- - Test Owner and Coder must work in **separate conversations/instances**
99
- - Parallel work allowed, but no shared context to avoid "self-testing"
100
- - Coder **must not modify** `tests/**`
101
- - Test changes must be handed back to Test Owner
102
- ```
103
-
104
- ### DoD (Definition of Done, MECE)
105
-
106
- Each change must declare which gates are covered; missing items require reasons:
107
-
108
- | Gate | Type | Example |
109
- |------|------|---------|
110
- | Behavior | unit/integration/e2e | pytest, jest |
111
- | Contract | OpenAPI/Proto/Schema | contract tests |
112
- | Structure | layering/dependency direction/no cycles | fitness tests |
113
- | Static & Security | lint/typecheck/build | SAST/secret scan |
114
- | Evidence | screenshots/videos/reports | UI, performance (as needed) |
115
-
116
- ---
117
-
118
- ## Skills Index
119
-
120
- ### Role-Based
121
-
122
- | Role | Skill | Artifact Location |
123
- |------|-------|-------------------|
124
- | Router | `devbooks-router` | Route and next step suggestions |
125
- | Proposal Author | `devbooks-proposal-author` | `proposal.md` |
126
- | Proposal Challenger | `devbooks-proposal-challenger` | Challenge report |
127
- | Proposal Judge | `devbooks-proposal-judge` | Verdict writeback |
128
- | Impact Analyst | `devbooks-impact-analysis` | Impact section |
129
- | Design Owner | `devbooks-design-doc` | `design.md` |
130
- | Spec & Contract | `devbooks-spec-contract` | `specs/**` |
131
- | Planner | `devbooks-implementation-plan` | `tasks.md` |
132
- | Test Owner | `devbooks-test-owner` | `verification.md` + `tests/` |
133
- | Coder | `devbooks-coder` | Implement per tasks (no tests) |
134
- | Reviewer | `devbooks-reviewer` | Review feedback |
135
- | Archiver | `devbooks-archiver` | Archive pruning + C4 merge |
136
- | Design Backport | `devbooks-design-backport` | Backport design gaps |
137
-
138
- ### Workflow-Based
139
-
140
- | Workflow | Skill | Description |
141
- |----------|-------|-------------|
142
- | Delivery | `devbooks-delivery-workflow` | Change loop |
143
- | Brownfield Bootstrap | `devbooks-brownfield-bootstrap` | Legacy project init |
144
-
145
- ### Metrics
146
-
147
- | Feature | Skill | Description |
148
- |---------|-------|-------------|
149
- | Entropy Monitor | `devbooks-entropy-monitor` | System entropy metrics |
150
-
151
- ---
152
-
153
- ## Advanced Options
154
-
155
- ### Custom Directory Mapping
156
-
157
- Configure in `.devbooks/config.yaml`:
158
-
159
- ```yaml
160
- # Directory mapping
161
- mapping:
162
- truth_root: specs/ # Custom truth directory
163
- change_root: changes/ # Custom change directory
164
- agents_doc: AGENTS.md # Rules document path
165
-
166
- # AI tools configuration
167
- ai_tools:
168
- - claude
169
- - cursor
170
- ```
171
-
172
- ### CI/CD Integration
173
-
174
- Copy templates from `templates/ci/` to `.github/workflows/`:
175
-
176
- - `devbooks-guardrail.yml`: PR checks for complexity/hotspots/layering violations
177
- - `devbooks-cod-update.yml`: COD model update after push
178
-
179
- ---
180
-
181
- ## Automatic Skill Routing
182
-
183
- The AI can automatically select Skills based on user intent:
184
-
185
- | User Intent | Auto Route |
186
- |-------------|------------|
187
- | "Fix bug", "find issue" | `devbooks-impact-analysis` → `devbooks-coder` |
188
- | "Refactor", "optimize code" | `devbooks-reviewer` → `devbooks-coder` |
189
- | "New feature", "implement XX" | `devbooks-router` → full loop |
190
- | "Write tests", "add tests" | `devbooks-test-owner` |