ohamlab-plugin
An independent web-data extraction service intended to connect to DeepSeek Harness (DSH) through the Model Context Protocol (MCP).
Current Tools
Tools available from OhamLab
Tool Purpose
web_search_tool Search the web
web_fetch Fetch and extract a webpage
search_and_fetch_tool Search, fetch top results, and store documents
stored_documents List saved documents
get_document Retrieve a saved document
task_history Retrieve recent task history
Initial capabilities
- Search the public web using the
ddgssearch library. - Fetch public pages with Chromium, including many JavaScript-rendered pages.
- Extract readable text and basic page metadata.
- Store documents and task history in JSON files on a mounted Hugging Face Bucket volume.
- Expose search, fetch, search-and-fetch, stored-document retrieval, and task-history MCP tools.
- Provide a Gradio UI for manual testing.
This project implements its own version of a broad search → fetch → extract → store workflow. It is not a copy of TinyFish proprietary technology and does not claim feature parity or guaranteed access to every website.
DEEPSEEK changes
Deepseek prompt
Search the web for: [YOUR_QUERY_HERE]
Use the web_search_tool with:
- query: "[YOUR_QUERY_HERE]"
- max_results: [NUMBER, optional, default 5]
web profile -> cordis.patch.yml
- insert:
- id: free-model-rahul
name: dsh-free-model-command
- insert:
- id: mcp-ohamlab
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: ohamlab
transport: streamable-http
url: 'https:/space/mcp/'
headers:
Authorization: !!js '`Bearer ${process.env.API_KEY}`'
toolCallTimeoutMs: 60000
failOnStartupError: false
reconnect:
enabled: true
initialDelayMs: 500
maxDelayMs: 30000
maxAttempts: 10
Summary of Fixes Applied
Fix 1: Configuration — /data/dsh/profiles/web/cordis.patch.yml
Authorization env var: API_KEY
MCP endpoint:
https://spaceurl
Transport: streamable-http
Fix 2: Code — /app/deepseek-harness/scripts/gen-tool-catalog.ts
Added @deepseek-ai/dsh-mcp-client entry to TOOL_PACKAGES constant
The entry includes:
pkg: @deepseek-ai/dsh-mcp-client
dir: mcp-client
source: packages/mcp-client/src/index.ts
requires: ['ctx.tools', 'ctx.systemPrompt']
writes: ['tool/call', 'tool/result']
note: Describes the six OhamLab tools and MCP endpoint
Code
ohamlab-plugin/
│
├── README.md
├── requirements.txt
├── .gitignore
├── Dockerfile
├── start.sh
│
├── app.py
│
├── config/
│ └── settings.json
│
├── mcp_server/
│ ├── __init__.py
│ ├── server.py
│ └── tools/
│ ├── __init__.py
│ └── search.py
│
├── agent/
│ ├── __init__.py
│ └── engine.py
│
├── browser/
│ ├── __init__.py
│ └── automation.py
│
├── storage/
│ ├── __init__.py
│ └── bucket.py
│
├── tests/
│ └── test_search.py
│
└── planning/
└── design.md
Run locally
Python 3.11+ is recommended.
python -m venv .venv
# Windows PowerShell: .venv\Scripts\Activate.ps1
# Linux/macOS: source .venv/bin/activate
pip install -r requirements.txt
playwright install chromium
python app.py
Open http://localhost:7860.
Hugging Face Space deployment
- Create a Docker Space and copy/sync this repository into the Space repository.
- Attach a read-write Hugging Face Bucket volume and mount it at
/data. - Set Space variable
OHAM_DATA_DIR=/data/ohamlab-plugin. - Set Space Secret
OHAM_MCP_API_KEYto a strong random token. - Rebuild the Space and verify
/healthand/mcp.
A Bucket is not automatically mounted by this application. Configure the mount in Hugging Face settings; the application writes under OHAM_DATA_DIR.
MCP endpoint
The intended endpoint is:
https://YOUR-SPACE-NAME.hf.space/mcp
The MCP server uses Streamable HTTP. Configure DSH to use a remote MCP server and send:
Authorization: Bearer YOUR_OHAM_MCP_API_KEY
The exact DSH configuration fields depend on the installed Harness version. Verify that your DSH MCP client supports remote Streamable HTTP and custom headers. Do not expose the endpoint without authentication and do not commit tokens to GitHub.
MCP tools
web_search(query, max_results=5)— find candidate pages and return URLs/snippets.web_fetch(url, save=true)— fetch and extract a page, optionally storing it.search_and_fetch(query, max_results=5, fetch_top=3)— search, fetch the top results, and persist successful extractions.stored_documents(query='', limit=10)— list saved document metadata.get_document(document_id)— retrieve the complete saved document.task_history(limit=20)— inspect recent operations.
Storage layout
$OHAM_DATA_DIR/
├── documents/<document_id>.json
└── task-history/YYYY-MM-DD.jsonl
The document ID is derived from the requested URL. Fetching the same URL updates its saved record. This initial implementation does not yet keep version history for changed content.
Security and limitations
- Only public HTTP/HTTPS URLs are intended. Basic DNS/IP checks reject obvious private destinations.
- This starter's URL checks are not a complete SSRF boundary: browser subresources, DNS rebinding, and redirect behavior need stronger isolation before accepting arbitrary untrusted URLs.
- Respect website terms, robots policies, rate limits, and applicable law.
- Do not use this service to bypass authentication or access controls.
- Search providers can throttle or change behavior.
- Browser rendering does not guarantee success on every website.
- No autonomous multi-step browser actions, scheduled monitors, or authenticated browser profiles are included in this first milestone.
Metadata
Release files for ohamlab-agent 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ohamlab_agent-0.1.1.tar.gz | 15.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ohamlab_agent-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / ohamlab_agent-0.1.1.tar.gz
| Download URL | ohamlab_agent-0.1.1.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d046823ca524bbbb016cb3bfa1e14d7d3fe4a7cdb536ac214ef538c6195a988
|
|
BLAKE2b-256 checksum How to use checksums |
718448fbe6c169a10cf79a29e93f7ab9247ebfab8cb91c5f7aff1f87d37a300d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / ohamlab_agent-0.1.1-py3-none-any.whl
| Download URL | ohamlab_agent-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7181ffbe211ef830a1a140e6d50028fcec8a0ace56dbce0445f9dee3beb489b1
|
|
BLAKE2b-256 checksum How to use checksums |
5f92b7e0e54c8da793c42818bc068f1db830d8ee04bfbd085af77d681075a9bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for ohamlab-agent 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.