舅舅和外甥女是什么关系| 磊字五行属什么| 糖尿病人早餐吃什么好| 缺血吃什么补血最快| 淋巴细胞百分比偏低是什么意思| 睡觉腰疼是什么原因| 中之人什么意思| 老年人缺钾是什么原因引起的| 梦见吐血是什么预兆| 流产可以吃什么水果| 黄色上衣配什么颜色裤子| 什么是安全期| 时机是什么意思| 看近视眼挂什么科| 眩晕停又叫什么| 厚黑学讲的是什么| kitchen什么意思| 门牙下面的牙叫什么| 分身是什么意思| 狗肉和什么食物相克| 时柱比肩是什么意思| 氯气什么味道| 肛裂是什么症状| 面瘫是什么症状| lp0是什么意思| 背后长疙瘩是什么原因| 血糖高吃什么药| 四月二十是什么星座| 林冲为什么叫豹子头| 什么的小狗| 什么水果养胃又治胃病| 鱼靠什么呼吸| 徐州有什么好吃的| 牛肉饺子馅配什么蔬菜| 杨的右边念什么| 四维空间是什么| 什么书在书店买不到| 吊唁是什么意思| 狂狷是什么意思| 破屋什么意思| haglofs是什么牌子| 什么样的牙齿需要矫正| 急性肠胃炎能吃什么| 吃李子不能吃什么| 天使什么意思| 七夕送什么| 跌打损伤用什么药最好| 梦见自己吃面条是什么意思| 汽车空调不制冷是什么原因| 有何贵干是什么意思| 姜汁洗头发有什么好处| 手背上有痣代表什么| 呼吸困难是什么原因| 缎面是什么面料| 倒挂金钩是什么意思| 三七粉什么时间喝好| 舌吻有什么好处| 燃眉之急是什么意思| 促甲状腺高会导致什么| 男性性功能减退吃什么药| 小青柑属于什么茶| ena是什么检查项目| 纳甲是什么意思| 痛经喝什么能缓解| novo是什么牌子| 夸父是一个什么样的人| 杜甫是什么派诗人| 太极是什么| ki67是什么意思| 505是什么意思| 什么样的人不容易怀孕| yp是什么| ibs是什么单位| 绮罗是什么意思| 萎缩性胃炎能吃什么水果| 腹痛腹泻吃什么药| 质问是什么意思啊| 什么叫肠上皮化生| 喜悦之情溢于言表什么意思| 什么人| 病是什么结构| 常乐我净是什么意思| 双下肢水肿是什么原因| c1和c2有什么区别| 幼儿急疹是什么原因引起的| 这是什么呀| 小便痒痒是什么原因女| beyond是什么意思| 眼睛肿是什么原因引起的| 胸腔疼痛是什么原因| 气泡水是什么| 急性肠胃炎吃什么药| 4月5号是什么星座| 什么风什么月| 女人体检都查什么项目| 甘油是什么成分| 浸润癌是什么意思| 叻叻猪是什么意思| 鲁肃的性格特点是什么| qt什么意思| 腿麻是什么病的前兆| 咖色搭配什么颜色好看| 孕妇脚抽筋是什么原因| 成都有什么| 开户名是什么| 失代偿期是什么意思| 豆腐和什么不能一起吃| 生化流产是什么原因造成的| 云南简称是什么| 乙肝两对半145阳性是什么意思| 脚扭了挂什么科| 梦见牙套掉了是什么意思| amber是什么意思| 掂过碌蔗是什么意思| 西安什么山| 犒劳自己是什么意思| 一朵什么| 女人做梦哭醒预示什么| 跖疣是什么东西| 龟奴是什么| 公知是什么意思| 薄如蝉翼是什么意思| 月经量少是什么原因啊| 甲状腺有什么作用| 脂蛋白a高是什么意思| hrv是什么| 肝血虚吃什么食物调理| 来月经量少吃什么可以增加月经量| 什么水果降血糖| 字如其人什么意思| BE是什么| 血脂高有什么表现| 梦见自己拉粑粑是什么意思| 享年是什么意思| 属马是什么命| 处事不惊是什么意思| 宜夫痣是什么意思| 埋汰是什么意思| 朵字五行属什么| 水鱼煲鸡汤放什么药材| 总胆固醇是什么| 爆冷是什么意思| 行李箱什么材质的好| sey什么意思| 君子菜是什么蔬菜| 辟邪剑谱和葵花宝典有什么关系| 什么情况下吃救心丸| 中央处理器由什么组成| 小儿消化不良吃什么药最好| 为什么吃了饭就想睡觉| 五路财神都叫什么名字| 喝什么排湿气| 胃一阵一阵的疼是什么原因| 膀胱炎挂什么科| 外阴痒用什么药| 寅是什么意思| 家里为什么有隐翅虫| 诺氟沙星胶囊治什么病| 旗袍穿什么鞋子好看图| 祖籍是什么意思| 年纪是什么意思| 黄芪不适合什么人吃| 阳暑吃什么药| 得意忘形是什么意思| 交界性心律是什么意思| hold on什么意思| 谷丙转氨酶偏低是什么意思| 上号是什么意思| 此言差矣是什么意思| 高回声是什么意思| 梅菜在北方叫什么菜| 空前绝后是什么生肖| 肩袖损伤吃什么药| 总钙偏高是什么原因| 体格检查是什么意思| 右下腹疼是什么原因| 欧什么意思| 1218是什么星座| 258是什么意思| 欧米茄算什么档次| 孽债是什么意思| 麦粒肿是什么原因引起的| 2035年是什么年| 8月26号是什么星座| 蚯蚓的血是什么颜色的| 什么产品美白效果最好最快| 不完全性右束支传导阻滞是什么意思| 经常感冒吃什么提高免疫力| 杉字五行属什么| 孕早期是什么时候| ems什么意思| 嘴巴起水泡是什么原因| 沉住气是什么意思| 不痛经说明什么| 先兆性流产是什么意思| 什么是大三阳| 什么叫心律不齐| 蝙蝠为什么倒挂着睡觉| 有什么瓜| 喝藿香正气水不能吃什么| 发改委是干什么的| 太乙是什么意思| 子母门是什么意思| 牙刷属于什么垃圾| 什么提示你怀了女宝宝| 湫是什么意思| 才华横溢是什么生肖| 滞是什么意思| 灯笼裤配什么鞋子好看| 半什么半什么| 阳虚吃什么调理| 猫咪飞机耳是什么意思| 淋巴细胞偏高说明什么| 放疗期间吃什么食物最好| 小腿疼痛什么原因引起的| 眼睛干涩疲劳用什么眼药水| 前列腺饱满是什么意思| 肺结节吃什么| 游离前列腺特异性抗原是什么意思| 颈椎生理曲度变直是什么意思| 直肠息肉有什么症状| 传单是什么病| 脾胃虚是什么症状| 耳鸣是什么原因| 风景旧曾谙是什么意思| 实证是什么意思| 咸鸭蛋不能和什么一起吃| 结梁子什么意思| 守株待兔是什么生肖| 甲功七项检查什么| 猫咪能看到什么颜色| 雄脱是什么意思| 煎牛排用什么锅最好| 蒸馏水是什么| microsd卡是什么卡| 锁骨上的痣代表什么| 2002年是什么生肖| 倦怠期是什么意思| burberry是什么品牌| 黄毛是什么意思| 外阴裂口什么原因| 脑梗吃什么药可以恢复的快| 泛性恋是什么| 痔疮用什么药| 机不可失的下一句是什么| 反洗钱是什么意思| 女人吃什么能增加雌激素| 肺有问题挂什么科| 朝九晚五是什么意思| 脐血流检查是什么| 主动脉硬化是什么意思| 贲临是什么意思| 扁桃体看什么科室| 且行且珍惜是什么意思| 包皮炎用什么软膏| baleno是什么牌子| 均可是什么意思| 空腹不能吃什么| 熠熠什么意思| 莹字五行属什么| 太阳黑子是什么东西| 鱼在鱼缸底部不动为什么| 佳字属于五行属什么| 英氏属于什么档次的| 百度
by Sagara Gunathunga

洛桑江村齐扎拉分别会见美国参议员戴安斯一行

Model Context Protocol makes it far easier to integrate LLMs and your APIs. Let’s walk through how MCP clients and servers communicate, securely.

百度 大约一分钟前,正在院坝晒苦瓜的她,看到一辆银灰色面包车从谢兴才家的方向冲出来。

AI protocols
Credit: Rob Schultz / Shutterstock

Every new protocol introduces its own complexities. When a new protocol shows up, the first question to ask is whether it is truly necessary. So, let’s ask that question about the model context protocol (MCP).

The current wave of agentic apps, sparked by tools like ChatGPT, are powered by large language models (LLMs) that excel at tasks like summarization, content creation, and image processing but come with fundamental limitations. Namely:

  • No access to real-time data
  • No access to private data
  • No ability to execute tools

MCP addresses the above limitations by acting as a universal protocol that connects agentic apps to real-world data and tools. But it’s fair to ask, why introduce a new protocol when we already have secure and high-performing APIs?

The short answer is that, while today’s powerful APIs can be connected to agentic apps, there’s a challenge. These APIs vary widely, e.g. REST, GraphQL, gRPC, using HTTP, WebSockets, Pub/Sub. Their auth mechanisms differ too, e.g. API keys, OAuth2. That means each integration is bespoke. Developers must read docs, build flows, and wire up APIs one by one.

WSO2 securing MCP 01

WSO2

This static integration model is proven but doesn’t match the dynamic nature of agentic apps. That’s where MCP comes in. MCP defines clear client-server roles, a standard protocol format, and a life cycle, essentially becoming the universal connector between LLMs and external systems. So you can think of MCP as the USB-C in the API world.

How MCP works

MCP defines three core roles—a host, a client, and a server:

  1. Host: Agentic applications that manage client life cycles and enforce security.
  2. Client: Lightweight connectors within hosts that establish a 1:1 session with an MCP server.
  3. Server: Programs that connect MCP clients to data sources and tools, either locally or remotely.
WSO2 securing MCP 02

WSO2

Each role provides a set of features. MCP servers expose resources (contextual data like calendar events), prompts (structured templates that guide user input to improve LLM output), and tools (executable functions). MCP clients connect to MCP servers to request data, execute tools, and orchestrate agents.

MCP uses JSON-RPC, a lightweight, structured protocol for requests and responses, and defines two standard transport mechanisms for client-server communication, standard input and output (STDIO) and streamable HTTP. 

Securing a local MCP server 

When the MCP server runs locally, the STDIO transport should be used. In practice, this means the agentic app launches the MCP server as a sub-process and communicates through its standard input and output streams. Because this communication stays entirely within the local system, it’s inherently secure, and the MCP auth spec doesn’t require any additional security.

WSO2 securing MCP 03

WSO2

However, when an MCP server communicates with back-end APIs, typically over the internet, security becomes a top priority, but falls outside the scope of the MCP auth specification. Nevertheless, there is still no need for new mechanisms; existing API security practices suffice. Common approaches include:

  • Long-lived tokens: API keys and tokens, valid for days or months, are obtained via out-of-band channels and configured in the MCP server.
  • Short-lived tokens: With lifespans under an hour, short-lived tokens can’t be set manually. Instead, the MCP server must dynamically request them at run time with user approval. OAuth2 access tokens and JWTs are typical examples.

Securing a remote MCP server

An MCP client connects to a remote MCP server via HTTP by initiating a request to its endpoint URL. As specified by the MCP auth spec, this endpoint must be OAuth 2.1-protected, requiring the client to present a valid access token.

WSO2 securing MCP 04

WSO2

The MCP auth spec outlines a token acquisition process designed to support dynamic, agentic integrations. These interactions include the following steps.

WSO2 securing MCP 05

WSO2

Server metadata discovery

Once the MCP server URL is provided as a configuration parameter, the client constructs a server metadata endpoint by removing any path components and appending a /well-known/oauth-authorization-server path. The client then retrieves a JSON-formatted server metadata document from this endpoint. Both the endpoint and the document must comply with the OAuth 2.0 Authorization Server Metadata specification. This metadata helps the client discover the following information required during the next steps:

  • Registration endpoint
  • Authorization and token endpoints
  • Supported grant types and scopes

Deriving the server metadata endpoint from the MCP server URL was meant to let clients operate with a single configuration parameter. However, this tightly couples the authorization and resource server roles, limiting the use of existing OAuth 2.0 infrastructure and purpose-built identity solutions. To address this, the upcoming MCP auth spec replaces this mechanism with the OAuth 2.0 Protected Resource Metadata specification.

Client registration

Based on the information retrieved from the server metadata document, the client application sends a registration request to the client registration endpoint. The MCP auth specification adopts the OAuth 2.0 Dynamic Client Registration (DCR) protocol to register the client as an OAuth 2.1 client. In the DCR response, the client application receives a client_id and, for confidential clients, a client_secret. Both are required for the next step.

While DCR is widely adopted, opinions vary on open registration, and the spec itself allows protecting the registration endpoint with OAuth 2.0. Again, to support single-parameter configuration, the MCP auth spec recommends open registration. It remains to be seen how this will evolve.

Access token retrieval

At this stage, the client has everything needed to request an access token. Depending on the use case, one of the following OAuth 2.1 grant types is used:

  • Client Credentials: If the client application is accessing the MCP server directly, it uses the Client Credentials grant with the client_id and client_secret obtained during registration, along with the token endpoint and scopes discovered from the server metadata.

  • Authorization Code:  If the client accesses the MCP server on behalf of an end user, it uses the Authorization Code grant. This flow requires the client_id and client_secret from registration and the authorization endpoint, token endpoint, and scopes from the server metadata. Additionally, as required by OAuth 2.1, the client must use Proof Key for Code Exchange (PKCE) to enhance security.
WSO2 securing MCP 06

WSO2

If everything goes well, the client application obtains a valid access token and can initiate a connection request to the MCP server URL, passing the token via the Authorization HTTP header. The MCP server then validates the token and establishes the connection if it’s valid.

Ultimately, this security flow aligns with typical OAuth-based API security flows, except for the initial step of deriving the server metadata URL from the MCP server URL.

Sagara Gunathunga is director of solutions architecture at WSO2.

Generative AI Insights provides a venue for technology leaders to explore and discuss the challenges and opportunities of generative artificial intelligence. The selection is wide-ranging, from technology deep dives to case studies to expert opinion, but also subjective, based on our judgment of which topics and treatments will best serve InfoWorld’s technically sophisticated audience. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Contact doug_dineley@foundryco.com.

心脏病挂什么科 为什么会无缘无故长痣 成都是什么气候 能说会道是什么生肖 太阳穴疼是什么原因
鸭肫是鸭的什么部位 肝囊肿吃什么食物好 欲盖弥彰什么意思 股市xd是什么意思 9月28号是什么星座
pd是什么病 脚踝肿了是什么原因 耳朵会动的人说明什么 什么什么似火 梦到老房子是什么意思
尼莫地平片治什么病 割韭菜什么意思 海贼王什么时候出的 经常发低烧是什么原因 缘定三生是什么意思
老年人适合吃什么水果hcv9jop1ns8r.cn 藏红花可以搭配什么泡水喝hcv8jop4ns4r.cn 乳腺纤维瘤和乳腺结节有什么区别luyiluode.com p2是什么意思hcv9jop5ns1r.cn 红薯和什么不能一起吃jiuxinfghf.com
寂灭是什么意思hcv8jop5ns8r.cn 产后吃什么对身体恢复好hcv9jop0ns4r.cn 花枝招展什么意思hcv8jop2ns8r.cn snr是什么意思hcv8jop6ns0r.cn 长期口臭吃什么药xianpinbao.com
梦到头发长长了是什么意思hcv8jop4ns8r.cn 通奸是什么意思hcv8jop9ns4r.cn 黄鼻涕是什么原因hcv8jop0ns1r.cn 贫血严重会得什么病hcv9jop5ns1r.cn 瑾字属于五行属什么hcv8jop1ns6r.cn
心口疼痛是什么原因chuanglingweilai.com 积分落户是什么意思hcv9jop6ns7r.cn 锦是什么意思hcv8jop4ns7r.cn 黄仙是什么仙onlinewuye.com 6.27什么星座hcv9jop0ns2r.cn
百度