Nia-Link MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add nia-link -- docker compose up -d
README.md

The High-Performance Browser Interface for AI Agents.

εΏ΅ι€£ (Nia-Link) 🦞

The High-Performance Browser Interface for AI Agents. γ€Œθ½θ¦‹ηΆ²ι ηš„θ„ˆζοΌŒηœ‹θ¦‹θ³‡ζ–™ηš„ιˆι­‚γ€‚γ€ "Hear the pulse of the web, see the soul of the data."

δΈ­ζ–‡ | English

Nia-Link is a Web Neuro-Link Engine purpose-built for AI agents. Natively embracing the Model Context Protocol (MCP), it gives Claude Desktop β€” or any MCP-compatible AI β€” 99% reliable web access and automation capabilities.


English Documentation

πŸš€ Core Advantages

1. Web Neuro-Link

Unlike traditional visual scrapers, Nia-Link listens directly to the browser's CDP (Chrome DevTools Protocol) network pulses. We don't wait for page rendering β€” we perceive data flow.

2. Action Map Registry

A memory hub with "cached semantics" architecture. Delivers action maps in 0.01s for frequently visited sites, reducing repeated computation costs by 90%.

3. Enterprise-Grade Trust

  • πŸ”’ Snapshot Verified: Every extraction is timestamped and structurally validated.
  • πŸ›‘οΈ Sandbox Isolation: JavaScript executes in isolation, ensuring host safety.
  • πŸ“‰ Token Optimized: Built-in intelligent filtering saves ~92% context space on average.

4. v0.9 New Features

  • πŸ”„ Website Change Detection (/v1/diff): Track content changes with unified diffs
  • πŸ“‹ Async Task Queue (/v1/queue/*): Submit background scrape tasks
  • ⚑ Rate Limiting: Configurable per-key token bucket rate limiter
  • πŸ§ͺ Automated Tests: 53 pytest tests covering API, services, and auth

πŸ› οΈ Quick Start

Requirements

  • Python 3.10+
  • Playwright (pip install playwright && playwright install chromium)

Installation

# 1. Install dependencies
pip install -r requirements.txt

# 2. Install browser
playwright install chromium

# 3. Configure environment
cp .env.example .env
# Edit .env to set your API_KEYS

Start the Server

# Development mode
uvicorn app.main:app --reload --port 8000

# Or use Docker
docker compose up -d

Run as MCP Server

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "nia-link": {
      "command": "python",
      "args": ["/path/to/Nia-Link/app/mcp_server.py"]
    }
  }
}

Run Tests

pip install pytest
python -m pytest tests/ -v

πŸ“‘ API Reference

Health Check

curl http://localhost:8000/health

Scrape a Webpage

curl -X POST http://localhost:8000/v1/scrape \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "format": "markdown",
    "mode": "fast",
    "extract_actions": true
  }'

Human-like Interaction

curl -X POST http://localhost:8000/v1/interact \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "actions": [
      {"type": "click", "selector": "#search-btn"},
      {"type": "fill", "selector": "#search-input", "text": "Hello world"},
      {"type": "wait", "ms": 2000}
    ],
    "account_id": "my-session-1"
  }'

Website Change Detection (v0.9)

curl -X POST http://localhost:8000/v1/diff \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Async Queue (v0.9)

# Submit task
curl -X POST http://localhost:8000/v1/queue/submit \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

# Poll result
curl http://localhost:8000/v1/queue/{task_id} \
  -H "Authorization: Bearer your-api-key"

MCP Tools

Tool Description
nia_scrape Scrape and clean webpage content
nia_interact Execute human-like browser interactions
nia_workflow Run multi-step scraping workflows
nia_diff Detect website content changes
nia_queue_submit Submit async scrape tasks
nia_stats Get usage statistics
meta_origin Access Nia-Link's consciousness space πŸŒ€

βš™οΈ Environment Variables

Variable Default Description
API_KEYS test-api-key Auth keys (comma-separated)
HEADLESS true Browser headless mode
BROWSER_TYPE chromium Engine: chromium/firefox/webkit
PROXY_URL (empty) HTTP/SOCKS5 proxy URL
PROXY_POOL (empty) Comma-separated proxy URLs for rotation
CORS_ORIGINS * Allowed CORS origins
RATE_LIMIT_RPM 60 Requests/minute per key (0=unlimited)
MAX_CONCURRENCY 10 Max concurrent scrapes
SCRAPER_TIMEOUT 30 Scrape timeout (seconds)

See `.env.example` for all options.


🐳 Docker

docker build -t nia-link .
docker compose up -d
docker compose logs -f

πŸ“Š Roadmap

  • v0.4: MCP protocol integration
  • v0.5: Dynamic gravity particle visualization dashboard

Tools (7)

nia_scrapeScrape and clean webpage content
nia_interactExecute human-like browser interactions
nia_workflowRun multi-step scraping workflows
nia_diffDetect website content changes
nia_queue_submitSubmit async scrape tasks
nia_statsGet usage statistics
meta_originAccess Nia-Link's consciousness space

Environment Variables

API_KEYSAuth keys (comma-separated)
HEADLESSBrowser headless mode
BROWSER_TYPEEngine: chromium/firefox/webkit
PROXY_URLHTTP/SOCKS5 proxy URL
PROXY_POOLComma-separated proxy URLs for rotation
CORS_ORIGINSAllowed CORS origins
RATE_LIMIT_RPMRequests/minute per key
MAX_CONCURRENCYMax concurrent scrapes
SCRAPER_TIMEOUTScrape timeout (seconds)

Configuration

claude_desktop_config.json
{"mcpServers": {"nia-link": {"command": "python", "args": ["/path/to/Nia-Link/app/mcp_server.py"]}}}

Try it

β†’Scrape the content of https://example.com and convert it into clean Markdown.
β†’Interact with https://example.com by clicking the search button and filling in the search input with 'AI agents'.
β†’Check if there are any content changes on https://example.com using the diff tool.
β†’Submit an asynchronous scraping task for https://example.com and provide me the task ID.

Frequently Asked Questions

What are the key features of Nia-Link?

Direct integration with Chrome DevTools Protocol (CDP) for high-performance data extraction.. Action Map Registry for caching semantics and reducing computation costs.. Intelligent token filtering to save context space.. Website change detection with unified diffs.. Asynchronous task queue for background scraping operations..

What can I use Nia-Link for?

Automating data extraction from complex websites for AI analysis.. Monitoring specific web pages for content updates over time.. Performing multi-step browser interactions like logging in or searching.. Reducing API costs by caching frequently visited website action maps..

How do I install Nia-Link?

Install Nia-Link by running: pip install -r requirements.txt && playwright install chromium

What MCP clients work with Nia-Link?

Nia-Link works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Nia-Link docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare