# How to Configure LinkedIn Access Through the LinkedIn-MCP Server in Agent Reach

> Learn to configure LinkedIn access in Agent Reach using the linkedin-mcp server. Install the wrapper, run the server locally, and register the endpoint for seamless integration. Verify LinkedIn access easily.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: how-to-guide
- Published: 2026-06-20

---

**Configure LinkedIn access in Agent Reach by installing the `linkedin-scraper-mcp` Python wrapper, running the Node.js `linkedin-mcp-server` locally on port 3000, and registering the endpoint via `mcporter config add linkedin http://localhost:3000/mcp`, then verify with `python -m agent_reach.cli doctor`.**

Agent Reach integrates with LinkedIn through a modular MCP (Micro-Content-Provider) architecture that delegates scraping tasks to a local Node.js server. To configure LinkedIn access through the linkedin-mcp server in Agent Reach, you must bridge the Python channel logic with the external MCP server using the `mcporter` CLI configuration tool.

## Prerequisites and Installation

### Install the Python Wrapper (linkedin-scraper-mcp)

The Agent Reach channel requires the `linkedin-scraper-mcp` package to communicate with the MCP backend.

```bash
pip install linkedin-scraper-mcp

```

### Install the Node.js MCP Server and mcporter CLI

The actual LinkedIn scraping logic runs in a separate Node.js process. Install both the server and the configuration CLI globally.

```bash
npm install -g mcporter
npm install -g linkedin-mcp-server

```

## Configuring the LinkedIn-MCP Server Connection

### Start the Local MCP Server

Launch the `linkedin-mcp-server` locally. By default, it listens on port 3000.

```bash
linkedin-mcp-server &

# Or if running from source: node path/to/server.js

```

### Register the Endpoint with mcporter

The `LinkedInChannel` class in [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py#L22-L42) relies on the `mcporter` CLI to locate the MCP server. Register the local endpoint to establish the connection:

```bash
mcporter config add linkedin http://localhost:3000/mcp

```

This command creates the configuration entry that the health check probes when validating the backend.

## Verification and Health Checks

### Understanding the Channel Detection Logic

In [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py), the `LinkedInChannel.can_handle()` method (L18-L21) identifies LinkedIn URLs by pattern matching. Once a URL is detected, the `check()` method probes the backend status through the `probe_command` helper defined in [`agent_reach/probe.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/probe.py#L47-L55).

The health check executes `mcporter config list` to verify the server is registered. If the output contains the word "linkedin", the channel sets `active_backend = "linkedin-scraper-mcp"` and marks the integration as active.

### Running the Doctor Command

Execute the built-in diagnostics to confirm the integration is functional:

```bash
python -m agent_reach.cli doctor

```

Successful output shows `LinkedIn: ok` with availability notes indicating that profile, company, and job search functionality is fully available.

## Fetching LinkedIn Data in Python

Once configured, the `AgentReach` core router in [`agent_reach/core.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/core.py) automatically forwards LinkedIn URLs to the active MCP backend.

```python
from agent_reach.core import AgentReach

ar = AgentReach()
profile = ar.read("https://www.linkedin.com/in/username/")
print(profile)  # Returns JSON with profile data

```

## Troubleshooting Common Issues

If `mcporter` is missing from your system PATH, the `LinkedInChannel` reports "off" and prompts to install `linkedin-scraper-mcp`. If the binary exists but cannot execute (indicating a broken virtual environment), the health check returns a specific venv error hint. Always verify the Node.js server is running on the configured port before executing the doctor command.

## Summary

- **Install dependencies**: `linkedin-scraper-mcp` (Python) and `linkedin-mcp-server` (Node.js).
- **Configure mcporter**: Run `mcporter config add linkedin http://localhost:3000/mcp` to point to your local MCP server.
- **Verify health**: Use `python -m agent_reach.cli doctor` to confirm the `LinkedInChannel` detects the backend in [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py).
- **Access data**: The `AgentReach` class in [`agent_reach/core.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/core.py) routes LinkedIn URLs through the validated MCP connection.

## Frequently Asked Questions

### What is the difference between linkedin-scraper-mcp and linkedin-mcp-server?

The `linkedin-scraper-mcp` package is a Python wrapper that Agent Reach uses to communicate with the MCP protocol, while `linkedin-mcp-server` is the actual Node.js implementation that performs the LinkedIn scraping. Agent Reach requires both: the Python wrapper provides the channel interface, and the Node.js server provides the data extraction logic.

### Why does the doctor command report LinkedIn as "off" even after installation?

This occurs when `mcporter` cannot find a configuration entry for LinkedIn. Run `mcporter config list` manually; if "linkedin" is missing, re-run `mcporter config add linkedin http://localhost:3000/mcp`. Also ensure the Node.js server is actually running on the specified port before executing the health check.

### Can I run the MCP server on a port other than 3000?

Yes, but you must update the mcporter configuration accordingly. When starting the server on a custom port, use `mcporter config add linkedin http://localhost:<custom_port>/mcp` to ensure the `LinkedInChannel.check()` method in [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py) can locate the endpoint during its probe routine.

### How does Agent Reach determine if a URL should be handled by the LinkedIn channel?

The `LinkedInChannel.can_handle()` method in [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py#L18-L21) inspects the URL pattern. If the domain matches LinkedIn, the channel claims responsibility, and the core router in [`agent_reach/core.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/core.py) forwards the request to the active MCP backend configured via `mcporter`.