npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@socialrouter/mcp

v0.11.2

Published

MCP server for SocialRouter, let LLM agents extract social media data

Readme

SocialRouter MCP Server

An MCP server that exposes the SocialRouter API to LLM agents. Plug it into Claude Desktop, Claude Code, Cursor, or any MCP-compatible client to let the agent fetch social media data through a single unified API.

Supported platforms include LinkedIn, Instagram, X, Reddit, Facebook, TikTok, YouTube, Pinterest, Bluesky, Snapchat, and Google Maps.

Configuration

Get an API key at socialrouter.io, then wire the server into your client. Step-by-step guides, with the config paths and the verification step for each host:

| Client | Guide | | --- | --- | | Claude Code | docs.socialrouter.io/mcp/claude-code | | Claude Desktop | docs.socialrouter.io/mcp/claude-desktop | | Cursor | docs.socialrouter.io/mcp/cursor | | Codex CLI | docs.socialrouter.io/mcp/codex | | VS Code | docs.socialrouter.io/mcp/vscode | | Gemini CLI | docs.socialrouter.io/mcp/gemini-cli | | Anything else | docs.socialrouter.io/mcp/other-clients |

Claude Code

claude mcp add socialrouter --scope user \
  --env SOCIALROUTER_API_KEY=sr_live_xxxxxxxxxxxxx \
  -- npx -y @socialrouter/mcp

Claude Desktop

Open the Claude menu in the system menu bar → Settings… → Developer → Edit Config. That opens (or creates) claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "socialrouter": {
      "command": "npx",
      "args": ["-y", "@socialrouter/mcp"],
      "env": {
        "SOCIALROUTER_API_KEY": "sr_live_xxxxxxxxxxxxx"
      }
    }
  }
}

Quit Claude Desktop completely and reopen it, then check the + button in the chat box → Connectors → Manage connectors.

Cursor

Add the same mcpServers block to ~/.cursor/mcp.json (or .cursor/mcp.json in a project), then enable the server from Cursor's MCP settings.

How it works

The server is a thin, stateless wrapper over the API, built around services of the form <platform>/<service> (e.g. linkedin/profile.info, reddit/subreddit.posts). The agent discovers what exists with list_services, then calls run with the chosen service and its inputs. The MCP does no URL detection and no routing — picking the right service is the agent's job, and the catalog gives it everything it needs: the input kind (URLs or free-text queries), the accepted URL shapes with concrete examples, the typed options, and the offers behind the service with their price and batch cap.

Which offer serves a run (apify/harshmaur, brightdata/reddit…) is the router's call: it walks the failover chain, cheapest first, and the response's served_by says which one answered. An agent can pin one with provider, but pinning disables failover — omitting it is the better default.

Every call is validated against the live catalog (GET /v1/services) before the request is sent:

  • the service parameter is an enum of the services live at startup, so the agent cannot invent one;
  • at call time the service is re-checked against the refreshed catalog (5-minute TTL), the batch size against the relevant cap (the pinned offer's, or the largest in the chain), and a pinned offer against the ones that actually serve that service;
  • validation failures return corrective errors listing the valid alternatives instead of a bare 4xx.

The catalog is fetched once at startup — if it cannot be loaded the server exits, since an unreachable catalog means the API itself is unreachable — and refreshed lazily afterwards; if a refresh fails, the last known catalog keeps being served.

Tools

| Tool | Description | |---|---| | list_services | One row per live <platform>/<service>: input kind, accepted input shapes with examples, typed options, and the offers behind it (failover order, price per record, batch cap). Filter by platform and/or service. | | run | Run a service over one or more inputs (URLs or queries, per the service's input kind). | | get_extraction | Retrieve a past run by ID. | | get_account | Credit balance, usage summary (by offer and platform) over the last N days (max 365), and the billing mode: own provider keys vs SocialRouter credits, per source. Read-only — provider keys are registered in the dashboard or with socialrouter credentials set, never through the MCP, so a token never passes through the agent's context. |

run parameters

| Param | Description | |---|---| | service | Required. <platform>/<service> slug from list_services, e.g. reddit/subreddit.posts. | | inputs | Required. URLs (url-kind services) or search queries (query-kind services), all for the service's platform. | | provider | Optional, advanced. Pin one offer, e.g. apify/harshmaur. Disables failover. | | limit | Optional. Max records to return (default 100, max 250). | | options | Optional, unless the service declares a required option (e.g. location on linkedin/job.search). Typed options declared by the service (see options in list_services). Unknown keys are rejected with a corrective error. |

Typical flow

  1. list_services with platform: "linkedin" → see what LinkedIn data is available, in what shape, and at what price.
  2. run with service: "linkedin/profile.info" and inputs: ["https://www.linkedin.com/in/..."].
  3. Read served_by in the result to know which offer answered, and billed_as to know who paid.

When the API refuses a call, the tool error carries its message plus the structured fields that fix it (valid_options, allowed_values, invalid_inputs, did_you_mean…), the id of a failed run, and on a rate limit how many seconds to wait.

Environment Variables

| Variable | Required | Default | |---|---|---| | SOCIALROUTER_API_KEY | yes | — | | SOCIALROUTER_BASE_URL | no | https://api.socialrouter.io |

Create a key at socialrouter.io/dashboard/keys. If the key is missing, invalid or revoked, the server says so and points there — at startup on stderr, and in the tool result if the key is rejected while running.

License

MIT