mcpField
G
Gate DEX MCP

Gate DEX MCP

远程服务
github.com/gate金融数据447 周前更新
代码仓库

关于 Gate DEX MCP

Gate DEX MCP 是 Gate 提供的 MCP 远程服务,面向需要链上钱包与兑换操作的 AI Agent。服务覆盖钱包认证、转账、Swap、代币信息、行情数据和 RPC 访问,支持 20 多条链。

主要功能

  1. 01钱包认证与链配置
  2. 02单链与跨链 Swap
  3. 03转账操作
  4. 04代币信息与行情数据
  5. 05RPC 访问
  6. 06OAuth 授权(Google 或 Gate)

适用场景

  1. 01通过 AI 助手查询代币信息并完成链上兑换
  2. 02在多条链之间管理钱包与转账
  3. 03让 Agent 调用 RPC 读取链上数据

MCP 相关

该服务以远程 MCP 服务形式提供 33 个工具,端点为 /mcp/dex,客户端需通过 Google 或 Gate OAuth 完成授权后调用。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://api.gatemcp.ai/mcp/dex
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

工具

详细介绍

Gate MCP 服务器

许可证:MIT MCP

English | 中文


Gate MCP(Model Context Protocol)服务器可让 AI Agent 与 Gate 加密货币交易所交互,获取市场数据、进行交易和管理账户。

功能

  • 🔍 公开市场数据 - 现货、期货、杠杆、期权、交割、理财、Alpha 行情、订单簿、K 线、资金费率、强平历史(无需授权)
  • 💹 交易 - 创建、取消和修改现货、期货、期权及交割合约订单;价格触发订单;跟踪订单
  • 💼 账户与钱包 - 余额、转账、充值、提现、子账户、统一账户
  • 📊 杠杆与理财 - 杠杆借贷、理财产品、多币种闪兑
  • 🎯 活动与福利 - 活动中心、优惠券、Launchpool、广场、福利
  • 🌍 TradFi、CrossEx、P2P - 传统金融、跨交易所、P2P 交易
  • 🌐 DEX - 链上钱包、兑换(单链与跨链)、代币信息、覆盖 20 多条链的市场数据
  • 📰 信息 - 币种发现、市场快照、技术与平台指标、链上及宏观数据
  • 📢 新闻 - 加密新闻、社交洞察、市场事件、预测市场
  • 📚 文档 - 研究报告、论文和文档搜索
  • 🔐 OAuth2 - 为交易和私有工具提供安全授权

MCP 端点

该服务提供以下 MCP 端点:

端点授权工具
https://api.gatemcp.ai/mcp无公开市场数据(58 个工具:现货、期货、杠杆、期权、交割、理财、Alpha、活动、Launchpool、广场、闪兑)
https://api.gatemcp.ai/mcp/exchangeOAuth2CEX 交易与账户(400 多个工具:现货/期货/期权/交割/杠杆交易、钱包、统一账户、子账户、理财、闪兑、返佣、TradFi、CrossEx、P2P、Alpha、活动中心、优惠券、Launchpool、广场、福利)
https://api.gatemcp.ai/mcp/dexGoogle / Gate OAuthDEX 钱包与兑换(33 个工具:授权、钱包、链配置、转账、兑换、市场数据、代币信息、Agentic、覆盖 20 多条链的 RPC)
https://api.gatemcp.ai/mcp/info无币种信息与分析(32 个工具:币种、快照、趋势、链上数据、平台指标、宏观数据、市场详情)
https://api.gatemcp.ai/mcp/open/info无Gate Info 提交接口(正好 7 个工具:币种简介、市场概览/快照、K 线、订单簿、近期交易)
https://api.gatemcp.ai/mcp/news无新闻与研究(18 个工具:新闻/UGC/X/网页、公告、情绪、事件、预测市场)
https://api.gatemcp.ai/mcp/docs无文档研究(3 个工具:研究搜索、币种研究、论文)
  • 仅需市场数据 → 使用 /mcp(无需 Gate 账户)
  • CEX 交易、余额、转账 → 使用 /mcp/exchange(需要 Gate OAuth2)
  • DEX 钱包、兑换、链上功能 → 使用 /mcp/dex(需要 Google / Gate OAuth)
  • 币种信息、技术分析 → 使用 /mcp/info(无需授权)
  • ChatGPT / OpenAI Apps Gate Info 列表 → 使用 /mcp/open/info(允许使用 7 个工具;无需授权)
  • 新闻、公告 → 使用 /mcp/news(无需授权)
  • 研究文档与论文 → 使用 /mcp/docs(无需授权)

传输方式:Streamable HTTP(支持 SSE 回退)。

授权(OAuth2)

/mcp/exchange 需要 Gate OAuth2;/mcp/dex 需要 Google 或 Gate OAuth。 端点 /mcp、/mcp/info、/mcp/open/info、/mcp/news 和 /mcp/docs 均无需身份验证。

使用 mcporter

前置条件:Node.js >= 18、npm。完整安装步骤请参阅快速开始 - mcporter。

# Add Private MCP (trading, requires OAuth)
mcporter config add gate-mcp --url https://api.gatemcp.ai/mcp/exchange --auth oauth

# Authorize (opens browser to log in)
mcporter auth gate-mcp
Scopes(适用于 /mcp/exchange)
Scope用途
market公开市场数据(行情、订单簿、K 线等)
profile账户信息、订单、持仓(只读)
trade创建/取消/修改订单
wallet转账、存款、取款
account统一账户、子账户

快速开始

前提条件
  • Gate 账户(仅 /mcp/exchange 需要)
  • 兼容 MCP 的客户端(Cursor、Claude CLI、Trae、OpenClaw 等)
  • Node.js >= 18(适用于 mcporter、Trae、Qoder 和其他基于 npm 的客户端)
  • Python >= 3.9(可选,用于 Claude Desktop 代理)
Cursor
方法 1:一键安装(推荐)

只需将以下内容粘贴到 Cursor AI 聊天中,Agent 就会自动安装所有 Gate MCP 服务和 Skills:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills。

方法 2:手动配置

用于完整交易(连接时进行 OAuth):

编辑 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "Gate": {
      "url": "https://api.gatemcp.ai/mcp/exchange",
      "transport": "streamable-http",
      "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}

仅用于市场数据(无需身份验证):

{
  "mcpServers": {
    "Gate": {
      "url": "https://api.gatemcp.ai/mcp",
      "transport": "streamable-http",
      "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}

用于 DEX(链上钱包、兑换):

{
  "mcpServers": {
    "Gate-Dex": {
      "url": "https://api.gatemcp.ai/mcp/dex",
      "headers": {
        "x-api-key": "MCP_AK_8W2N7Q",
        "Authorization": "Bearer ${GATE_MCP_TOKEN}"
      }
    }
  }
}

用于资讯与新闻(无需身份验证):

{
  "mcpServers": {
    "Gate-Info": {
      "url": "https://api.gatemcp.ai/mcp/info"
    },
    "Gate-News": {
      "url": "https://api.gatemcp.ai/mcp/news"
    }
  }
}

请参阅 Cursor 设置。

mcporter / OpenClaw
方法 1:一键安装(推荐)

只需将以下内容粘贴到 OpenClaw AI 聊天中,Agent 就会自动安装所有 Gate MCP 服务和 Skills:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills。

方法 2:手动配置
前提条件(安装 mcporter 之前)
  • Node.js >= 18(mcporter 需要 npm)
  • npm(随 Node.js 一起安装)——使用 node -v 和 npm -v 验证
  • Gate 账户(使用 /mcp/exchange 时用于 OAuth 登录)
安装 mcporter
# Global install
npm install -g mcporter

# Verify installation
mcporter --version

也可以不安装,直接运行:npx mcporter <command>(使用当前的 Node.js/npm)。

添加 MCP 并授权
# Add Private MCP (trading, OAuth)
mcporter config add gate-mcp --url https://api.gatemcp.ai/mcp/exchange --auth oauth

# Authorize (opens browser to log in)
mcporter auth gate-mcp

# Add DEX MCP
mcporter config add gate-dex --url https://api.gatemcp.ai/mcp/dex

# Add Info MCP (no auth)
mcporter config add gate-info --url https://api.gatemcp.ai/mcp/info

# Add News MCP (no auth)
mcporter config add gate-news --url https://api.gatemcp.ai/mcp/news

详细步骤请参阅 OpenClaw 设置。

Claude CLI
方法 1:一键安装(推荐)

只需将以下内容粘贴到 Claude CLI 中,Agent 就会自动安装所有 Gate MCP 服务和 Skills:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills。

方法 2:手动配置
brew install claude-code
# Full trading (OAuth)
claude mcp add --transport http Gate https://api.gatemcp.ai/mcp/exchange
# Restart Claude CLI after authorization is complete

# Info (no auth)
claude mcp add --transport http Gate-Info https://api.gatemcp.ai/mcp/info

# News (no auth)
claude mcp add --transport http Gate-News https://api.gatemcp.ai/mcp/news

claude mcp list
Trae

编辑 Trae 设置。使用 mcp-remote 代理 HTTP MCP(首次连接 /mcp/exchange 时会弹出 OAuth 提示):

{
  "mcpServers": {
    "gate": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/exchange"
      ]
    },
    "gate-info": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/info"
      ]
    },
    "gate-news": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/news"
      ]
    }
  }
}
Qoder

