Configuring LinkedIn Access via MCP or Jina Reader in Agent Reach
Agent Reach supports two LinkedIn backends: the full-featured linkedin-scraper-mcp server (requiring Docker/Node.js setup) and the zero-install Jina Reader fallback for public profile rendering.
Agent Reach treats LinkedIn as a tier-2 channel capable of reading profiles, companies, and job searches through two distinct backends. Configuring LinkedIn access via MCP or Jina Reader in Agent Reach depends on whether you need structured API-like data or simple HTML-to-Markdown conversion, with the system automatically selecting the appropriate backend based on availability probes.
How LinkedIn Backends Work in Agent Reach
The LinkedInChannel class in agent_reach/channels/linkedin.py implements a priority-based backend selection system. According to the source code in LinkedInChannel.check() (lines 22-41), the channel first attempts to detect a running MCP server via the mcporter CLI, then falls back to Jina Reader if that probe fails.
The probing logic relies on probe_command() defined in agent_reach/probe.py (lines 46-77), which runs external commands and classifies them as missing, broken, ok, timeout, or error. When probe_command("mcporter", ["config", "list"]) succeeds and its output contains the string "linkedin" (lines 36-38), the channel sets active_backend = "linkedin-scraper-mcp" and reports status "ok". If the probe fails, the channel defaults to "Jina Reader" and reports status "off" while remaining usable for public URL fetching.
Installing the Full LinkedIn MCP Backend
To enable full API-like access to LinkedIn profiles, companies, and job searches, you must install and configure the linkedin-scraper-mcp backend.
Prerequisites
- Python package:
pip install linkedin-scraper-mcp - Node.js toolchain: Required for the
mcporterMCP server runner - Docker (optional): For running the containerized MCP server
Step-by-Step Installation
First, install the system dependencies. Agent Reach can automate this, or you can install manually:
npm install -g mcporter
Next, start the LinkedIn MCP server. The upstream repository provides a Docker image for the simplest deployment:
docker run -d --name linkedin-mcp -p 3000:3000 stickerdaniel/linkedin-mcp-server
Alternatively, run it locally if you have the source:
mcporter serve linkedin
Finally, register the backend with mcporter so Agent Reach can discover it:
mcporter config add linkedin http://localhost:3000/mcp
Verify the configuration is registered:
mcporter config list
You should see output containing:
linkedin http://localhost:3000/mcp
Verification
Run the Agent Reach health check to confirm the MCP backend is active:
agent-reach doctor --json | jq .linkedin
Expected output when the MCP server is properly configured:
{
"status": "ok",
"message": "完整可用(Profile、公司、职位搜索)"
}
The status: "ok" value originates from LinkedInChannel.check() detecting the "linkedin" string in the mcporter command output, as implemented in agent_reach/channels/linkedin.py lines 36-38.
Using the Jina Reader Fallback
If you prefer not to run an MCP server, Agent Reach automatically falls back to Jina Reader, a hosted service that converts any public LinkedIn page to Markdown.
No installation is required for this backend. The check() method returns ("off", "...") but internally sets active_backend = "Jina Reader", allowing the CLI to fetch public LinkedIn URLs via https://r.jina.ai/URL.
To use the fallback, simply ensure the MCP server is not running or registered:
# Stop the MCP container if running
docker stop linkedin-mcp
Then read any public profile:
agent-reach read https://www.linkedin.com/in/torvalds
The output will be Markdown rendered by Jina Reader rather than structured JSON from the MCP backend.
Backend Selection Logic
The channel implementation in agent_reach/channels/linkedin.py does not expose explicit CLI flags to force a specific backend. Instead, it uses an automatic detection hierarchy:
- Primary: Probe for
mcporterCLI and "linkedin" configuration - Fallback: Jina Reader for any public URL
You control which backend is active by either enabling the MCP service (as described above) or ensuring it is unavailable (stopped container or missing configuration), which triggers the automatic fallback.
The CLI entry points in agent_reach/cli.py (around lines 96-106 in the CHANNEL_INSTALLERS dictionary) mark LinkedIn as requiring manual setup, which is why the agent-reach install --channels=linkedin command prints guidance rather than fully automating the configuration.
Summary
- Agent Reach supports two LinkedIn backends:
linkedin-scraper-mcp(full access) and Jina Reader (fallback). - MCP backend requires
pip install linkedin-scraper-mcp,npm install -g mcporter, and a running Docker container or local server on port 3000. - Registration happens via
mcporter config add linkedin http://localhost:3000/mcp. - Detection occurs in
LinkedInChannel.check()at lines 22-41 ofagent_reach/channels/linkedin.py, which probes themcporterCLI usingprobe_command()fromagent_reach/probe.py. - Jina Reader requires no installation and activates automatically when the MCP backend is unavailable.
- Verification uses
agent-reach doctor --jsonto reportstatus: "ok"for MCP or"off"for the fallback.
Frequently Asked Questions
What is the difference between the MCP backend and Jina Reader in Agent Reach?
The MCP backend (linkedin-scraper-mcp) provides structured API-like access to LinkedIn profiles, companies, and job searches, returning JSON data that downstream agents can parse programmatically. Jina Reader simply fetches the public HTML of a LinkedIn page and converts it to Markdown, which is suitable for quick browsing or LLM prompting but lacks structured data fields.
Why does agent-reach doctor report status "off" for LinkedIn?
A status of "off" indicates that the mcporter probe in LinkedInChannel.check() failed to detect a configured LinkedIn MCP server. This occurs when the mcporter CLI is not installed, the server is not running, or the configuration lacks a "linkedin" entry. The channel will still function using the Jina Reader fallback for public URLs, but you will not have access to the advanced scraping capabilities.
Can I force Agent Reach to use Jina Reader instead of the MCP backend?
There is no explicit CLI flag to force a specific backend. To use Jina Reader, ensure the MCP backend is unavailable by stopping the Docker container (docker stop linkedin-mcp) or removing the configuration (mcporter config remove linkedin). When the probe fails, the channel automatically selects Jina Reader as the active backend.
Where is the LinkedIn channel configuration stored in the codebase?
The channel logic resides in agent_reach/channels/linkedin.py, which defines the LinkedInChannel class and its check() method. The generic command probing utility is in agent_reach/probe.py (lines 46-77). The CLI installer logic that marks LinkedIn as requiring manual setup is in agent_reach/cli.py within the CHANNEL_INSTALLERS dictionary around lines 96-106.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →