市值: $2.6618T -2.230%
成交额(24h): $61.4523B -31.840%
  • 市值: $2.6618T -2.230%
  • 成交额(24h): $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日 发表的其他文章