DataForSEO TypeScript MCP Server
A TypeScript implementation of the DataForSEO MCP Server, designed for deployment to Netlify.
Features
- TypeScript implementation of MCP Server
- Supports Bearer Authentication
- Designed for serverless deployment on Netlify
- Provides tools for DataForSEO APIs:
- Keywords Data API
- DataForSEO Labs API
- SERP API
Development
Prerequisites
- Node.js 16+
- npm
Setup
- Clone the repository
- Install dependencies:
npm install
- Create a
.envfile with your DataForSEO credentials:
DATAFORSEO_LOGIN=your_login
DATAFORSEO_PASSWORD=your_password
Running Locally
Start the local development server:
npm run dev
This will start the server at http://localhost:8888. Connect your MCP client to http://localhost:8888/sse.
Authentication
The server supports two authentication methods:
-
Environment Variables: Set
DATAFORSEO_LOGINandDATAFORSEO_PASSWORDin your environment. -
Bearer Authentication: Use a Bearer token in your requests with one of these formats:
- Base64-encoded JSON:
Bearer eyJsb2dpbiI6InlvdXJfbG9naW4iLCJwYXNzd29yZCI6InlvdXJfcGFzc3dvcmQifQ== - Simple colon-separated:
Bearer your_login:your_password
- Base64-encoded JSON:
Deployment to Netlify
Manual Deployment
- Build the project:
npm run build
- Deploy to Netlify:
npx netlify deploy --prod
Automated Deployment
Connect your repository to Netlify for automatic deployments on push.
Using with n8n
To use this MCP server with n8n:
- Deploy the server to Netlify
- In n8n, add an MCP-compatible node
- Set the MCP Server URL to your Netlify deployment URL (
https://your-site.netlify.app/sse) - Set the Authentication to Bearer Token and use the format
your_login:your_password
Available Tools
The server provides tools for accessing DataForSEO APIs:
search_volume- Get search volume data for keywordskeywords_for_site- Get keywords for a specific websitekeywords_for_keywords- Get related keywords for seed keywordsad_traffic_by_keywords- Get ad traffic data for keywordsgoogle_trends_data- Get Google Trends data for keywordskeyword_suggestions- Get keyword suggestions- ... and more tools for SERP and Labs APIs
License
ISC