编辑 Qoder MCP 设置(例如 ~/.qoder/mcp.json 或 Qoder 设置中的配置):

{
  "mcpServers": {
    "gate": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/exchange"
      ]
    },
    "gate-info": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/info"
      ]
    },
    "gate-news": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/news"
      ]
    }
  }
}
Claude Desktop

Claude Desktop 需要本地 stdio 代理。

  1. 下载 Python 代理文件
  2. 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "Gate": {
      "command": "python3",
      "args": ["/path/to/gate-mcp-proxy.py"]
    }
  }
}

详细说明请参阅 Claude Desktop 设置。

替代方案:gate-local-mcp(本地 stdio,使用 API 密钥)

对于无需 OAuth 的本地开发,可使用 gate-local-mcp(npm:gate-mcp)——一个使用 GATE_API_KEY / GATE_API_SECRET 的 stdio MCP 服务(仅获取公开市场数据时可选)。将其配置为基于命令的 MCP 服务(例如 "command": "npx", "args": ["-y", "gate-mcp"])。默认情况下,它会注册 384 个工具,分布在 22 个模块中(spot、futures、delivery、margin、wallet、account、options、earn、flash_swap、unified、sub_account、multi_collateral_loan、p2p、tradfi、crossex、alpha、rebate、activity、coupon、launch、square、welfare)。使用 GATE_MODULES 或 --modules=spot,futures 缩减工具集,或通过 GATE_READONLY=true / --readonly 启用只读模式。

重要: 线路级工具名称使用缩写(futures→fx、delivery→dc、sub_account→sa 等);它们与远程 api.gatemcp.ai 的命名不同。请始终使用 tools/list 返回的名称。

完整工具列表:gate-local-mcp-tools.md。

LobeHub(桌面端)

在 LobeHub MCP 市场中,此服务显示为标识符 gate-gate-mcp。npm 包名是 gate-mcp——运行 npx -y gate-mcp,而不是 gate-gate-mcp。

根据 LobeHub 自定义 MCP,stdio 服务仅适用于桌面应用;请注入环境变量以进行 Gate API 身份验证。添加自定义技能时,请使用导入 JSON。

仅公开端点:

{
  "mcpServers": {
    "gate-mcp": {
      "command": "npx",
      "args": ["-y", "gate-mcp"],
      "type": "stdio"
    }
  }
}

使用 API 密钥身份验证:

{
  "mcpServers": {
    "gate-mcp": {
      "command": "npx",
      "args": ["-y", "gate-mcp"],
      "type": "stdio",
      "env": {
        "GATE_API_KEY": "your-api-key",
        "GATE_API_SECRET": "your-api-secret"
      }
    }
  }
}

可按需在 env 中添加 GATE_MODULES、GATE_READONLY 或 GATE_BASE_URL。保存前请点击测试连接。

其他客户端
客户端指南
Claude.ai设置
Codex App设置
Codex CLI设置
OpenClaw设置
Trae请参阅上方的 Trae 配置
Qoder请参阅上方的 Qoder 配置
基本用法

查询价格

BTC/USDT 的当前价格是多少?

获取订单簿

显示 ETH/USDT 的订单簿

K 线数据

获取过去 7 天 BTC 的日 K 线数据


可用工具

所有工具都使用 cex_ 前缀。工具分为公共 MCP(无需身份验证)和私有 MCP(OAuth2)。

公共 MCP(/mcp — 无需身份验证,共 58 个工具)
业务工具描述
现货8cex_spot_list_currencies、cex_spot_get_currency、cex_spot_list_currency_pairs、cex_spot_get_currency_pair、cex_spot_get_spot_tickers、cex_spot_get_spot_order_book、cex_spot_get_spot_trades、cex_spot_get_spot_candlesticks
期货14合约、订单簿、交易、K 线、行情、资金费率、溢价指数、强制平仓、合约统计、保险基金账本、指数成分、批量资金费率、风险限额等级
保证金3cex_margin_list_uni_currency_pairs、cex_margin_get_uni_currency_pair、cex_margin_get_market_margin_tier
期权12标的资产、到期日、合约、结算、订单簿、行情、K 线、交易
交割8合约、订单簿、交易、K 线、行情、保险基金账本、风险限额等级
理财5cex_earn_list_dual_investment_plans、cex_earn_list_structured_products、cex_earn_list_uni_currencies、cex_earn_list_earn_fixed_term_products、cex_earn_list_earn_fixed_term_products_by_asset
Alpha3cex_alpha_list_alpha_currencies、cex_alpha_list_alpha_tickers、cex_alpha_list_alpha_tokens
活动1cex_activity_list_activity_types
Launch1cex_launch_list_launch_pool_projects
Square2cex_square_list_square_ai_search、cex_square_list_live_replay
闪兑1cex_fc_list_fc_currency_pairs
私有 MCP(/mcp/exchange — OAuth2,400+ 个工具)

注意:私有端点不包含公开市场数据工具。查询市场数据请使用 /mcp。

业务Scope主要工具
现货profile / trade账户、订单、交易、批量下单、价格触发订单、倒计时撤单、跨仓强平
期货profile / trade账户、持仓、订单、交易、双向持仓、追踪订单、价格触发订单、BBO 订单
杠杆profile / trade杠杆账户、借贷、自动还款、uni 借贷
期权profile / trade账户、持仓、订单、MMP 设置
交割profile / trade账户、持仓、订单、价格触发订单
钱包wallet总余额、划转、充值、提现、充值地址、SA 余额、小额余额兑换
统一账户account统一账户、模式、借贷、风险单位、可借额度、抵押品、杠杆配置
子账户account创建/列出/锁定/解锁 SA、API 密钥
账户account账户详情、主密钥、速率限制、借记手续费、STP 组
返佣profile代理/合作伙伴/经纪商佣金历史、用户信息
闪兑profile / tradecex_fc_list_fc_currency_pairs、cex_fc_list_fc_orders、cex_fc_create_fc_order_v1、多币种闪兑
理财profile / trade双币/结构化/uni 产品、订单、ETH2 兑换、借出记录
Alphaprofile / tradeAlpha 账户、订单、报价/下单
TradFiprofile / trade类别、交易对、MT5 账户、资产、订单、持仓
CrossExprofile / trade规则交易对、账户、持仓、订单、划转、兑换
P2Pprofile / trade用户信息、广告、聊天、交易、确认付款/收款
活动profile活动类型、推荐活动、用户参与情况
优惠券profile用户优惠券、优惠券详情
Launch Poolprofile / tradeLaunchPool 项目、质押/赎回、奖励记录
SquaremarketAI 搜索、直播回放
福利profile新手资格、任务列表和奖励

