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:
agent
2026-03-24 09:14:57 -04:00
commit 9132394fd5
10 changed files with 2432 additions and 0 deletions

20
inspect.ts Normal file
View 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();