市值: $2.6618T -2.230%
體積(24小時): $61.4523B -31.840%
  • 市值: $2.6618T -2.230%
  • 體積(24小時): $61.4523B -31.840%
  • 恐懼與貪婪指數:
  • 市值: $2.6618T -2.230%
加密
主題
加密植物
資訊
加密術
影片
頭號新聞
加密
主題
加密植物
資訊
加密術
影片
bitcoin
bitcoin

$83980.701994 USD

-3.23%

ethereum
ethereum

$1896.914573 USD

-5.03%

tether
tether

$0.999743 USD

-0.01%

xrp
xrp

$2.152324 USD

-6.65%

bnb
bnb

$611.773136 USD

-3.39%

solana
solana

$127.533866 USD

-6.55%

usd-coin
usd-coin

$0.999964 USD

-0.03%

dogecoin
dogecoin

$0.176658 USD

-6.65%

cardano
cardano

$0.696879 USD

-4.80%

tron
tron

$0.232917 USD

0.24%

chainlink
chainlink

$14.170895 USD

-7.43%

toncoin
toncoin

$3.741420 USD

-7.02%

unus-sed-leo
unus-sed-leo

$9.720000 USD

-0.50%

avalanche
avalanche

$20.185998 USD

-7.02%

stellar
stellar

$0.270692 USD

-4.97%

加密貨幣新聞文章

您現在可以構建和部署遠程模型上下文協議(MCP)服務器到CloudFlare

2025/03/25 21:59

感覺幾乎每個人都在構建AI應用程序,而代理商正在談論模型上下文協議(MCP)

您現在可以構建和部署遠程模型上下文協議(MCP)服務器到CloudFlare

It feels like almost everyone building AI applications and agents is talking about the Model Context Protocol (MCP), as well as building MCP servers that you install and run locally on your own computer.

構建AI應用程序和代理商幾乎每個人都在談論模型上下文協議(MCP),以及您在自己的計算機上本地安裝和運行的MCP服務器。

Today, we’re announcing that you can now build and deploy remote MCP servers to Cloudflare. We’ve added four things to Cloudflare that handle the hard parts of building remote MCP servers for you:

今天,我們宣布您現在可以構建和部署遠程MCP服務器來cloudflare。我們為CloudFlare添加了四件事,這些內容處理為您構建遠程MCP服務器的硬部分:

workers-oauth-provider — an OAuth Provider that makes authorization easy

工人 - 歐洲航空公司 - 一家OAuth提供商,使授權變得容易

McpAgent — a class built into the Cloudflare Agents SDK that handles remote transport

McPagent - 內置在Cloudflare代理SDK中的類,可處理遠程運輸

mcp-remote — an adapter that lets MCP clients that otherwise only support local connections work with remote MCP servers

MCP-remote - 一個適配器,它允許僅支持本地連接的MCP客戶端與遠程MCP服務器一起使用

AI playground as a remote MCP client — a chat interface that allows you to connect to remote MCP servers, with the authentication check included

AI Playground作為遠程MCP客戶端 - 一個允許您連接到遠程MCP服務器的聊天接口,其中包括身份驗證檢查

The button below, or the developer docs, will get you up and running in production with this example MCP server in less than two minutes:

下面的按鈕或開發人員文檔將在不到兩分鐘的時間內使用此示例MCP服務器在生產中啟動並運行:

Unlike the local MCP servers you may have previously used, remote MCP servers are accessible on the Internet. People simply sign in and grant permissions to MCP clients using familiar authorization flows. We think this is going to be a massive deal — connecting coding agents to MCP servers has blown developers’ minds over the past few months, and remote MCP servers have the same potential to open up similar new ways of working with LLMs and agents to a much wider audience, including more everyday consumer use cases.

與您以前可能使用的本地MCP服務器不同,遠程MCP服務器可在Internet上訪問。人們只需使用熟悉的授權流就登錄並授予MCP客戶的權限。我們認為這將是一項巨大的交易 - 在過去的幾個月中,將編碼代理與MCP服務器連接到了開發人員的思想,而遠程MCP服務器具有相同的潛力,可以開放與LLMS和Agents一起使用類似的新方法,包括更多日常消費者用例。

From local to remote — bringing MCP to the masses

從本地到遙遠 - 將MCP帶到群眾

MCP is quickly becoming the common protocol that enables LLMs to go beyond inference and RAG, and take actions that require access beyond the AI application itself (like sending an email, deploying a code change, publishing blog posts, you name it). It enables AI agents (MCP clients) to access tools and resources from external services (MCP servers).

MCP迅速成為使LLM可以超越推理和抹布的常見協議,並採取需要訪問AI應用程序本身的訪問的操作(例如發送電子郵件,部署代碼更改,發布博客文章,您將其命名)。它使AI代理(MCP客戶端)能夠從外部服務(MCP服務器)訪問工具和資源。

To date, MCP has been limited to running locally on your own machine — if you want to access a tool on the web using MCP, it’s up to you to set up the server locally. You haven’t been able to use MCP from web-based interfaces or mobile apps, and there hasn’t been a way to let people authenticate and grant the MCP client permission. Effectively, MCP servers haven’t yet been brought online.

迄今為止,MCP僅限於在您自己的計算機上本地運行 - 如果您想使用MCP訪問Web上的工具,則由您決定在本地設置服務器。您無法使用基於Web的接口或移動應用程序中的MCP,並且沒有一種方法可以讓人們進行身份驗證並授予MCP客戶端的許可。有效地,MCP服務器尚未在線上。

Support for remote MCP connections changes this. It creates the opportunity to reach a wider audience of Internet users who aren’t going to install and run MCP servers locally for use with desktop apps. Remote MCP support is like the transition from desktop software to web-based software. People expect to continue tasks across devices and to login and have things just work. Local MCP is great for developers, but remote MCP connections are the missing piece to reach everyone on the Internet.

支持遠程MCP連接會改變這一點。它創造了機會吸引更多的互聯網用戶,這些互聯網用戶不會在本地安裝和運行MCP服務器,以與桌面應用一起使用。遠程MCP支持就像從桌面軟件到基於Web的軟件的過渡一樣。人們期望繼續跨設備進行任務,登錄並讓事情正常工作。本地MCP非常適合開發人員,但是遠程MCP連接是接觸互聯網上每個人的缺失部分。

Making authentication and authorization just work with MCP

進行身份驗證和授權僅與MCP合作

Beyond just changing the transport layer — from stdio to streamable HTTP — when you build a remote MCP server that uses information from the end user’s account, you need authentication and authorization. You need a way to allow users to login and prove who they are (authentication) and a way for users intersect to control what the AI agent will be able to access when using a service (authorization).

當您構建使用最終用戶帳戶中信息的遠程MCP服務器時,不僅更改運輸層(從STDIO到流式HTTP),還需要身份驗證和授權。您需要一種允許用戶登錄並證明自己是誰(身份驗證)的方法,以及用戶相交的一種方法來控制AI代理在使用服務時能夠訪問的內容(授權)。

MCP does this with OAuth, which has been the standard protocol that allows users to grant applications to access their information or services, without sharing passwords. Here, the MCP Server itself acts as the OAuth Provider. However, OAuth with MCP is hard to implement yourself, so when you build MCP servers on Cloudflare we provide it for you.

MCP使用OAuth來做到這一點,OAuth是標準協議,允許用戶授予應用程序以訪問其信息或服務,而無需共享密碼。在這裡,MCP服務器本身是OAUTH提供商。但是,使用MCP的Oauth很難實現自己,因此,當您在CloudFlare上構建MCP服務器時,我們會為您提供它。

workers-oauth-provider — an OAuth 2.1 Provider library for Cloudflare Workers

工人 - 歐洲航空公司 - oauth 2.1 Cloudflare工人的提供商庫

When you deploy an MCP Server to Cloudflare, your Worker acts as an OAuth Provider, using workers-oauth-provider, a new TypeScript library that wraps your Worker’s code, adding authorization to API endpoints, including (but not limited to) MCP server API endpoints.

當您將MCP服務器部署到CloudFlare時,您的工作人員用作OAuth提供商,使用Workers-Oauth-Provider,這是一個包裹您的工作人員代碼的新的打字稿庫,將授權添加到API端點,包括(但不限於)MCP Server API端點。

Your MCP server will receive the already-authenticated user details as a parameter. You don’t need to perform any checks of your own, or directly manage tokens. You can still fully control how you authenticate users: from what UI they see when they log in, to which provider they use to log in. You can choose to bring your own third-party authentication and authorization providers like Google or GitHub, or integrate with your own.

您的MCP服務器將作為參數接收已有認可的用戶詳細信息。您無需執行自己的檢查或直接管理令牌。您仍然可以完全控制您對用戶的身份驗證的方式:從他們登錄時看到的UI,他們使用的提供商登錄的哪個提供商可以選擇攜帶自己的第三方身份驗證和授權提供商,例如Google或Github,或與您自己集成。

The complete MCP OAuth flow looks like this:

完整的MCP Oauth流如下所示:

免責聲明:info@kdj.com

所提供的資訊並非交易建議。 kDJ.com對任何基於本文提供的資訊進行的投資不承擔任何責任。加密貨幣波動性較大,建議您充分研究後謹慎投資!

如果您認為本網站使用的內容侵犯了您的版權,請立即聯絡我們(info@kdj.com),我們將及時刪除。

2025年03月30日 其他文章發表於