Initial commit: Gitea browser automation MCP server
TypeScript/Playwright MCP server exposing 9 Gitea tools (list_repos, view_repo, view_file, list/create/view/comment/merge/close PR). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
20
inspect.ts
Normal file
20
inspect.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'dotenv/config';
|
||||
import { chromium } from 'playwright';
|
||||
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const page = await browser.newPage();
|
||||
await page.goto(`${process.env.GITEA_URL}/user/login`);
|
||||
|
||||
const elements = await page.evaluate(() =>
|
||||
[...document.querySelectorAll<HTMLInputElement | HTMLButtonElement>('input, button')].map(el => ({
|
||||
tag: el.tagName,
|
||||
type: (el as HTMLInputElement).type,
|
||||
name: (el as HTMLInputElement).name,
|
||||
id: el.id,
|
||||
class: el.className.slice(0, 60),
|
||||
value: (el as HTMLInputElement).value?.slice(0, 40),
|
||||
}))
|
||||
);
|
||||
|
||||
console.log(JSON.stringify(elements, null, 2));
|
||||
await browser.close();
|
||||
Reference in New Issue
Block a user