hasolidit-mcp 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: 24
20
+ cache: npm
21
+ - run: npm ci
22
+ - run: npm run lint
23
+
24
+ test:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: actions/setup-node@v4
29
+ with:
30
+ node-version: 24
31
+ cache: npm
32
+ - run: npm ci
33
+ - name: Get Playwright version
34
+ id: pw
35
+ run: echo "version=$(npx playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT"
36
+ - name: Cache Playwright browsers
37
+ uses: actions/cache@v4
38
+ id: playwright-cache
39
+ with:
40
+ path: ~/.cache/ms-playwright
41
+ key: playwright-${{ steps.pw.outputs.version }}-chromium
42
+ - name: Install Playwright Chromium
43
+ if: steps.playwright-cache.outputs.cache-hit != 'true'
44
+ run: npx playwright install chromium
45
+ - name: Install Playwright system deps
46
+ run: npx playwright install-deps chromium
47
+ - run: npx playwright test
48
+
49
+ publish:
50
+ needs: [lint, test]
51
+ runs-on: ubuntu-latest
52
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
53
+ permissions:
54
+ contents: read
55
+ id-token: write
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ - uses: actions/setup-node@v4
59
+ with:
60
+ node-version: 24
61
+ registry-url: https://registry.npmjs.org
62
+ - name: Check if version changed
63
+ id: version
64
+ run: |
65
+ LOCAL=$(node -p "require('./package.json').version")
66
+ REMOTE=$(npm view hasolidit-mcp version 2>/dev/null || echo "0.0.0")
67
+ if [ "$LOCAL" != "$REMOTE" ]; then
68
+ echo "changed=true" >> "$GITHUB_OUTPUT"
69
+ echo "Version changed: $REMOTE → $LOCAL"
70
+ else
71
+ echo "changed=false" >> "$GITHUB_OUTPUT"
72
+ echo "Version unchanged: $LOCAL"
73
+ fi
74
+ - name: Publish to npm
75
+ if: steps.version.outputs.changed == 'true'
76
+ run: |
77
+ npm ci
78
+ npm publish --provenance --access public
79
+ env:
80
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.mcp.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "playwright": {
4
+ "command": "npx",
5
+ "args": [
6
+ "@playwright/mcp@latest"
7
+ ]
8
+ }
9
+ }
10
+ }
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24
package/AGENTS.md ADDED
@@ -0,0 +1,33 @@
1
+ # Hasolidit Forum MCP Server
2
+
3
+ MCP server for the Hasolidit financial community forum (XenForo-based, Hebrew). Provides forum interaction tools via Playwright browser automation.
4
+
5
+ ## Stack
6
+
7
+ - Node.js 24 with native TypeScript (no compile step)
8
+ - `@modelcontextprotocol/sdk` for MCP server
9
+ - Playwright for browser automation and DOM extraction
10
+ - ESLint with typescript-eslint recommended
11
+
12
+ ## Structure
13
+
14
+ - `src/index.ts` — MCP server entry point, tool definitions
15
+ - `src/browser.ts` — shared Playwright browser lifecycle (one browser, context-per-call)
16
+ - `src/tools/` — one file per MCP tool
17
+ - `tests/` — Playwright E2E tests (see `tests/AGENTS.md`)
18
+ - `fixtures/` — captured HTML for CI tests (see `fixtures/AGENTS.md`)
19
+ - `scripts/` — utility scripts
20
+
21
+ ## Key patterns
22
+
23
+ - Use `page.evaluate()` for DOM extraction (single pass, no per-element timeouts)
24
+ - Create a new `BrowserContext` per tool call for cookie isolation
25
+ - All URLs are resolved to absolute (`https://www.hasolidit.com/...`)
26
+ - The MCP server version is read from `package.json` at runtime
27
+
28
+ ## Commands
29
+
30
+ - `npm start` — run MCP server via stdio
31
+ - `npm test` — run Playwright tests
32
+ - `npm run lint` / `npm run lint:fix` — ESLint
33
+ - `npm run fixtures:update` — recapture HTML fixtures from live site
package/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
2
+
3
+ Copyright (c) 2026 Daniel Golub
4
+
5
+ This work is licensed under the Creative Commons Attribution-NonCommercial 4.0
6
+ International License. To view a copy of this license, visit
7
+ https://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative
8
+ Commons, PO Box 1866, Mountain View, CA 94042, USA.
9
+
10
+ You are free to:
11
+ - Share — copy and redistribute the material in any medium or format
12
+ - Adapt — remix, transform, and build upon the material
13
+
14
+ Under the following terms:
15
+ - Attribution — You must give appropriate credit, provide a link to the
16
+ license, and indicate if changes were made.
17
+ - NonCommercial — You may not use the material for commercial purposes.
18
+ - No additional restrictions — You may not apply legal terms or technological
19
+ measures that legally restrict others from doing anything the license permits.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # Hasolidit Forum MCP Server
2
+
3
+ [![CI](https://github.com/danielgolub/mcp-hasolidit/actions/workflows/ci.yml/badge.svg)](https://github.com/danielgolub/mcp-hasolidit/actions/workflows/ci.yml)
4
+ [![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC_BY--NC_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
5
+ [![Node.js](https://img.shields.io/badge/Node.js-24+-green.svg)](https://nodejs.org/)
6
+
7
+ MCP server for interacting with the [Hasolidit](https://www.hasolidit.com/kehila/) financial community forum through AI tools (Claude Desktop, Claude Code, etc.).
8
+
9
+ ## Tools
10
+
11
+ - **`search_forum`** — Search the forum. Returns titles, snippets, authors, dates, and links. Supports pagination.
12
+ - **`view_thread`** — Read a thread's posts with author, date, and full text content. Supports pagination.
13
+ - **`new_posts`** — Get the latest active threads with title, author, forum, reply/view counts, and last activity info.
14
+
15
+ ## Prerequisites
16
+
17
+ - Node.js 24+ (uses native TypeScript support)
18
+ - Playwright Chromium browser
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ git clone <repo-url>
24
+ cd hasolidit-mcp
25
+ nvm use
26
+ npm install
27
+ npx playwright install chromium
28
+ ```
29
+
30
+ ## Add to Claude Code
31
+
32
+ Add to your project's `.mcp.json` or `~/.claude/settings.json`:
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "hasolidit": {
38
+ "command": "node",
39
+ "args": ["src/index.ts"],
40
+ "cwd": "/path/to/hasolidit-mcp"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Then restart Claude Code or run `/mcp` to reload.
47
+
48
+ ## Add to Claude Desktop
49
+
50
+ Claude Desktop doesn't support `cwd`, so use absolute paths for both the Node binary and the script.
51
+
52
+ Open Settings > Developer > Edit Config and add:
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "hasolidit": {
58
+ "command": "/path/to/.nvm/versions/node/v24.x.x/bin/node",
59
+ "args": ["/path/to/hasolidit-mcp/src/index.ts"]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ Replace `/path/to/.nvm/versions/node/v24.x.x` with your actual Node 24 path (run `nvm which 24` to find it).
66
+
67
+ Then restart Claude Desktop.
68
+
69
+ ## Run tests
70
+
71
+ ```bash
72
+ npx playwright test
73
+ ```
74
+
75
+ ## Disclaimer
76
+
77
+ This project is an unofficial, independent tool that provides MCP access to the publicly available content on the [Hasolidit](https://www.hasolidit.com/) forum. It is not affiliated with, endorsed by, or associated with Hasolidit or its authors in any way.
78
+
79
+ All forum content, including posts, threads, and user-generated material, belongs to their respective authors and to Hasolidit. This tool merely provides a programmatic interface to access publicly visible information — it does not store, copy, or redistribute any content.
80
+
81
+ ## License
82
+
83
+ [CC BY-NC 4.0](LICENSE) — free to use and modify, not for commercial purposes.
@@ -0,0 +1,10 @@
1
+ import eslint from "@eslint/js";
2
+ import tseslint from "typescript-eslint";
3
+
4
+ export default tseslint.config(
5
+ eslint.configs.recommended,
6
+ ...tseslint.configs.recommended,
7
+ {
8
+ ignores: ["node_modules/", "test-results/", ".playwright-mcp/"],
9
+ }
10
+ );
@@ -0,0 +1,25 @@
1
+ # Fixtures
2
+
3
+ Captured HTML snapshots from the live Hasolidit forum, used by CI tests.
4
+
5
+ ## Updating fixtures
6
+
7
+ Always use the capture script — never edit fixture files manually:
8
+
9
+ ```bash
10
+ npm run fixtures:update
11
+ ```
12
+
13
+ This is the golden truth. The script (`scripts/capture-fixtures.ts`) opens a real browser, visits each page, waits for content to load, and saves the rendered HTML. Manual edits will be overwritten and may not reflect the real site structure.
14
+
15
+ ## Files
16
+
17
+ - `search-results.html` — search results page for a sample query
18
+ - `thread.html` — a thread with multiple posts and pages
19
+ - `new-posts.html` — the "what's new" / recent posts page
20
+
21
+ ## When to update
22
+
23
+ - When the site changes its HTML structure (tests will fail locally first)
24
+ - When adding a new tool that needs a new fixture
25
+ - Periodically to keep fixtures reasonably current