
dataforseo/mcp-server-typescript 是从 https://github.com/dataforseo/mcp-server-typescript. 导入的 MCP 服务器候选
概览
dataforseo/mcp-server-typescript 是从 https://github.com/dataforseo/mcp-server-typescript. 导入的 MCP 服务器候选
概述(AI 翻译)
这是新的v3 MCP服务器。 之前的v2+ MCP服务器已被弃用,存放在dataforseo/mcp-server-typescript-deprecated。
MCP 服务器和 CLI 供 LLM 代理浏览 DataForSEO API 文档并发送认证 API 请求。默认情况下,二进制文件会在 stdio 启动 MCP 服务器;CLI 命令是可选的第二模式。
快速启动
在标准端启动MCP服务器(默认模式;设置DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD):
HTTP 传输(端口 3000;用 PORT 覆盖):
认证
OAuth 2.0(HTTP MCP 默认): 开箱即用。MCP 客户端通过受保护资源元数据发现 DataForSEO 授权服务器并发送 Authorization: Bearer 令牌。
** 备援:** 通过环境变量(HTTP Basic)实现 API 登录/密码。CLI 和标准 MCP 必备;在 HTTP 上,当没有 Authorization 头部时使用。
[DATAFORSEO_USERNAME 被接受为 DATAFORSEO_LOGIN 的别名。在 https://app.dataforseo.com/api-access. 获取 API 密钥。
MCP服务器
相同的工具实现同时驱动MCP服务器和CLI。一个二进制文件同时服务两种模式;MCP是默认配置。
二进制如何选择模式:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
DataForSEO MCP Server
This is the new v3 MCP server. The previous v2+ MCP server is deprecated and lives at dataforseo/mcp-server-typescript-deprecated.
MCP server and CLI for LLM agents to browse DataForSEO API documentation and make authenticated API requests. By default the binary starts an MCP server on stdio; CLI commands are an optional second mode.
Quick Start
Start the MCP server on stdio (default mode; set DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD):
npx dataforseo-mcp-server@latest
HTTP transport (port 3000; override with PORT):
npx dataforseo-mcp-server@latest --mode http
Authentication
OAuth 2.0 (default for HTTP MCP): works out of the box. MCP clients discover the DataForSEO authorization server via Protected Resource metadata and send Authorization: Bearer tokens.
Fallback: API login/password via environment variables (HTTP Basic). Required for CLI and stdio MCP; on HTTP it is used when no Authorization header is present.
# bash / macOS / Linux
export DATAFORSEO_LOGIN="your_api_login"
export DATAFORSEO_PASSWORD="your_api_password"
# PowerShell
$env:DATAFORSEO_LOGIN="your_api_login"
$env:DATAFORSEO_PASSWORD="your_api_password"
REM CMD
set DATAFORSEO_LOGIN=your_api_login
set DATAFORSEO_PASSWORD=your_api_password
DATAFORSEO_USERNAME is accepted as an alias for DATAFORSEO_LOGIN. Get API keys at https://app.dataforseo.com/api-access.
MCP Server
The same tool implementations power both the MCP server and the CLI. One binary serves both modes; MCP is the default.
How the binary chooses a mode:
- MCP stdio — default when no CLI command is passed
- MCP HTTP — pass
--mode http(Streamable HTTP on port 3000; override withPORT) - CLI — when the first command is
docsorrequest, or when--cli/--help/--versionis passed
MCP stdio (default):
npx dataforseo-mcp-server
MCP HTTP:
npx dataforseo-mcp-server --mode http
CLI:
npx dataforseo-mcp-server docs index
MCP client config (Cursor, Claude Desktop, and similar clients that use mcpServers):
Via URL — use the hosted remote MCP server, or start a local HTTP server (npx dataforseo-mcp-server --mode http) and point the client at it. OAuth works out of the box; env credentials are optional fallback only.
Public remote MCP server URL: https://mcp.dataforseo.com/v3/mcp
{
"mcpServers": {
"dataforseo": {
"url": "https://mcp.dataforseo.com/v3/mcp"
}
}
}
Local server (default port 3000):
{
"mcpServers": {
"dataforseo": {
"url": "http://localhost:3000/mcp"
}
}
}
安装
npx dataforseo-mcp-server // Optional additional args:
// "--docs-cache-dir D:\\my-docs-cache // "--configuration field-config.json配置
{
"mcpServers": {
"dataforseo": {
"url": "https://mcp.dataforseo.com/v3/mcp"
}
}
}