@nitansde/mcp
v2.0.0
Published
Nitan MCP CLI server for uscardforum.com (modified Discourse MCP with Cloudflare bypass)
Readme
Nitan MCP
This is a heavy modified version of Discourse MCP. It will be a dedicated MCP client for https://www.uscardforum.com/
Quick Installation
Prerequisites:
- Node.js 18 or higher (required)
- Python 3.7+ (required for Cloudflare bypass)
- pip (used via local
.venvPython)
Simplified setup by platform
macOS
npm install
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtnpm install will also auto-install playwright and the Chromium runtime on macOS for browser fallback.
Linux
npm install
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn non-macOS platforms, Playwright is not auto-installed.
Windows (PowerShell)
npm install
py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtOn non-macOS platforms, Playwright is not auto-installed.
Run health check:
node dist/index.js doctorCheck your Node.js version:
node --version # Should be v18.0.0 or higherIf you need to upgrade Node.js:
# Using nvm (recommended)
nvm install 18
nvm use 18
# Or download from https://nodejs.org/Using npx (recommended):
npx -y @nitansde/mcp@latestWhat happens automatically:
- ✅ Downloads and caches the package
- ✅ Installs Node.js dependencies
- ✅ Runs
postinstallscript to check/install Python dependencies - ✅ On macOS, auto-installs
playwrightpackage and Chromium runtime for browser fallback - ✅ Checks Python dependencies at runtime and shows helpful warnings if missing
If Python dependencies aren't installed automatically:
.venv/bin/python -m pip install cloudscraper curl-cffi
# Or install from requirements.txt (recommended)
.venv/bin/python -m pip install -r requirements.txtIf Python is installed in a virtual environment
npx -y @nitansde/mcp@latest --python_path /path/to/python_executableThe server will start even if Python dependencies are missing, but Cloudflare bypass features won't work until you install them.
Skill Distribution (OpenClaw AgentSkill)
This project also ships an AgentSkill (additive only, does not change MCP runtime behavior).
- Skill source:
skills/nitan/SKILL.md - Pack command:
pnpm skill:pack
# output: dist-skill/nitan.skillInstall Skill in OpenClaw
Option A (recommended): install the packaged file
- Build the skill package:
pnpm skill:pack- Import
dist-skill/nitan.skillinto OpenClaw Skill manager (or your skill distribution channel).
Option B: install from source folder (local development)
- Copy
skills/nitan/to your OpenClaw skills directory. - Restart/reload OpenClaw so it re-indexes skills.
Release-ready checklist:
pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm skill:packPublish flow:
- npm package publish remains unchanged.
- Attach
dist-skill/nitan.skillas a release artifact (or upload to your skill channel).
Cloudflare Bypass
This server uses an intelligent dual-method Cloudflare bypass strategy:
- Tries
cloudscraperfirst (mature, established) - Automatically falls back to
curl_cffiif cloudscraper fails (better browser impersonation) - Remembers failures and uses the working method for subsequent requests
This provides maximum reliability against Cloudflare protection. See CLOUDFLARE_BYPASS.md for details.
Browser Fallback (new)
When direct bypass still hits Cloudflare challenge (403/challenge page), browser fallback is enabled by default on macOS.
- Keeps current direct mode as default
- Triggers browser path only on challenge-like responses
- macOS only: default provider is Playwright persistent profile mode (
playwright) - macOS only:
npm installauto-installs Playwright + Chromium runtime - Profile selection for Playwright fallback:
- Reuse OpenClaw user-data-dir only when the selected profile directory exists
- Otherwise use/create
~/Library/Application Support/NitanMCP/ChromeProfile - If OpenClaw user-data-dir exists but the selected profile directory is missing, auto-fallback to Nitan profile dir
- Never use the system default Chrome profile directory
- If fallback lands on login/not_logged_in and
NITAN_USERNAME+NITAN_PASSWORDare set, Playwright auto-login is attempted and request is retried once - Interactive login keeps working by opening a visible Chrome window with the selected profile
- Non-macOS: browser fallback is disabled automatically (direct bypass only), and Playwright is not auto-installed
CLI flags (or profile JSON fields):
--browser-fallback-enabled=true--browser-fallback-provider=playwright--browser-fallback-timeout-ms=45000--interactive-login-enabled=true--login-profile-name="nitan"--login-check-url="https://www.uscardforum.com/"
Example:
npx -y @nitansde/mcp@latest \
--browser-fallback-enabled=true \
--browser-fallback-provider=playwright \
--interactive-login-enabled=true \
--login-profile-name="nitan"If you switch provider to openclaw_proxy and relay is unavailable, attach a tab with OpenClaw Browser Relay (badge ON) and retry.
If Playwright is missing on macOS, run:
npm install --no-save playwright
npx playwright install chromiumPython dependency recommendation (all platforms)
Use local venv to avoid system Python policy conflicts (PEP668 / externally managed environments):
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtpython_path now defaults to .venv/bin/python when available.
During npm install, postinstall now prefers local .venv and installs requirements via .venv Python/pip.
MCP Client Configuration
For Claude Desktop (macOS/Windows):
{
"mcpServers": {
"nitan": {
"command": "npx",
"args": [
"-y",
"@nitansde/mcp@latest"
],
"env": {
"NITAN_USERNAME": "YOUR_USERNAME",
"NITAN_PASSWORD": "YOUR_PASSWORD"
}
}
}
}NITAN_USERNAME and NITAN_PASSWORD are optional for public read-only access.
Use optinal env "TIMEZONE": "America/New_York" if you want to use a timezone different to your local clock.
Configuration file location:
**Configuration file location:**
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`