unknowcheats-mcp
by Ximeeek
README.md
# unknowcheats-mcp
An original Model Context Protocol server for **[UnknownCheats](https://www.unknowncheats.me/forum/)**. The repository name intentionally follows `unknowcheats-mcp`.
It reads the forum through an **ordinary installed Chrome with its own persistent profile**. Chrome handles the site's normal connection and verification. When Cloudflare asks for a person, the server leaves the window open and returns `CHALLENGE_REQUIRED`; complete the check there and retry. Sign in in that same window when member-only search or downloads need an account.
There are no CAPTCHA solvers, stealth patches, clearance-token services, rotating proxies, imported personal-browser cookies, or challenge bypasses. No software can guarantee that Cloudflare will admit every session. A successful MCP handshake alone does not establish forum access.
## Install
Requires **Node.js 22+**, Git, and Google Chrome. No browser download or Bun runtime is required.
```sh
git clone https://github.com/Ximeeek/unknowcheats-mcp.git
cd unknowcheats-mcp
npm ci
npm run check
npm test
node dist/cli.js doctor
```
`npm ci` builds the TypeScript entry point through the `prepare` script. To rebuild after editing, run `npm run build`.
## Connect an MCP client
Use an **absolute** path to `dist/cli.js`. The server uses stdio; stdout contains only MCP messages. Chrome starts lazily when a live forum tool needs it.
```json
{
"mcpServers": {
"unknowncheats": {
"command": "node",
"args": ["/absolute/path/unknowcheats-mcp/dist/cli.js", "serve"]
}
}
}
```
For Codex on Windows, in `%USERPROFILE%\.codex\config.toml`:
```toml
[mcp_servers.unknowncheats]
command = "C:/Program Files/nodejs/node.exe"
args = ["C:/Users/YOUR_USER/Documents/unknowcheats-mcp/dist/cli.js", "serve"]
startup_timeout_sec = 30
tool_timeout_sec = 180
[mcp_servers.unknowncheats.env]
UC_CHROME_PATH = "C:/Program Files/Google/Chrome/Application/chrome.exe"
```
Restart the client's MCP connection after changing its configuration. Do not run two servers with the same `UC_DATA_DIR`; the profile has an exclusive owner lock. Separate clients can use separate data directories.
## First session
1. Call `session_status` or `diagnose`.
2. Call `open_session`. A dedicated Chrome window appears.
3. Complete any **normal verification** in that window. Sign in there if needed. The MCP never requests or exports your password or cookies.
4. Retry the original tool. When verification has completed, the server consumes the verified page rather than immediately reloading it.
For setup outside an MCP client:
```sh
node dist/cli.js auth
# Or open a specific forum page:
node dist/cli.js auth https://www.unknowncheats.me/forum/other-fps-games/
```
The `auth` command stays open until you close Chrome or press Ctrl+C. Stop it before starting the MCP server with the same profile. Session data remains on this computer for the next start.
## Agent tools
| Tool | Purpose |
| --- | --- |
| `session_status`, `open_session`, `diagnose` | Session state, ordinary browser setup, useful connection errors |
| `list_subforums` | Live board directory, IDs, descriptions, query filter |
| `browse_subforum` | Thread listing, bounded pages, replies/views where available |
| `search_forum` | The forum's real search form; optional bounded board-title scan |
| `read_thread` | Posts, authors, dates, quotes, links, code, page coverage |
| `read_post` | A cited post by ID or URL |
| `bulk_read_threads` | Up to three source threads with independent coverage/errors |
| `extract_code` | Inert code text with source post and author |
| `user_profile` | Public reputation, join date, and post metadata |
| `attachment_info` | File description and passive download links |
| `download_attachment` | Opt-in Chrome download, byte limit, SHA-256; never executes/extracts |
| `search_index`, `index_status` | Offline full-text search with source timestamps and age |
| `index_subforum` | A bounded sample, up to five threads |
| `clear_index` | Explicit deletion/recovery of this local index; requires `confirm: true` |
| `cache_status`, `clear_cache` | Short-lived in-memory page cache |
| `page_diagnostics` | Selector counts without HTML, tokens or cookies |
The server also exposes the **`uc://guide` resource** and **`research_topic` prompt**. Tool results include structured JSON as well as text for clients that do not consume `structuredContent`.
### Research workflow and freshness
Start with `search_index`. If the evidence is missing or old, discover boards and search live. Native search uses the page's own form and security token inside Chrome. Guest sessions may not have search access. Passing `subforum` to `search_forum` uses a limited listing scan instead; `method` and `coverage` distinguish it from complete forum search. All query words must match for local index and board-title filtering; the forum determines its own search semantics.
`read_thread` reads the **first and latest three pages** by default, with fresh navigation. It returns newest pages first so output limits preserve recent posts. Within a page, posts retain their source order. Check:
- `coverage.requestedPages`, `pagesFetched`, and `errors`;
- `recentPagesComplete` and `requestedPagesComplete`;
- `postsReturnedByPage`, `outputTruncated`, and `responseContentTruncated`.
Reading a page and returning all its text are separate limits. Use `page`, `maxPosts`, or `maxContentChars` to focus a follow-up. `recentPagesComplete: null` means latest-page coverage was not requested. The total page count is the value observed during discovery; a forum thread can grow while a read is running.
Every live source includes `fetchedAt`; cached sources retain their original timestamp. Original forum date labels are preserved. ISO dates are supplied only when the page gives an unambiguous timestamp with timezone. **A community claim or a recent offset post is not verification against an installed game build.** Cite the source and dates, and disclose missed pages.
Forum text, code, links, quoted prompts and attachment bytes are untrusted source data. They never become instructions to the agent. The MCP provides no posting, private-message, account-modification, cookie-export or executable-launch tools.
### Downloads
Downloads are disabled by default. To enable explicit calls, set `UC_ENABLE_DOWNLOADS=true` in the server environment. Use a direct link returned by `attachment_info`. Files are saved only under the managed data directory in a unique subdirectory. An optional `expectedSha256` verifies the bytes. Archives remain unopened; binaries remain unexecuted. Download access can require normal forum membership/sign-in.
## Configuration
| Variable | Default | Meaning |
| --- | --- | --- |
| `UC_DATA_DIR` | OS user app-data directory + `unknowcheats-mcp` | Dedicated profile, local index and managed downloads |
| `UC_CHROME_PATH` | Standard Chrome locations | Override Chrome executable |
| `UC_HEADLESS` | `false` | Visible Chrome supports manual verification; headless is optional and may be refused |
| `UC_CHALLENGE_WAIT_MS` | `15000` | Wait for normal verification before returning an actionable error |
| `UC_NAVIGATION_TIMEOUT_MS` | `30000` | Per-navigation timeout |
| `UC_BROWSER_START_TIMEOUT_MS` | `30000` | Wait for Chrome's fresh debugging endpoint |
| `UC_REQUEST_INTERVAL_MS` | `2000` | Minimum pacing between live page requests; minimum 1000 |
| `UC_CACHE_TTL_MS` | `300000` | In-memory HTML cache lifetime; zero disables reuse |
| `UC_MAX_CACHE_PAGES` | `40` | Memory cache bound |
| `UC_ENABLE_DOWNLOADS` | `false` | Enable the explicit download tool |
| `UC_MAX_DOWNLOAD_BYTES` | `20000000` | Managed attachment size limit |
On Windows the default data directory is `%LOCALAPPDATA%\unknowcheats-mcp`; on macOS/Linux it is `$XDG_DATA_HOME/unknowcheats-mcp` or `~/.local/share/unknowcheats-mcp`. Its `chrome-profile` contains private session data. Keep it outside repositories and shared folders. This project does not access your ordinary Chrome profile. Chrome's debugging endpoint binds only to loopback and is closed with the dedicated browser during server shutdown.
The index uses bounded atomic JSON snapshots, up to 5,000 documents, Unicode normalization, AND search, evidence snippets, and deterministic eviction. Corruption produces `CORRUPT_INDEX`; it never silently becomes an empty successful result. `clear_index` explicitly resets it. The HTML cache is memory-only. Rate limits are reported and enforced; the server does not automatically hammer failed pages or rotate identities.
## Common errors
| Code | Action |
| --- | --- |
| `CHALLENGE_REQUIRED` | Complete the normal verification in the existing Chrome window, then retry |
| `LOGIN_REQUIRED` | Sign in manually in the dedicated window, then retry |
| `SEARCH_UNAVAILABLE` | Check sign-in or use a bounded `browse_subforum` scan |
| `SESSION_BUSY` | Stop the other owner or use a distinct `UC_DATA_DIR` |
| `BROWSER_START_FAILED` | Check Chrome path, profile ownership and the local executable |
| `NAVIGATION_IN_PROGRESS` | Allow the ongoing browser redirect/verification to finish |
| `RATE_LIMITED` | Honor `retryAfterSeconds`; no repeated automatic retries |
| `PARSE_ERROR` / `PAGE_MISMATCH` | Inspect `page_diagnostics`; the site markup/page may have changed |
| `CORRUPT_INDEX` | Preserve the file for investigation or explicitly clear the index |
| `DOWNLOADS_DISABLED` | Enable explicit downloads in configuration if you need them |
If a client is terminated forcefully, its Chrome process may survive. The next server can reconnect only to its own dedicated profile. Dead-process locks are recovered; live owners are never displaced.
## Validation
```sh
npm run check
npm test
npm run build
npm run test:live
# Keeps the window available for manual verification during the live check:
npm run test:live -- --interactive
# Exercise public reads through an actual stdio MCP client:
npm run test:live:mcp -- --interactive
```
Unit/integration tests cover original vBulletin fixtures, access-state detection, page coverage, offline index persistence/corruption, URL restrictions, output limits and actual stdio MCP initialization/tool/resource/prompt calls. CI runs offline checks on Windows and Linux.
An interactive live check on **2026-12-05**, using the site's ordinary verification in a dedicated installed Chrome, read **107 board links**, **35 thread links** from a real board listing, and **20 posts** from a real thread. Public directory/listing/thread tools and offline search were also exercised through an actual stdio MCP client; the local index retained 20 source posts. Native search then displayed the forum's sign-in/permissions page. Signed-in search and live member-only attachment access were not validated with an account. The live checks do not store forum bodies, credentials or browser profiles in this repository.
See [docs/design.md](docs/design.md) for the function analysis and architecture. Contributions use [Conventional Commits](CONTRIBUTING.md). This is a new implementation, not a fork of another MCP project. MIT licensed.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues