Bing网站管理员工具的MCP服务器
](https://badge.fury.io/js/@isiahw1%2Fmcp-server-bing-webmaster)   ](https://nodejs.org/)
MCP(模型上下文协议)服务器,通过Claude和其他兼容MCP的AI助手提供对Bing网站管理员工具功能的访问。
🚀 快速开始
对于Claude Code用户:
# Add the MCP server with your API key
claude mcp add bing-webmaster -e BING_WEBMASTER_API_KEY=your_api_key_here -- npx -y @isiahw1/mcp-server-bing-webmaster@latest
# Launch Claude Code
claude对于Claude桌面用户:
添加到您的配置(设置→ 开发者→ 编辑配置):
{
"mcpServers": {
"bing-webmaster": {
"command": "npx",
"args": ["-y", "@isiahw1/mcp-server-bing-webmaster@latest"],
"env": {
"BING_WEBMASTER_API_KEY": "your_api_key_here"
}
}
}
}从Bing网站管理员工具获取API密钥 → 设置→ API访问
目录
- 克劳德代码 (详细指南) - 克劳德桌面版 (详细指南) - 光标 - 帆板运动 - 开发设置
特性
- 🚀 API直接集成:简单可靠地访问Bing网站管理员工具
- 📊 全面功能:站点管理、流量分析、爬网数据等
- 🛡️ 错误处理:强大的错误处理和详细的日志记录
- 🎯 符合MCP标准:与模型上下文协议完全兼容
- 📈 功能丰富:URL提交、关键字分析、站点地图管理等
安装
先决条件
- Node.js 16+(适用于npm/npx)
- Python 3.10+(python.org)
- 必应网站管理员API密钥(获取API密钥)
快速开始
使用此MCP服务器的最简单方法是通过npx(无需安装):
npx @isiahw1/mcp-server-bing-webmaster@latest全局安装(可选)
npm install -g @isiahw1/mcp-server-bing-webmaster开发安装
对于贡献者和开发者:
git clone https://github.com/isiahw1/mcp-server-bing-webmaster.git
cd mcp-server-bing-webmaster
uv pip install -e .配置
1.获取Bing网站管理员API密钥
- 登录 Bing网站管理员工具
- 转到“设置”→ API访问
- 生成API密钥
2.客户端设置说明
Claude Code (Command Line)
选项1:快速设置(推荐)
# Add the MCP server with inline API key
claude mcp add bing-webmaster -e BING_WEBMASTER_API_KEY=your_api_key_here -- npx -y @isiahw1/mcp-server-bing-webmaster@latest
# Launch Claude Code
claude选项2:使用系统环境变量
# Set your API key
export BING_WEBMASTER_API_KEY="your_api_key_here"
# Add the MCP server
claude mcp add bing-webmaster -- npx -y @isiahw1/mcp-server-bing-webmaster@latest
# Launch Claude Code
claude选项3:使用环境文件
# Create .env file
echo "BING_WEBMASTER_API_KEY=your_api_key_here" > .env
# Add the MCP server
claude mcp add bing-webmaster -- npx -y @isiahw1/mcp-server-bing-webmaster@latest
# Launch Claude Code
claude故障排除
如果遇到问题,请使用调试模式运行:
claude --mcp-debugClaude Desktop
- 打开克劳德桌面
- 首选
Claude → Settings - 选择
Developer从侧边栏 - 点击
Edit Config - 将以下内容添加到您的配置中:
{
"mcpServers": {
"bing-webmaster": {
"command": "npx",
"args": ["-y", "@isiahw1/mcp-server-bing-webmaster@latest"],
"env": {
"BING_WEBMASTER_API_KEY": "your_api_key_here"
}
}
}
}- 保存文件并重新启动Claude Desktop
配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Cursor
- 启动光标
- 打开
Cursor → Settings → Cursor Settings - 选择
MCP在左侧边栏中 - 点击
Add new global MCP server - 粘贴此配置:
{
"mcpServers": {
"bing-webmaster": {
"command": "npx",
"args": ["-y", "@isiahw1/mcp-server-bing-webmaster@latest"],
"env": {
"BING_WEBMASTER_API_KEY": "your_api_key_here"
}
}
}
}- 重新启动游标
Windsurf
- 开放式风帆
- 导航到“设置”→ MCP配置
- 添加以下配置:
{
"mcpServers": {
"bing-webmaster": {
"command": "npx",
"args": ["-y", "@isiahw1/mcp-server-bing-webmaster@latest"],
"env": {
"BING_WEBMASTER_API_KEY": "your_api_key_here"
}
}
}
}- 重新启动Windsurf
Development Setup (Local Installation)
对于使用源代码的开发人员:
# Clone the repository
git clone https://github.com/isiahw1/mcp-server-bing-webmaster.git
cd mcp-server-bing-webmaster
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv pip install -e .Claude桌面开发配置
{
"mcpServers": {
"bing-webmaster-dev": {
"command": "uv",
"args": ["run", "python", "-m", "mcp_server_bwt"],
"cwd": "/path/to/mcp-server-bing-webmaster",
"env": {
"BING_WEBMASTER_API_KEY": "your_api_key_here"
}
}
}
}Claude开发代码配置
# Set environment variable
export BING_WEBMASTER_API_KEY="your_api_key_here"
# Run from the project directory
cd /path/to/mcp-server-bing-webmaster
claude mcp add bing-webmaster-dev -- uv run python -m mcp_server_bwt3.验证安装
配置后,您应该能够:
- 请参阅您的MCP服务器列表中的“bing站长”
- 使用“在Bing网站管理员工具中显示我的所有网站”等命令
- 访问所有Bing网站管理员工具功能
故障排除
“无法连接到MCP服务器”错误:
- 检查您的API密钥是否正确
- 确保您有互联网连接
- 对于Claude Desktop:在设置中检查日志→ 开发者→ 打开日志文件夹
- 对于Claude代码:运行
claude --mcp-debug
“spawn-mcp服务器bing网站管理员ENOENT”错误:
- 确保您正在使用
npx作为命令,不是mcp-server-bing-webmaster - 如果您有旧的全局安装,请卸载它:
npm uninstall -g @isiahw1/mcp-server-bing-webmaster
可用工具
站点管理
get_sites-列出您帐户中所有经过验证的网站add_site-将新网站添加到Bing网站管理员工具verify_site-验证网站的所有权remove_site-从您的帐户中删除网站get_site_roles-获取有权访问该网站的用户列表add_site_roles-将站点访问权限委托给其他用户
流量分析
get_query_stats-获取搜索查询性能数据get_page_stats-获取页面级流量统计信息get_rank_and_traffic_stats-获取总体排名和流量数据get_query_page_stats-获取特定查询的详细流量统计信息get_query_page_detail_stats-获取特定查询页面组合的统计信息get_url_traffic_info-获取特定URL的流量信息
爬行和索引
get_crawl_stats-查看爬网统计数据和机器人活动get_crawl_issues-获取爬网错误和问题get_crawl_settings-获取网站的爬网设置update_crawl_settings-更新爬网设置(慢速/正常/快速)get_url_info-获取特定URL的详细索引信息
网址管理器
submit_url-提交一个URL进行索引submit_url_batch-一次提交多个URLget_url_submission_quota-检查您的URL提交限制
内容提交
submit_content-直接提交页面内容,无需爬行get_content_submission_quota-获取内容提交配额信息
网站地图和订阅源
submit_sitemap-提交新的站点地图remove_sitemap-删除站点地图get_feeds-获取网站的所有RSS/Atom提要
关键词分析
get_keyword_data-获取特定关键字的详细数据get_related_keywords-查找相关搜索词get_keyword_stats-获取特定关键字的历史统计数据
链接分析
get_link_counts-获取入站链接统计信息get_url_links-获取特定网站URL的入站链接(需要链接和页面参数)add_connected_page-添加一个链接到您网站的页面
内容阻止
get_blocked_urls-查看被阻止的URLadd_blocked_url-阻止抓取URLremove_blocked_url-取消阻止URL
深度链接管理
get_deep_link_blocks-获取被阻止的深度链接列表add_deep_link_block-阻止特定URL模式的深度链接remove_deep_link_block-删除深层链接块
URL参数
get_query_parameters-获取URL规范化参数(可能需要特殊权限)add_query_parameter-添加URL规范化参数remove_query_parameter-删除URL规范化参数
地理设置
get_country_region_settings-获取国家/地区目标设置(可能需要特殊权限)add_country_region_settings-添加国家/地区目标设置remove_country_region_settings-删除国家/地区目标设置
页面预览管理
add_page_preview_block-添加页面预览块以防止出现丰富的片段get_active_page_preview_blocks-获取活动页面预览块列表remove_page_preview_block-删除页面预览块
站点迁移
get_site_moves-获取站点移动/迁移的历史记录submit_site_move-提交站点移动/迁移通知
儿童URL管理
get_children_url_info-获取父URL下的子URL信息get_children_url_traffic_info-获取子URL的流量信息
使用示例
配置后,您可以在Claude中使用这些工具:
基本示例
"Show me all my verified sites in Bing Webmaster Tools"
"What are the top search queries for example.com?"
"Submit https://example.com/new-page for indexing"
"Show me crawl errors for my site"
"What's my daily URL submission quota?"高级示例
"Get detailed stats for the query 'best products' on my site"
"Submit this HTML content directly for https://example.com/page"
"Show me traffic info for my top 10 pages"
"Add user@example.com as an administrator for my site"
"Block all URLs matching /temp/* pattern"
"Get historical data for the keyword 'seo tools'"
"Configure crawl rate to slow for my site"
"Get keyword suggestions related to 'marketing'"发展
设置开发环境
# Clone the repository
git clone https://github.com/isiahw1/mcp-server-bing-webmaster.git
cd mcp-server-bing-webmaster
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Install in development mode
uv pip install -e .运行服务器
# Set your API key
export BING_WEBMASTER_API_KEY=your_api_key_here
# Run the server
uv run python -m mcp_server_bwt贡献
欢迎投稿!请随时提交拉取请求。
许可证
MIT许可证-有关详细信息,请参阅许可证文件。
支持
有关问题、疑问或贡献,请访问: https://github.com/isiahw1/mcp-server-bing-webmaster
