Metadata-Version: 2.4
Name: linkguard-mcp
Version: 0.1.0
Summary: MCP server that gives Claude Desktop / Claude Code access to LinkGuard backlink-analysis tools.
Author-email: LinkGuard <hello@linkguard.ai>
License: MIT
Project-URL: Homepage, https://linkguard.ai
Project-URL: Documentation, https://linkguard.ai/mcp
Project-URL: API keys, https://linkguard.ai/dashboard/api-keys
Keywords: mcp,backlink,seo,linkguard,redirect
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastmcp<4.0,>=3.3.0
Requires-Dist: httpx<1.0,>=0.27.0
Dynamic: license-file

<!-- mcp-name: ai.linkguard/linkguard-mcp -->

# linkguard-mcp

A stdio MCP server that gives Claude Desktop and Claude Code access to
[LinkGuard](https://linkguard.ai) backlink-analysis tools.

## What it does

The server exposes three tools:

| Tool | What it checks |
|---|---|
| `redirect_check` | Traces the full redirect chain of a URL — every HTTP hop, flags (loops, meta-refresh, JS redirect), and the SEO impact on link equity. |
| `backlink_index_check` | Checks whether a donor page is in Google's index (INDEXED / NOT_INDEXED / UNKNOWN) and returns the SERP title + description when available. |
| `backlink_health_snapshot` | Full health audit for one backlink: live status, dofollow/nofollow, indexed in Google, canonical integrity, and a scored verdict with recommendations. May use a real cloud browser for JS-heavy donors (costs 5 tokens). |

All three tools require a LinkGuard API key and call the hosted API at
`https://linkguard.ai`. No data is stored locally.

## Getting an API key

1. Create a free account at https://linkguard.ai
2. Make **one paid top-up** (any amount) — this is a one-time gate that
   unlocks MCP access. Redirect-check and index-check are then free per call.
   Backlink-health costs 5 tokens only when a JS-rendered page is encountered.
3. Go to **Dashboard → API Keys** and create a key. Keys start with `lg_`.

## Claude Desktop setup

Add this to your Claude Desktop config file
(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,
`%APPDATA%\Claude\claude_desktop_config.json` on Windows):

```json
{
  "mcpServers": {
    "linkguard": {
      "command": "uvx",
      "args": ["linkguard-mcp"],
      "env": {
        "LINKGUARD_API_KEY": "lg_your_key_here"
      }
    }
  }
}
```

Restart Claude Desktop after saving. You should see LinkGuard listed in the
tools panel.

## Claude Code setup

```bash
claude mcp add linkguard -- uvx linkguard-mcp
```

Then set your API key in the environment before starting a session:

```bash
export LINKGUARD_API_KEY=lg_your_key_here
```

Or add it to your shell profile so it is always available.

## Environment variables

| Variable | Required | Default | Description |
|---|---|---|---|
| `LINKGUARD_API_KEY` | Yes | — | Your `lg_...` API key from the dashboard. |
| `LINKGUARD_API_URL` | No | `https://linkguard.ai` | Override the API base URL (for self-hosted or staging). |

## Manual run (for testing)

```bash
LINKGUARD_API_KEY=lg_your_key_here uvx linkguard-mcp
```

Or after installing locally:

```bash
pip install -e .
LINKGUARD_API_KEY=lg_your_key_here linkguard-mcp
```

## License

MIT