完整工具参数请参阅 Gate API 文档 或 gate-exchange-mcp。

DEX — 身份验证
工具说明
dex_auth_google_login_start启动 Google OAuth 登录流程,返回验证 URL
dex_auth_google_login_poll轮询登录状态,成功后返回 mcp_token
dex_auth_login_google_wallet使用 Google OAuth 授权码登录
dex_auth_gate_login_start启动 Gate OAuth 登录流程,返回验证 URL
dex_auth_gate_login_poll轮询 Gate OAuth 登录状态,成功后返回 mcp_token
dex_auth_login_gate_wallet直接使用 Gate OAuth 授权码登录
dex_auth_logout撤销当前会话
DEX — 钱包
工具说明
dex_wallet_get_addresses获取各链的钱包地址(EVM、Solana)
dex_wallet_get_token_list代币余额、价格和分页信息
dex_wallet_get_total_asset投资组合总价值及 24 小时变化
dex_wallet_sign_message使用钱包私钥签署消息(EVM / Solana)
dex_wallet_sign_transaction使用钱包私钥签署原始交易
DEX — 链与交易
工具描述
dex_chain_config链配置(链 ID、功能)
dex_tx_gas估算 Gas 价格和 Gas 限额
dex_tx_transfer_preview签名前预览转账详情
dex_tx_approve_preview代币授权预览:构建 ERC20/SPL 授权交易
dex_tx_get_sol_unsigned使用最新区块哈希构建未签名的 Solana SOL 转账
dex_tx_send_raw_transaction在链上广播已签名的交易
dex_tx_quoteSwap 报价,包含路由、价格影响和 Gas 估算
dex_tx_swap一键 Swap:报价 → 构建 → 签名 → 提交
dex_tx_swap_detail按订单 ID 查询 Swap 订单状态
dex_tx_list / dex_tx_detail / dex_tx_history_list交易与 Swap / 跨链桥历史记录
DEX — 市场数据与代币信息
工具描述
dex_market_get_klineK 线(蜡烛图)数据:1m、5m、1h、4h、1d
dex_market_get_tx_stats交易量和交易者统计数据(5m / 1h / 4h / 24h)
dex_market_get_pair_liquidity流动性池添加 / 移除事件
dex_token_list_swap_tokens指定链上可用于 Swap 的代币
dex_token_list_cross_chain_bridge_tokens可用于跨链转账的代币
dex_token_get_coin_info代币信息:价格、市值、供应量、持有者分布
dex_token_ranking24h 涨幅榜 / 跌幅榜
dex_token_get_coins_range_by_created_at按创建时间范围发现新代币
dex_token_get_risk_info安全审计:蜜罐、买入 / 卖出税、黑名单、权限
DEX — Agentic 与 RPC
工具描述
dex_agentic_report向钱包服务报告 Agentic 钱包地址
dex_rpc_call执行对区块链节点的 JSON-RPC 调用

完整的 DEX 工具参数请参阅 gate-dex-mcp。Agentic Wallet 子集(身份验证、钱包、市场数据、资源)请参阅 gate-agentic-wallet-mcp。

Info(/mcp/info — 32 个工具,无需身份验证)

公开的只读市场研究。类别(完整参数表:gate-info-mcp):

