# SDKs & Libraries

Accelerate your development with our official libraries and agent-ready integrations. Geo-targeted endpoints accept deterministic `location_code` inputs, and async jobs can always be polled via `getJob()`.

Want the packaging by runtime instead of by library? Browse the [integration guides](https://www.agentseo.dev/integrations) for n8n, Make, Claude Code, and OpenClaw.

## Node.js SDK

Fully typed SDK for Node.js (ESM). Best for backend services, workers, Next.js apps, and programmatic SEO pipelines.

Current first-class methods include `localAudit`, `contentGap`, `search`, `analyzeSerp`, `aiOverviewExtract`, `localVisibilityTrack`, `llmMentionsTrack`, `contentDecayDetect`, `keywordClusterBuild`, `getJob`, and `waitForJob`. For endpoints not yet wrapped, call the REST API directly.

Installation

npm i @agentseo/sdk

Source

[View on GitHub](https://github.com/AgentSEO-dev/agentseo/tree/main/packages/js-sdk)

Code example

```
import { AgentSEO } from "@agentseo/sdk";

const client = new AgentSEO({
  apiKey: process.env.AGENTSEO_API_KEY!,
  projectId: "client-alpha",
  workflowId: "nightly-refresh",
});

const job = await client.analyzeSerp({
  keyword: "seo agency austin",
  location: "Austin, TX",
  location_code: 1026201
});

const status = await client.waitForJob(job.jobId, {
  timeoutMs: 90_000,
});

if (status.status === "failed") {
  throw new Error(status.error?.message || "Job failed");
}

console.log(status.result);
```

## Python SDK

Official Python client for data science and backend workflows.

The Python SDK mirrors the same core workflow set as the Node SDK and adds `get_job` plus `wait_for_job` for async handling.

Installation

pip install agentseo-sdk

Source

[View on GitHub](https://github.com/AgentSEO-dev/agentseo/tree/main/packages/python-sdk)

Code example

```
from agentseo_sdk import AgentSEOClient

client = AgentSEOClient(
    api_key="sk_live_...",
    project_id="client-alpha",
    workflow_id="nightly-refresh",
)

job = client.content_gap(
    url="https://example.com/blog/post",
    keyword="seo agency austin",
    location="Austin, TX",
    location_code=1026201,
)

status = client.wait_for_job(
    job["jobId"],
    timeout_seconds=90,
)

if status["status"] == "failed":
    raise RuntimeError(status["error"]["message"])

print(status["result"])
```

## MCP Server

Model Context Protocol server for Claude Desktop and Cursor. Use the hosted endpoint when you want zero local install, or keep the local package when you want the MCP process on your own machine.

For runtime-specific guidance, see the [Claude Code integration page](https://www.agentseo.dev/integrations/claude-code) or the [Claude Desktop integration page](https://www.agentseo.dev/integrations/claude-desktop).

Hosted MCP (Claude Code)

Code example

```
claude mcp add --transport http agentseo https://www.agentseo.dev/mcp \
  --header "Authorization: Bearer sk_live_..." \
  --header "x-project-id: client-alpha" \
  --header "x-workflow-id: nightly-refresh"
```

Hosted MCP (Cursor)

Code example

```
{
  "mcpServers": {
    "agentseo": {
      "url": "https://www.agentseo.dev/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_...",
        "x-project-id": "client-alpha",
        "x-workflow-id": "nightly-refresh"
      }
    }
  }
}
```

Local MCP package

Code example

```
{
  "mcpServers": {
    "agentseo": {
      "command": "npx",
      "args": ["-y", "@agentseo/mcp-server"],
      "env": {
        "AGENTSEO_API_KEY": "sk_live_...",
        "AGENTSEO_API_URL": "https://www.agentseo.dev/api/v1",
        "AGENTSEO_PROJECT_ID": "client-alpha",
        "AGENTSEO_WORKFLOW_ID": "nightly-refresh"
      }
    }
  }
}
```

Hosted MCP requires a server-side API key with no allowed domains. If you restrict a key to browser origins, use the local MCP package instead.

[Read full MCP setup guide](https://github.com/AgentSEO-dev/agentseo/tree/main/packages/mcp-server)

## ACP Adapter

For OpenClaw, prefer the first-party AgentSEO plugin. Use the ACP adapter when you need to import AgentSEO tools into a custom ACP-compatible runtime.

This package is published by AgentSEO. The docs do not claim upstream OpenClaw-maintainer approval. See the [OpenClaw integration page](https://www.agentseo.dev/integrations/openclaw) for positioning and setup guidance.

OpenClaw Plugin

openclaw plugins install @agentseo/openclaw-plugin --pin

OpenClaw Allowlist

Code example

```
{
  "agents": {
    "list": [
      {
        "id": "seo",
        "tools": {
          "allow": [
            "agentseo_local_audit",
            "agentseo_content_gap",
            "agentseo_ai_overview_extract",
            "agentseo_local_visibility_track",
            "agentseo_rank_track",
            "agentseo_job_status"
          ]
        }
      }
    ]
  }
}
```

[Read OpenClaw / ACP docs](https://github.com/AgentSEO-dev/agentseo/tree/main/packages/openclaw-plugin)

### Need full endpoint coverage?

Use the API reference for routes not yet wrapped by the official SDK methods, or call the REST API directly from your runtime.

[API Reference](https://www.agentseo.dev/docs/api-reference)

[n8n guide](https://www.agentseo.dev/integrations/n8n)[Make guide](https://www.agentseo.dev/integrations/make)[Claude Code guide](https://www.agentseo.dev/integrations/claude-code)[Claude Desktop guide](https://www.agentseo.dev/integrations/claude-desktop)[OpenClaw guide](https://www.agentseo.dev/integrations/openclaw)

---
Canonical HTML: https://www.agentseo.dev/docs/sdks
Markdown: https://www.agentseo.dev/docs/sdks/index.md
