
AWSの16,000 APIにMCPは対応できるか――MCPサーバー構築「その後」の設計論
AWS Has 16,000 APIs. Can MCP Handle It?

AWSの16,000 APIにMCPは対応できるか――MCPサーバー構築「その後」の設計論
Agentic Conversations (formally mlops.community)
要約
AWSでエージェント体験に取り組むJames Wardが、MCPサーバーを作った後に必要になる観測性、eval、ツール設計、コードモード、認証について語った回。非効率なツール設計がMCPのせいにされがちだと指摘し、約16,000のAPIを持つAWSがコードモードに行き着いた経緯と、人が確認しやすい制約付きDSLという代替案も紹介している。ドキュメント変更がプロンプトインジェクション警告を誘発した失敗談も共有された。
この回のポイント
- ●エージェントからの複数の呼び出しを1セッションとして相関付けて観測すると、ツール説明やスキーマの改善点、複数呼び出しを束ねる集約ツールの候補が見えてくる。
- ●「MCPはトークンを無駄にする」という批判の多くは、顧客を1件ずつ取得するような非効率なツール設計が原因だとWardは述べている。
- ●AWSのMCPサーバーは16,000規模のAPIを個別ツール化できないため、現在はPythonを実行するコードモードのみを提供している。一方でPythonは人が確認しにくく、スキーマ検証可能で人が読める制約付きDSLを検討中だという。
- ●evalはハーネス、モデル、思考レベルなどの組み合わせでマトリクスが急拡大する。AWSドキュメントに加えた一文が、テスト範囲が狭かったため本番でインジェクション警告を招き、ロールバックに至った。
- ●MCP 2.0への移行負担は、主にライブラリやゲートウェイの作者側が吸収すべきで、サーバー作者は意識しなくて済むのが望ましいと語っている。
- ●AWSのMCPサーバーはOAuthに対応したが、エージェント側に複数プロファイルを切り替える概念がなく、切り替えにはCLIやSigV4プロキシが必要になるという課題がある。
章立て
MCPサーバー構築の次の段階
AgentCon North Americaでの講演予定を紹介し、初級を超えた「301」レベルのパターンを扱うと説明する。
相関付けと観測性、eval
呼び出しをセッション単位で相関付け、集約ツールの導入効果をevalで測る流れを説明する。
ゲートウェイと出力スキーマ
入出力スキーマを活用した自己最適化ゲートウェイの可能性を語る。
MCPは非効率か、MCP 2.0移行
非効率の原因はツール設計だという主張と、新プロトコルへの移行負担をライブラリ側が担う点を議論する。
コードモードと制約付きDSL
Pythonコードモードの確認しづらさと、スキーマ検証できる低コードDSLの構想を述べる。
エージェント体験の評価と失敗談
ベンチマーク、ルートコーズ分析、ハーネス評価のマトリクス拡大、ドキュメント変更によるインジェクション警告の事例を紹介する。
16,000 APIとツール設計
AWSがコードモードのみに至った経緯、サービス別サーバーやツール検索、スキルの可能性を話す。
認証と今後のイベント
OAuthとIAM、プロファイル切り替えの課題を話し、AgentConやワーキンググループへの参加を呼びかける。
解説記事
AWSでエージェント体験の改善に取り組むJames Wardが、MLOps Community系のポッドキャストに出演した回である。MCPサーバーを一度作った後、本番運用で何を考えるべきかを、AWSでの実践を交えて語っている。
「作った後」に必要になる観測性とeval
Wardは、MCPサーバーを動かすだけなら簡単だが、運用が進むと必要になるものがあると述べる。その一例が、エージェントからの複数の呼び出しを1つのセッションとして相関付ける仕組みだ。これがないと、サーバー側は個々の呼び出しがどの依頼に由来するか分からない。相関付けて観測すれば、10回のツール呼び出しを1回にまとめる集約ツールの候補が見つかる。
その効果はevalで確かめる。集約ツールがある場合とない場合を別の条件として比べ、ターン数やトークン数が減ったか、エージェントが近道のツールを選んだかを確認する。さらに、入出力スキーマが分かっていれば、間に置いたゲートウェイが最適化を自動で見つけられる可能性があるとも話している。ただし出力スキーマは任意項目なので、有効化が前提になる。
MCPは本当に非効率なのか
「MCPはトークンを浪費する」という批判について、Wardは原因をMCPではなくツール設計に見ている。顧客を1件ずつ取得するツールで100回呼び出せば遅く高価になるが、IDを複数受け取るツールを用意すれば済む話であり、コードモードのような複雑な解決策は要らないという立場だ。初期には質の低いMCPサーバーが多く作られ、MCPがその責めを負わされたとも述べている。まず動かし、次に速くし、それから安くするという順序で改善すればよいという話だ。
MCP 2.0への移行についても触れている。自身が保守するMCP実装では、旧版との両対応のためにプロトコルのネゴシエーションが必要だった。これを担うのはライブラリやゲートウェイ側であり、サーバー作者が意識しなくて済むのが望ましいと述べている。
コードモードの限界と制約付きDSL
AWSのMCPサーバーは、約16,000のAPIをすべてツールにするのは現実的でないため、現在はPythonで複数のAPI呼び出しを連ねるコードモードのみを提供している。当初は、CLI形式でAPIを1回呼ぶツールもあった。しかし逐次処理の必要性が高く、これを廃止してコードモードに一本化した経緯がある。
ただし、インフラを操作するコードを人が確認すべき場面で、生成されたPythonは読みにくい。Wardは、自分でも内容を理解しないまま「問題なさそう」と送ってしまうと打ち明けている。そこで検討しているのが、操作の列だけを表す制約付きDSLだ。文法とスキーマで事前検証でき、エージェントが誤りを直してから人が確認して実行する流れを想定している。サンドボックスが不要になる点も利点として挙げた。
評価の難しさとドキュメントの失敗談
エージェント体験の評価では、ベンチマークサイトの例が挙がった。evalのトランスクリプトをLLMに渡して根本原因を分析させる手法も有効だという。ただし思考過程を公開しないモデルでは原因を突き止めにくい。評価はハーネスの中で行う必要があり、モデル、思考レベル、CLIやMCPの有無、取得されるドキュメントページなどでマトリクスが急拡大する。
象徴的なのがドキュメントの件である。AWSのMarkdownドキュメントに、エージェント向けツールキットを案内する一文を入れようとした。当初はインジェクション攻撃と判定され、数百パターンを試して小さなマトリクスで問題なしとなり本番に出した。だが翌日、「AWSのドキュメントが悪意ある注入を試みている」というエージェントの警告を受け取り、ロールバックした。Wardは「マトリクスが十分に大きくなかった」と振り返る。なお、LLM-as-judgeに安価なモデルを使えば判定側の費用は抑えられるが、ハーネスでの実行自体のトークン消費は残るとも述べている。
アーキテクチャと認証
ツールを5つに絞り、1つをツール検索にする設計や、サービス別のMCPサーバーに分ける案も話題になった。AWSにはコミュニティ製の個別サーバーも存在するが、発見しやすさと使いやすさ、肥大化のバランスが課題だという。モノリスとマイクロサービスの議論と同じで「場合による」というのが結論に近い。ツール検索やスキルをオーケストレーターとして使う案も、まだ模索段階とされた。
認証については、AWSのMCPサーバーがOAuthに対応した。MCP用の権限を絞ったロールを渡し、IAMで読み取り専用などに制限するのが基本的な方針だ。一方、OAuth利用時にはエージェント側にプロファイルを切り替える概念がなく、複数プロファイルを使うにはCLIやSigV4プロキシが必要になる。
まとめ
本エピソードの核心は、MCPの問題とされるものの多くが、ツール設計と観測・評価の不足に起因するという視点にある。日本の開発者にとっては、セッション相関による観測、集約ツール、eval設計といった実践的な手がかりが得られる。また、大規模APIでのコードモードの限界と、人が確認できるDSLという方向性は、エージェントに権限を委ねる際の設計課題を示している。評価マトリクスの拡大がもたらす落とし穴も、本番変更を行う前に意識したい点だ。
文字起こし(英語・自動生成)
The Python code that gets written for code mode is honestly hard to review. Anytime that the agent is writing code mode stuff, I look at it and I'm like, that is gobbledygook code. I don't understand. Looks good to me. I hope it works. And then the next day I get an email that is like, hey, my agent is telling me that the Markdown docs on AWS are trying to do an injection of something potentially malicious. I'm like, roll back. Roll back. our matrix wasn't big enough James you're going to be giving a talk at Agent Con North America on October 22nd and 23rd in San Jose California I would love to know what you're talking about awesome yeah super excited to be there yeah so my talk is going to be about some of the things that kind of come later in your mtp
creation journey because you know it's easy to build an mtp server and throw it out there but then you know as it's out there uh as i've built some mtp servers you know discovered that there's some things that you're going to want like down the road you know and so this is really exploring some of some of those sorts of things and so i can go into these some details on what what those look like but yeah that's the general idea is like like you know not day one with mcp building mcp servers but like day 10 you know these are some things that you're gonna have to think about down the road so this is like the mcp builder 201 course maybe even like 301 or 401 it's oh nice yeah it's you know we're gonna get into some more advanced patterns and maybe not quite 401 we'll just call it 301 yeah yeah and for mcp like server yeah yeah yeah this is you know if you're not building mcp servers like not to talk for you yeah it's very deep into the mcp server
creation okay well talk to me about some of the anti-patterns of building mcp servers or yeah well really we're going to focus on the patterns for these so you know okay but i'm sure there's many talks on the anti-patterns, but we're going to talk about the patterns for what your MCP servers are likely going to need to do down the road. So one example of that is that oftentimes the agent, when it makes calls to an MCP server, you as the MCP server have no idea, like, okay, this call fired off to my MCP server, this call fired off to my MCP server, this fire, like you have no correlation across those different calls. And so there's no way for your server to know, like, okay, this is like one agent session, you know, based on one prompt from the user. And then how do you actually then correlate those together? And this can be really helpful for understanding, like, how is my MCP server actually getting used? Is it producing the best results that it can for the agent? And this is the kind of observability stuff that when you really want to tune your tool descriptions, your data schemas, your input parameters, all those sorts of things, when you really want to get that thing dialed, you're going to need this kind of information to be able to see the journey that an agent is making with your MCP server.
So there's a way that you can actually do this, and we'll talk about all the details in this session about that. But there's almost this performance aspect of it where you've got the system performance, but then you've got the actual like, is it responding and making it very agent friendly in a way too, right? So there's that performance side of things. Yeah, I think that a lot of it does come down to possible areas of optimization. and that's what you're really trying to discover because generally the agents, what they do is they decide they want to call an MCP server. So they make the call, get the response, send it back to the LLM and they keep doing this, right? You know, you've seen that agentic loop just going in circles, you know, trying all these different tools, exploring around. And oftentimes this can be really inefficient because all these round trips to the LLM, you know, take a long time or expensive. And so maybe what you're trying to discover through this observability is,
do I need like an aggregate tool that's going to take potentially 10 tool calls and roll that all into a single tool call that the agent can make instead? And so you're trying to, through observability, discover those places for optimization where you can make the agent more efficient. And you really only know that when you can create correlation across requests, so that then you can look at all the things that happen in a given session. Well, it is funny how you're mentioning you've got your agents that are hitting the MCP server various times. And unless you really take it a step further and try to figure out, is this the same session or is this a different session? Then you're not really going to realize that this agent was trying to do X. I made it 10 times more difficult because I had it making 10 different calls. And if I can abstract that up a few levels, recognize its intent, and just create the server so that that intent is only one call, that's going to be a much nicer experience.
Yep, absolutely. Yeah, and then likely in a real system, what you're going to do is build out evals. And so you're going to take the observability data that you've uncovered and you're going to ultimately get to a set of evals that then will give you actual data around, okay, the agent was trying to do this without this aggregate tool or whatever the solution you come up with is. Here's how many turns it took with the LLM. Here's how many tokens it took. And then you set up another arm in your eval that is, okay, now do it with this new tool that's this aggregate thing. And then you see, okay, did the agent choose that path? Did I have the right tool description? So it decided to go the shortcut instead of the long way. And then did I use less tokens, less turns, those sorts of things. And so they could definitely influence the eval system that you would hopefully have in place around your MCP servers as well. One thing that we've been seeing a bunch of at all of these different MCP cons, MCP dev summits,
is the advent of an MCP gateway. Have you thought about adding that into your talk? Is that one of the patterns that you're going to discuss? We won't talk about gateways. I'm sure there will be many talks about gateways. You definitely can use a gateway to start to potentially do these optimizations automatically. And one of the things which maybe we'll talk a little bit about in the talk is this idea that if you know input and output schemas to your MCP servers, which input schemas, you have to know those, but output schemas are optional. When you know actually both and you put something between the agent, like a gateway, something between the agent and your MCP server, then you can actually automatically discover the right optimizations that you can do. and so this is you know you take it instead of doing it manually with correlations and evals and all that kind of stuff you can actually have a self uh self-optimizing gateway in the middle
but i think to do that well you do need to turn on output schemas because you really need to understand the shape of the things and how they fit together and like okay this shape is going to be able to go uh into this form i know the output schema of that and then i know that the next sequence of things then takes parameters from that thing and feeds into this thing. And so maybe not all use cases require those output schemas, but I think when you have them, you could have a more automatically updating, optimizing gateway in the middle. Yeah, it's funny you mentioned that because Sean Smith at the last agent con in EU in Amsterdam last week he was talking about that like the self-optimizing mcp servers where they just recognize oh well we could be better we could be better here and it is a little bit more the whole his whole take was it's much more nuanced than you would think but it is possible and i think that kind of is echoing what you're saying right now yeah i think we're we're we're just beginning
to uncover some of the approaches that we could use for this. We took kind of a tangent generally in the industry where we said, okay, MCP, the way that it gets used in this like very heavyweight, you know, back and forth process with the LOM, it's really inefficient. So this was like this backlash against MCP, like MCP wastes all these tokens. And so many of the use cases that I saw where people were making this point, like the MTP is inefficient, what they were doing was they would, let's say they had a tool that was get customer by customer ID or something like that. And then they would go into their agent and say, okay, give me all the customers that I've emailed in the last 60 days or whatever. And so then they show that the agent does an initial query, and then it goes through and calls GitCustomer 100 times. And, of course, that's going to use a lot of tokens and be slow. And the solution to this is very obvious.
Just have a tool that is GitCustomers and takes a parameter that is all the IDs that it wants. And it's not MCP's fault that you have inefficient tools that are making the agent do all these round trips. That can be solved. And we don't have to go to code mode and these really complex solutions. It's like just look at how your tools are being used and discover the ways that you could create more efficient tool usage. It's not MCP's fault. You haven't done that optimization. There so many pieces especially in the beginning where we were exploring and we trying to figure out the best ways to do it And you recognize that man we just like built a lot of pretty crappy MCP servers And MCP was the scapegoat It wasn't the people that built the MCP servers that were the scapegoats. Exactly. Yeah, and, I mean, I've built those terrible MCP servers. And it's like, we should know better, you know, initially.
It's like, cool. Like, I was able to connect my agent to this thing. Awesome. Okay, that's step one. Right? and then we got to get to you know step seven where we add the the efficiencies and make things more optimized and you know yeah how many servers it's okay that we go on that journey of like what do they say in coding like like something about how you you you first you make it work then you make it fast or something like that yes yeah and then you make it cheap yeah that's right hopefully some of us never get to that third step. Yeah. There's lots of areas that we can, for improvement, and, yeah, I hope that my talk will help people see some of the patterns that will help them get there. How about with the new MCP release in July, that 728, a.k.a. MCP 2.0, having to now support two different MCP servers, and I've heard talk from folks where they said,
yeah, the migration was seamless, it was easy, we bumped everything up and we're good. And then I've heard other talks where it's like, that was us. We can enforce all the migrations we want, but what happens when I have a gateway and now I'm pinging to external MCP servers that are not following the new update, so now I have to simultaneously support both of them, Is there any patterns that you've been able to decipher from that? It's definitely a challenging area. We won't go into it in my talk, but I do have firsthand experience with exactly this. And it's hard. It's mostly hard on the library, like gateway and library author side of things. So I maintain an implementation of MCP, and so I had to deal with this. And I use that implementation in a variety of MCP servers. And so I had to be able to support the dual era MCP, do the, like, negotiation of the protocol, both on the server side and the client side.
And, you know, thank God I, like, had AI helping me do this. And I had now the MCP compliance test suite is really helpful for getting the agent to, you know, know what success looks like and be able to iterate and get there. And so, but once the library and the like gateways and those sort of things solve the negotiation and the dual era stack and all that kind of stuff, like once it's solved in the libraries that you're using, then as an MCP server or client, like it's totally transparent to you, which is nice. Like you as the MCP server author, you don't have to think about the actual underlying protocol. And as long as the library that you're built on is doing the right thing, then you should be good. So, yeah, I think it is nice that most MCP server authors really shouldn't have to deal with the pain of the underlying protocol, which is the way that it should be. And thankfully, the MCP contributors have been able to put the burden where it should be,
which is on the library author side and not paying the actual server creators with this stuff. What are some other patterns that you want to highlight? I don't know if we'll go too deep in the talk, but one of the things that I've been exploring in my day job, So I work at AWS and working on agent experience. So how do we make the experience of AWS agent friendly? And one of the things that we're looking at is right now we have, like, a code mode MCP server that enables – essentially just lets the agent throw some Python at it that's, like, sequence these AWS API calls together and do all these things. And it works. Like the agent can write the code and do all that. But I think there's a better option and it relates to what we'll talk about in the talk of like creating MCP servers that can provide better optimization.
But then also one of the downsides of the code mode is the user like verification of what's going to happen. Like when you're having your agent talking to AWS, like you want to be careful, you know, you want to like probably review like what the agent is going to go do on your infrastructure. And so the Python code that gets written for code mode is honestly like hard to review. Like, you know, anytime that the agent is writing code mode stuff, I look at it and I'm like, it doesn't like that is gobbledygook code. I don't understand. Looks good to me. I hope it works. Send it. Yeah, send it. And so what I'm exploring is can we essentially have a low-code mode that is not full Python code but is a very constrained DSL for the sequence of operations that the agent wants to perform? And then can we make it so that the human can look at it and understand what's going to happen?
and can we make it so that the schema for that, the grammar and schema for that is validatable so that the agent can then do a step where it says, okay, here's the code mode that I, you know, here's my plan. Now let me validate that against the actual schema that is available so that it doesn't actually try to do things that aren't going to work. Because what often happens in code mode is it gets, you know, in the step two of ten and fails because it tried to access something, some property of something that wasn't actually there. You know, this happens all the time. And so can it actually do a validation step against the schema and get, like, very clear feedback on, like, okay, you know, you wrote this low-code, you know, DSL that you tried to access this property. That property doesn't actually exist. Here's what you should do instead, and then the agent can try again. And then by the time that the agent has verified the code, the human has reviewed it, boom, we send off this like sequence of operations. And so, so that's part of what I'm exploring is how do we, how do we enable this,
this kind of better code mode. And it relates definitely to the, the, the talk that I'm giving on, like as an MCP server, how could you potentially expose a low code mode that doesn't require sandboxing, you know, allows you to interpret the, the actions. And, and then as the like potentially, the fallback for when the agent's like, okay, I see all the things that I can't call, but let me just write code. If you could offer this, like, low-code approach instead of a full-code approach, you know, hopefully that would be a better agent experience. But, yeah, so that's part of my day job. You know what it reminds me of is back when LLMs first came out, there was a guy that came into the community and he was saying look I was able to get LLMs and this was before like the coding use case became very popular and what he said was I was able to get LLMs to
create their own code but it's not any code that we as humans know it's basically just saying if you were to create this, you know, like, here's what I want to be done. How would you, in a almost like pseudo code way, explain it? And so the LLMs were able to talk to each other in a way that was like this pseudo code that they understood. And when you read it, you kind of were like, ah, I guess that kind of works. Absolutely worthless for like compiling or any of that, you know, but for the agents, well, they weren't really called agents back then. It was just straight LLM calls for the LLM calls they were like yeah I understand I get it yeah and that's that's exactly what I've been been looking at it's not the agent to agent case but but if you give if you give the LLM a language grammar and you give it a schema and you give it a goal it actually is really good at coming up with the language that you've told it to fit things into and you know
Maybe not surprisingly that it's a language model. So, you know, if you tell it, here's my grammar, here's my schema, give me, do this, then it's actually pretty darn good at that task. So, yeah. Have you seen the website 2027.dev? No. No, it's not. Okay. So these folks, I love what they're doing. And they're basically evaling how agents work with the tools that are out there and how well the agent experience is with all these developer tools. So they'll kind of like see how fast is the agent able to do what you normally do with these tools. So if it's like Railway, it's been up and, you know, host a website. Or if it is, I think they were using like Snowflake. It's like how does the agent work when it's trying to write different queries. And they give, they basically have a whole thing.
I think it's like benchmarks.2027.dev or around there. It's relevant to my day job for sure. Exactly. Like you got to have the data. It's like you just don't know until you have the data. It's like, does any of this make anything better? And it's like, I don't know. Like, you've got to have the evals. You've got to have the data. And then you can actually know. And then you, there's very easy. See, here's a really cool thing about where we're at with this. It's that we actually can get data like never before. Because when a developer is just like on their GLI or in their IDE doing things, whatever, there no way as a vendor to measure their productivity essentially Now very easy to measure token usage and how long something takes And so now, with evals, we can get really good data on user tasks, what tools did it use, how long did it take, how many tokens did it take, was it successful? And we can now have get data around all that, which is absolutely amazing.
So I'm hopeful that all this results in so much better end user developer experience like agent experience is just you know saying that okay we want to make users in their agents more productive and so now we can measure that and see are we actually doing it which is exciting well the fun part that i've been thinking about a lot is how you can optimize the act of improving the agent experience so i i always go down these rabbit holes of like you know, if you're looking at the benchmarks and you're looking at the companies or the products that are very low in the agent experience score, why is that? And oftentimes it's not as clear as like, oh, just they don't have LLM.txt on their website because right now mostly everybody has that. It's things that you wouldn't necessarily expect. And you also have to almost like work with the agent to see why is this hard for you where are you getting stuck right now yeah so that's a
task that i i do a lot is i take a transcript from an eval and i give it to the lm and i say like root cause analysis on where where it went wrong like like why why did it choose that tool why did it give it that tool that parameters like like you know and and it can do it like which is amazing that you can take a transcript from an eval and actually get really good root cause analysis on it are you because a lot of times where I get frustrated is some of the thinking steps get obfuscated from the user how are you doing it is it with open source models or is it through the labs like how can you see some of these thinking steps yeah in my case I I use different agents and different models and that's part of the the matrix of things and so some of the some of the models and agents that I'm using do expose the thinking steps. And so probably in those cases, I'm able to, you know, get a better root cause analysis of what happened, but that's not
universal. And so it could be that, you know, this agent and this model that is not exposing thinking, like I'm not able to solve its problem on why it went wrong, but then you kind of hope that, okay, if I solve it for this one over here, then hopefully I solve it for this one, but that may not be true. And so, like, with the evals, we can get the data. It doesn't necessarily mean that we're going to be able to get to the root cause and solve the issues. Like, I was just, I've been playing with you over the last few days and was trying to. You and everybody. Yeah, me and everybody. It's still fun. So probably talking about you other than the Asian contact, because, you know, it's required. but I was trying to like root cause something with Jev and it took writing hundreds of evals to try to get to root cause of what was going on which luckily with Jev it's you know they're inexpensive fast and cheap but yeah this was like hundreds of actual
arms in my eval that I ran many times I was burning through like four cents of Jev usage. It's so cheap. Exactly. Four cents. Yeah, exactly. That's hundreds. That's a whole lot of Jev. Right. A whole lot of Jev. And, you know, like the other piece that I wonder about with your job and the Asian experience is how much are you evaling the harnesses? and how much are you changing harnesses and what you're doing on that level too, because on one level it's the models, but then on the other level, and what folks would call like the inner harness, the outer harness, all of that fun stuff. I do almost all of my testing in a harness. And the reason is that in my case, the experience that I'm trying to make better is the user that's in a code assistant in a harness. And so I need the system prompt. I need the loop that the harness has.
And so that almost, I would say almost universally, my eval testing is in a harness. And then I have to have many arms for, you know, different models and different thinking levels. And, you know, it's just like the matrix gets massive real quick. But I, fun experience, I learned a lesson on this just recently. So we, on AWS documentation, we have the markdown versions of the documentation. and we have the agent toolkit for AWS, which is, you know, the agent tools and CLI setups and MTP and all that kind of stuff for AWS. And we wanted to put a line in the Markdown documentation that said like, like, hey, you know, we have, we've got this agent toolkit for AWS and you can set it up and it'll make your life easier. And so I did some evals on that, like, okay, let's, Let's add this to the documentation. And this was not on the live site, but just on like a testing site.
Added this like line in. And immediately the agent was like, this looks like an injection attack. And so like classified me just like adding this line into the document. So I'm like, okay, I'm glad I didn't add that to production. But then I wrote all these evals to be like, is there anything that we can put into the markdown to just like let you know, Like, hey, you know, you'll have a better experience if you use this agent toolkit for AWS. And so I had, you know, hundreds of different variations of different markdown snippets to include. Ran these through a small matrix, and this is the important one. I've run it through a small matrix of harnesses and models. And we thought we got to something that looked good. and it was like you know the evals are like yep the agents aren't flagging it as malicious or distracting or an advertisement and you know sometimes the agent surfaces it to the user and
says hey you should use the agent toolkit and so I thought we had something good so we rolled it out to production this little snippet and it was you know it was very carefully created to not trigger all the things we rolled it out and then like the next day I get an email that was like like hey My agent is telling me that the Markdown docs on AWS are trying to do an injection of something potentially malicious. I'm like, roll back, roll back. Our matrix wasn't big enough. And so we rolled that back, and now we're working on hopefully something that the agents will be more happy with. So, yeah, you have to be careful with these kinds of things. A hundred percent because it's like, wow, you're trying to help. you're trying to make it much more valuable but then if you're not thorough in your evals and that matrix and you're not trying to get as much data as you can before you put it out you can have these potentially difficult situations and that's just for again like i'm looking at agent experience on
so many different levels and as you are i'm sure with the models the harnesses and then you're saying, well, we can also optimize these MCP servers. Yeah, yeah, yeah, exactly. Yeah, there's just so much now. And so it's, yeah, it's hard because the matrix are, the matrices are getting massive for what you really need to test. And then there's, you know, all the combinatorial things. It's like, okay, the user has the MCP server. They have the CLI. They have the MCP server, not the CLI. So, you know, like, and then what documentation pages get fetched. And, like, it gets really massive. So, yes, we can get the data. And it could cost a lot of money to get the data because, you know, all of these evals and this giant matrix of combinatorial things, like, that you really should be doing, those are all expensive LLM calls. So, yeah. Again, enter JEV to the rescue.
Yeah, I think it's an area that will be really interesting to see. Jev helps just on the judge side, so it doesn't necessarily help on – like I still need to actually execute this task in an agent, and until those agents switch over to Jev or something like it as being the loop harness part of it, then we're still going to use a lot of tokens just to run a test in a harness, like actually have the harness do something. So on the judge side, we'll save some by having Jov, you know, take a transcript or whatever and judge it. But on the actual execution side, we're still going to be in the harness. So still. I saw one pattern. Actually, I was talking to some folks last week, and they were saying, look, we have decided that we're going to expose five tools maximum on our NCP servers. The four are going to be like the most common use cases like you were talking about.
And then the fifth is going to be basically a tool search so that it can go a little bit deeper and reach those ones that are not exposed on that first glance. Have you seen any creative ways? I know that Cloudflare got popular, whatever, when they, I think they were calling it code mode. Yeah. Yeah. Yeah. With the two tools. Yeah So it a really interesting time in figuring out what is the right architecture And of course it depends So in the case of AWS we have something like 16 APIs or something like that Like we can model all those as a tool Like, that's just not even a viable option. Like, I think you'd break every agent on the planet if we had 16,000 tools that got returned, you know, when you said list tools on your MCP server. And so that's just not even an option. And so we initially with our MCP server, we had a tool that was like execute API call or something like that, which was essentially like making a CLI call.
It was in the shape of an AWS CLI call. And that worked okay. But what we found through looking at these things was that a lot of times we needed sequential operations. We needed to provide the agent a way to do sequential operations. So we added something, the code mode tool, and then we actually deprecated the single call one. We're like, the agent can just write, if it only wants to call one API, it can write the Python to do that. And so that's where the AWS MTP server is today. It essentially just has just code mode, and that's because the API surface is just too large to cover. But that's where I'm exploring the idea of the DSL with the grammar, with the schema, you know, all those validation with something that's human reviewable as being a low code mode code mode. So, yeah, so currently exploring that as an alternative, but at least today it's just the MCP server is just code mode.
And have you thought about trying to scope down different MCP servers so potentially you just have an MCP server for DynamoDB? And it's really good at that. Yeah, we have looked at that, and there is some of that that exists. We have a bunch of – we've got our main MCP server, and then we've got all the community or, like, I don't know, broader ecosystem MCP servers. And so those are up on the AWS Labs GitHub, and there are more point-oriented MCP servers. And so that does exist. I think it's not totally clear, like, should those get rolled in somehow and do, like, provide a search across those? Because part of the challenge is discoverability then. It's like people install the AWS MCP server, and then, like, I don't know, I think I'd assume that then I've kind of got everything I need. but I don't because then there's these other MTP servers and so
there's I guess this balance of like ease of use, discoverability functionality, not you know bloating things too much and you know for the people that don't want to use Dynamo but they get the Dynamo tool like I don't know it's like having such a big API service definitely creates some additional challenges yeah 100% that's what I was just thinking like how do you optimize for that and it really i haven't i'm still on the fence on what i think about this idea of we're going to have the one agent to rule them all and it'll be able to just kind of sprawl its other agents and build the agents on the fly and all that fun stuff or we're going to have very like domain specific agents and we're going to have thousands of them or hundreds of thousands of them right and it's probably not one or the other it's some kind of a blur in between but when i think about it's like monolith versus microservices it's like yeah both yes no it depends
yeah it's like monolith or microservices yes that's yes i want them so you know but i i do think like in a way when you tell me about some of these difficulties of the mcp server and having a gigantic aws mcp server then if you created smaller mcp servers for the different services you would want those domain specific agents so that they could have those specific mcp servers that you could call that agent and it would know like all right cool i'm just like the dynamo db agent and I know exactly what I need to do here. Yeah. Yeah. Yeah. At least today our MCP server is not itself an agent, but you, if it did become one and then we expose like agent as tool, then, then yeah, then maybe there's some other things that we could do there. Um, also, you know, a year ago, tool search tool was not something that even existed. And so now with, with tool search existing,
and that opens up some additional opportunities. And then maybe, like you're saying, having a tool search built into the MCP server and can we make that work? And then skills and skills over MCP or maybe another piece to this as well is maybe we use skills as the orchestrator to then be able to know what tools to call or something like that. So, yeah, I think there's still a lot to kind of figure out what the most optimal patterns are around all of this. So it's fun to do all that exploration and figure out, like, what's actually going to work for our users and make their experience great and how can we deval it and get data. Yeah, there's just so much fun stuff. And not get prompt injection warnings when you do. Yeah, try not to break things in the process. Yeah. Yeah, there was a big one that was kind of like a reoccurring theme that I've seen across these MCP dev summits that we've been doing.
And that's how folks are doing off with their MCP servers. Have you thought about that? Because I imagine, like you were saying, you don't want to be so willy nilly with your AWS account. It can get out of hand really quickly if you give it the wrong permissions and the wrong authentication to the wrong people. Yeah, it definitely is an area that we're trying to figure out what the most optimal options are. The AWS MCP server does support OAuth now, which is cool, because you give it an account that specifically has the permissions to be able to be used from MCP, and then you likely, an experienced AWS user would then lock down that particular role to only be able to do certain things. It's like maybe I only want read operations. And so with IAM and AWS, you can actually set that up and be like, okay, the account that I'm giving the MCP OAuth server can only do these things.
And that would be a good approach generally to lock things down. When you've OAuth from an agent, there is no concept in agents of multiple profiles, which maybe that's a future need on MCP. But that's one of the challenges is that most of the time when you're working with AWS, you've got different profiles. And this profile can do this, and this profile can do these other things. And from the AWS CLI, you can toggle those profiles. And so we do have a way, whether you're using AWS CLI to toggle profile, or there's a proxy that we have for the AWS MCP server that supports multiple profiles. So when you're using OAuth, you can't toggle profiles. But when you're using this, like, SIGV4 proxy for the AWS MCP server, you can actually toggle profiles. And so, yeah, it's a complex space when you get into auth and security. But I think we're trying to make sure that we're supporting the different use cases of what users need and how they work with AWS and how they want to maintain security and least privilege and all those sorts of things.
Well, and sometimes it's just knowing that I can do that. Like you said, I didn't realize I could do it and I didn't read the documentation or I didn't see that update. And then I hear you say it now, and I go, oh, sweet. Well, I'm going to do it that way. Like, I didn't realize I could do it with the CLI. Yeah, yeah. Yeah, and there's skills that point to the CLI and tell it to use the CLI. And so, yeah, part of the challenge is that because things are moving fast, we have lots of different ways to do things. And so what is best for every user depends, you know. And some users, like, they just want the easy route. And so MTP OAuth, like, great. Other people want to manage their skills manually and use the AWS CLI and use profiles and have a more advanced use case. And so, yeah, as usual, with complex things, it depends. And so we're trying to make sure that people have what they need and can do things in the ways that work for them. Well, James, dude, I'm so excited for your talk. And I appreciate you coming on here, explaining it to me.
For anybody that's listening, you can come and see James gives a talk at AgentCon North America in San Jose, October 22nd and 23rd. And as a special gift, I realized I've got a discount code for you. You can use the discount code COMMUNITY25 for 25% off. And the ticket prices are going to go up at the end of this month, September. So go ahead and get that before they go up. Yeah. Oh, and I should do a shout out. So I'm on the technical committee for the Agentic AI Foundation, and we've got these work groups, which are great ways to get involved into kind of specific topic areas. And we're going to, in San Jose at AgentCon, be getting the work groups together. And, you know, I'm looking forward through the technical committee to be interacting with the work group members. So, yeah, like shout out, like join work groups. Like they're public on the Agentic AI Foundation website now. Join the work groups. join us at agent con we'll get some good in-person time there to talk through all the the fun areas
you know of that agents relate to like the things we've just been talking about yeah excellent dude well i look forward to it i'll see you soon sounds good thank you
番組の概要欄(原文)
<p>What happens after you’ve built your first MCP server and actually have to make it work in the real world?</p><p><br></p><p>In this episode, <a href="https://www.linkedin.com/in/jamesward/" target="_blank" rel="noopener noreferer"><em>James Ward</em></a> dives into the more advanced side of MCP: observability, evals, tool design, code mode, authentication, and the challenges that appear once agents start using your server at scale.</p><p><br></p><p>We also get into how AWS thinks about MCP across roughly 16,000 APIs, why inefficient tool design often gets blamed on MCP itself, and whether the future could involve more constrained, human-reviewable alternatives to full code mode.</p><p><br></p><p>Along the way, James shares a great example of an AWS documentation change that accidentally triggered prompt injection warnings from agents, showing just how complicated testing across different models and harnesses is becoming.</p><p><br></p><p>If you’re already building with MCP and want to understand what comes after the “hello world” stage, this one goes deep.</p><p><br></p><p>Timestamps:</p><p>[00:00] “This Code Is Gobbledygook”</p><p>[00:44] What Happens After You Build an MCP Server?</p><p>[02:11] The MCP Patterns You Actually Need in Production</p><p>[03:48] Why Your Agent Is Making Too Many Tool Calls</p><p>[05:29] How to Make MCP Use Fewer Tokens</p><p>[08:44] Is MCP Actually Inefficient?</p><p>[10:11] “We Built a Lot of Pretty Crappy MCP Servers”</p><p>[11:25] The MCP 2.0 Migration Problem</p><p>[14:02] Why AWS Is Rethinking Code Mode</p><p>[15:35] The Problem With Letting Agents Write Python</p><p>[19:31] How Do You Measure Agent Experience?</p><p>[22:11] Finding Out Why an Agent Failed</p><p>[23:42] Hundreds of Evals for Four Cents</p><p>[24:36] The Evaluation Matrix Gets Massive</p><p>[26:28] AWS Accidentally Triggered a Prompt Injection Warning</p><p>[30:16] Should MCP Servers Expose Only Five Tools?</p><p>[31:02] AWS Has 16,000 APIs. Now What?</p><p>[34:09] One Super-Agent or Thousands of Specialized Agents?</p><p>[36:55] The MCP Authentication Problem</p><p>[40:15] What’s Coming at AgentCon</p>
出典・この記事について
- 番組
- Agentic Conversations (formally mlops.community)(Demetrios)
- 元の回
- AWS Has 16,000 APIs. Can MCP Handle It?
- 配信日
- 要約作成日
- 公式サイト
- mlops.community
この要約・解説記事は、元の音声を文字起こしした内容をもとに AI(Claude)が日本語で作成したものです。 固有名詞や数値に誤りを含む場合があるため、正確な内容は元の音声でご確認ください。制作方法について
関連エピソード

AI利用が増えるほど利益率が下がる?トークノミクスと価値証明の難しさ
Agentic Conversations (formally mlops.community)

Bosch Rexroth:あなたの「秘伝のタレ」は何か? エージェント型エンジニアリング Agent iXi
Industrial AI Podcast

Warp、ソフトウェアファクトリーに賭ける(Changelog Interviews #693)
Changelog Master Feed

エージェンティック・ステート:AIエージェントで政府を作り変える
ChinaTalk

AIエージェント2万体を計画していますか?Capital Oneからの警告|Abhijit Bose
Eye On A.I.

SPS 26:部品を超えて――AIと電気トポロジー設計(Murrelektronik)
Industrial AI Podcast