类别工具
代币info_coin_get_coin_info、info_coin_search_coins、info_coin_get_coin_rankings
市场快照info_marketsnapshot_get_market_snapshot、info_marketsnapshot_batch_market_snapshot、info_marketsnapshot_get_market_overview、info_marketsnapshot_get_institutional_metrics
市场趋势info_markettrend_get_kline、info_markettrend_get_indicator_history、info_markettrend_get_technical_analysis
链上info_onchain_get_address_info、info_onchain_get_address_transactions、info_onchain_get_transaction、info_onchain_get_token_onchain
合规info_compliance_check_token_security
平台指标info_platformmetrics_get_platform_info、info_platformmetrics_search_platforms、info_platformmetrics_get_defi_overview、info_platformmetrics_get_stablecoin_info、info_platformmetrics_get_bridge_metrics、info_platformmetrics_get_yield_pools、info_platformmetrics_get_platform_history、info_platformmetrics_get_exchange_reserves、info_platformmetrics_get_liquidation_heatmap、info_platformmetrics_get_cex_orderbook_depth、info_platformmetrics_get_chain_activity
宏观info_macro_get_macro_indicator、info_macro_get_economic_calendar、info_macro_get_macro_summary
市场详情info_marketdetail_get_orderbook、info_marketdetail_get_recent_trades、info_marketdetail_get_kline
Open Info(/mcp/open/info — 7 个工具,无需身份验证)

仅用于提交至 ChatGPT / OpenAI Apps 的允许列表。完整参数表:gate-open-info-mcp。

类别工具
币种info_coin_get_coin_info
市场快照info_marketsnapshot_get_market_overview、info_marketsnapshot_get_market_snapshot、info_marketsnapshot_batch_market_snapshot
市场详情info_marketdetail_get_kline、info_marketdetail_get_orderbook、info_marketdetail_get_recent_trades
新闻(/mcp/news — 18 个工具,无需身份验证)

公开、只读的新闻和社交研究。类别(完整参数表:gate-news-mcp):

类别工具
新闻源news_feed_search_news、news_feed_web_search、news_feed_search_x、news_feed_search_ugc、news_feed_get_exchange_announcements、news_feed_get_social_sentiment、news_feed_get_mention_burst、news_feed_get_hot_topics
事件news_events_get_latest_events、news_events_get_event_detail、news_events_explain_market_move、news_events_get_market_move_report、news_events_list_market_move_reports
预测news_prediction_get_volume_delta_ranking、news_prediction_get_fastest_rising_ranking、news_prediction_get_market_orderbook、news_prediction_search_events、news_prediction_get_event_signal
MCP 资源

/mcp 和 /mcp/exchange 端点还会提供用于静态参考数据的 MCP 资源:

资源 URI说明
gate://spot/currency_pairs所有现货交易对
gate://spot/currencies所有受支持的币种
gate://futures/contracts/usdt以 USDT 结算的期货合约
gate://futures/contracts/btc以 BTC 结算的期货合约
gate://futures/contracts/{settle}按结算币种列出的期货合约

常见问题

问:我需要 Gate 账户吗?

答:仅 CEX 交易和 DEX 钱包需要。 /mcp、/mcp/info、/mcp/open/info、/mcp/news 和 /mcp/docs 均完全公开,无需账户。/mcp/exchange(CEX 交易、余额、转账)需要 Gate OAuth2。/mcp/dex(链上钱包、兑换)需要 Google 或 Gate OAuth。

问:支持交易吗?

答:支持。使用 OAuth2 连接到 https://api.gatemcp.ai/mcp/exchange。该服务支持现货和期货交易、账户管理、钱包转账及子账户。每个工具都需要相应的权限范围(例如 trade、wallet)。

问:数据多久更新一次?

答:数据通过 Gate API 实时查询。


隐私与安全

  • 通过 Gate 账户进行 OAuth2 授权(配置中不会存储 API 密钥)
  • 所有 API 调用均使用 HTTPS
  • 请参阅 Gate 隐私政策

支持与反馈

  • API 文档:Gate API 文档
  • 问题反馈:请联系 Gate 支持
  • 商务咨询:请联系 Gate 官方渠道

参与贡献

请参阅 CONTRIBUTING.md。

许可证

MIT © gate.com

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。