home / mcp / linkedin ads mcp server

LinkedIn Ads MCP Server

This read-only MCP Server allows you to connect to LinkedIn Ads data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-linkedin-ads-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "/PATH/TO/CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/Salesforce.prp"
      ]
    }
  }
}

You can query live LinkedIn Ads data through a local MCP server that exposes the data via a simple, read-only API. This lets your AI client ask natural-language questions and retrieve up-to-date results without writing SQL. The setup wraps the CData JDBC Driver for LinkedIn Ads and serves data through MCP, making it easy to integrate LinkedIn Ads into your AI workflows.

How to use

After you start the MCP server, you can ask your AI client to read data from LinkedIn Ads and perform read-only queries. You will be able to retrieve lists of tables, inspect column definitions, and run SELECT queries against the LinkedIn Ads data through the provided tools. Typical use cases include checking campaign performance, querying open opportunities, or analyzing ad metrics across accounts. The server exposes three core tools conceptually named using your server prefix: get_tables, get_columns, and run_query. Use the AI client to invoke these tools implicitly by asking questions like: “Show me LinkedIn Ads campaigns by status” or “What is the click-through rate by campaign in the last 30 days?” You do not need to write SQL for everyday questions; the client will translate your natural-language queries into the underlying MCP tool calls.

How to install

# Prerequisites
Java JDK 8+ and Maven

# 1. Clone the project
git clone https://github.com/cdatasoftware/linkedin-ads-mcp-server-by-cdata.git
cd linkedin-ads-mcp-server-by-cdata

# 2. Build the server
mvn clean install
# This creates the JAR file: CDataMCP-jar-with-dependencies.jar

# 3. Install the CData JDBC Driver for LinkedIn Ads
# Download from:
# https://www.cdata.com/drivers/linkedinads/download/jdbc

# 4. License the JDBC Driver
# Windows example location; use the path that matches your install
# Navigate to the lib folder in the installation directory
# Run the license command
java -jar cdata.jdbc.linkedinads.jar --license
# Enter your name, email, and either TRIAL or your license key when prompted

# 5. Configure your connection (example shown)
# Run the Connection String utility to create and test a connection string
java -jar cdata.jdbc.linkedinads.jar
# Configure the connection string and click Test Connection
# If OAuth is needed, complete authentication in your browser
# Copy the resulting connection string for later use

# 6. Create a .prp file for your JDBC connection
# Example: linkedin-ads.prp
```

```
Prefix=linkedinads
ServerName=CDataLinkedInAds
ServerVersion=1.0
DriverPath=PATH\TO\cdata.jdbc.linkedinads.jar
DriverClass=cdata.jdbc.linkedinads.LinkedInAdsDriver
JdbcUrl=jdbc:linkedinads:InitiateOAuth=GETANDREFRESH;
Tables=
```

# 7. Run the MCP server
# Start the server with the created .prp file
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/Salesforce.prp
```

Note: The command above uses Salesforce.prp as an example; replace with linkedin-ads.prp if you named your file linkedin-ads.prp.

Additional configuration and usage notes

Configure your Claude Desktop or other MCP client to load the local MCP server. You will create a client config that points to the local stdio MCP server, using the Java process you started as the backend. When you launch the client, it will discover the available tools (get_tables, get_columns, run_query) for your LinkedIn Ads data and present them as actions you can invoke in natural language.

Troubleshooting

If you cannot see the MCP server in your client, ensure you fully exit and restart the client after starting the server. Verify that the JDBC driver is licensed and that the connection string you created is correct. If data retrieval fails, double-check the connection string and test the JDBC connection again. If issues persist, contact CData Support or join the CData Community for help.

Tools & Descriptions

The MCP server exposes tools built around the LinkedIn Ads data. The following tool patterns are available (where {servername} is your server prefix):
- {servername}_get_tables — Retrieves a CSV list of available tables. The first line contains column headers.
- {servername}_get_columns — Retrieves a CSV list of columns for a specified table. The first line contains column headers.
- {servername}_run_query — Executes a SQL SELECT query against the data source.

JSON-RPC Request Examples

# Example tool invocation payloads
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {"name": "source_get_tables", "arguments": {}}
}
```
```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "source_get_columns",
    "arguments": {"table":  "Account"}
  }
}
```
```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "source_run_query",
    "arguments": {
      "sql":  "SELECT * FROM [Account] WHERE [IsDeleted] = true"
    }
  }
}
`

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For full terms, refer to the LICENSE file in the project.

Available tools

linkedinads_get_tables

Retrieves a list of available tables from the LinkedIn Ads data source. Output is CSV with a header row.

linkedinads_get_columns

Retrieves a list of columns for a specified table. Output is CSV with a header row.

linkedinads_run_query

Executes a SQL SELECT query against the LinkedIn Ads data and returns the results.