Skip to content

Commit 31a0bdc

Browse files
committed
feat: initial version
0 parents  commit 31a0bdc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+12582
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Chrome version:**
24+
**Coding agent version:**
25+
**Model version:**
26+
27+
**Screenshots**
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Chat log**
31+
The full log of the chat with your coding agent.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature request
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/workflows/check-format.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Code Format
2+
3+
permissions: read-all
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
jobs:
12+
check-format:
13+
runs-on: ubuntu-latest # You can also use 'macos-latest' or 'windows-latest'
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4 # Use the latest stable version
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4 # Use the latest stable version
21+
with:
22+
node-version: '22' # Specify the Node.js version your project uses (e.g., '18', '20', '22')
23+
cache: 'npm' # Caches npm dependencies to speed up builds
24+
25+
- name: Install dependencies
26+
run: npm ci # Use 'npm ci' for clean installs in CI environments, or 'npm install' if you prefer
27+
28+
- name: Run format check
29+
run: npm run check-format

.github/workflows/run-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Compile and run unit tests
2+
3+
permissions: read-all
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
jobs:
12+
tests:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '22'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
# Ensure the project compiles properly.
29+
- name: Build the project
30+
run: npm run build
31+
32+
- name: Run tests
33+
run: npm run test

.gitignore

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# vitepress build output
108+
**/.vitepress/dist
109+
110+
# vitepress cache directory
111+
**/.vitepress/cache
112+
113+
# Docusaurus cache and generated files
114+
.docusaurus
115+
116+
# Serverless directories
117+
.serverless/
118+
119+
# FuseBox cache
120+
.fusebox/
121+
122+
# DynamoDB Local files
123+
.dynamodb/
124+
125+
# TernJS port file
126+
.tern-port
127+
128+
# Stores VSCode versions used for testing VSCode extensions
129+
.vscode-test
130+
131+
# Stores VSCode specific settings
132+
.vscode
133+
!.vscode/*.template.json
134+
!.vscode/extensions.json
135+
136+
# yarn v2
137+
.yarn/cache
138+
.yarn/unplugged
139+
.yarn/build-state.yml
140+
.yarn/install-state.gz
141+
.pnp.*
142+
143+
# Build output directory
144+
build/
145+
146+
log.txt
147+
148+
.DS_Store

.prettierrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/**
8+
* @type {import('prettier').Config}
9+
*/
10+
module.exports = {
11+
// eslint-disable-next-line @typescript-eslint/no-require-imports
12+
...require('gts/.prettierrc.json'),
13+
singleAttributePerLine: true,
14+
htmlWhitespaceSensitivity: 'strict',
15+
};

CONTRIBUTING.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# How to contribute
2+
3+
We'd love to accept your patches and contributions to this project.
4+
5+
## Before you begin
6+
7+
### Sign our Contributor License Agreement
8+
9+
Contributions to this project must be accompanied by a
10+
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
11+
You (or your employer) retain the copyright to your contribution; this simply
12+
gives us permission to use and redistribute your contributions as part of the
13+
project.
14+
15+
If you or your current employer have already signed the Google CLA (even if it
16+
was for a different project), you probably don't need to do it again.
17+
18+
Visit <https://cla.developers.google.com/> to see your current agreements or to
19+
sign a new one.
20+
21+
### Review our community guidelines
22+
23+
This project follows
24+
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
25+
26+
## Contribution process
27+
28+
### Code reviews
29+
30+
All submissions, including submissions by project members, require review. We
31+
use GitHub pull requests for this purpose. Consult
32+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
33+
information on using pull requests.
34+
35+
## Installation
36+
37+
```sh
38+
git clone https://github.com/ChromeDevTools/chrome-devtools-mcp.git
39+
cd chrome-devtools-mcp
40+
npm ci
41+
npm run build
42+
```
43+
44+
### Testing with @modelcontextprotocol/inspector
45+
46+
```sh
47+
npx @modelcontextprotocol/inspector node build/src/index.js
48+
```
49+
50+
### Testing with an MCP client
51+
52+
Add the MCP server to your client's config.
53+
54+
```
55+
{
56+
"mcpServers": {
57+
"chrome-devtools": {
58+
"command": "node",
59+
"args": ["/path-to/build/src/index.js"],
60+
}
61+
}
62+
}
63+
```
64+
65+
#### Using with VS Code SSH
66+
67+
When running the `@modelcontextprotocol/inspector` it spawns 2 services - one on port `6274` and one on `6277`.
68+
Usually VS Code automatically detects and forwards `6274` but fails to detect `6277` so you need to manually forward it.
69+
70+
### Debugging
71+
72+
To write debug logs to `log.txt` in the working directory, run with the following commands:
73+
74+
```sh
75+
npx @modelcontextprotocol/inspector node build/src/index.js --log-file=/your/desired/path/log.txt
76+
```
77+
78+
You can use the `DEBUG` environment variable as usual to control categories that are logged.

0 commit comments

Comments
 (0)