AIAI EngineerJun 30, 2025· 14:17

Agents, Access, and the Future of Machine Identity — Nick Nisi (WorkOS) + Lizzie Siegle (Cloudflare)

Lizzie Siegle (Cloudflare) and Nick Nisi (WorkOS) argue that AI agents need the same authentication and authorization patterns as humans, extending OAuth to machines. They demonstrate an MCP server built with Cloudflare Workers and WorkOS that allows Claude to order a shirt on behalf of a user, showing how agents can act with user credentials. They explain using Cloudflare durable objects for per-user persistent storage and how authorization can be added to MCP servers to control agent actions, including an example where a 'pretty please' tool bypasses a block. The talk emphasizes the need for fine-grained authorization and audit trails as agents scale to thousands of tasks.

Transcript

Intro0:00

Lizzie Siegle0:16

Hi, I'm Lizzie. I'm a developer advocate at Cloudflare.

Nick Nisi0:19

And I'm Nick. I'm a developer experience engineer at WorkOS.

Lizzie Siegle0:24

Yes. So at Cloudflare, I make a lot of AI demos, AI MCP servers. Anyone here also making any of those?

Guest0:32

Yes.

Lizzie Siegle0:33

Agents? Nice. Of course. Should have guessed, because conference. So I've been having fun making agents and MCP servers that act on behalf of me. I built an agent to auto-vote in the NBA Finals for me, and then I got blocked eventually.

Anyways, I like to book tennis courts in San Francisco, because Lord knows that is hard enough to do already. So I think that's like a great agent use case. Agent that acts for me, automate some of the tedious parts of my life, things that I want to do.

However, that does beg the question: how do you control what they're allowed to do?

Auth Problem1:04

Nick Nisi1:10

Yeah. And we're moving so fast with all of this and having fun getting it to do things. GitHub MCP is like one of my favorites, because I can just get it going and have it read reviews for me, read diffs for me, and just help me manage GitHub, which is really awesome.

But it's very developer-centric, obviously. It's GitHub. But MCPs in general, you have to go and edit this JSON file and do that. And it's really tough to I have to give it a pat. And that's an advanced use case for non-developers.

And so we really need a way to let these tools act on our behalf, but in a more traditional way that's easy for end users to be able to set that up. And so yeah, that's what we do at WorkOS.

We do authorization and user management. And the main point of this talk is to really help drive the idea that we need the same kind of credentials and authorization that we do with user-facing projects. We need the agents to do that as well, as a start.

And then we have a lot of places that we can go with this as we get more fine-grained. But really, the point is that OAuth really just isn't for humans anymore. It's for our agents acting on our behalf.

Cloudflare Agents2:26

Lizzie Siegle2:26

And you know what else agents need? Memory, persistent storage. Anyone here use Cloudflare? You think you know what Cloudflare does?

Nick Nisi2:37

No.

Lizzie Siegle2:37

I'm here to tell you that you do not.

People are like, oh, you do security, CDN, DDoS protection, bot management. We do so much more. We have compute, Cloudflare workers. We can host your code on the edge. We host AI models. You can run inference on vectorized.

We have a vector database, a SQL database, durable objects, which is what we use in our agents framework to maintain memory, very important. And video streaming, image optimization, so much more. If you use Cloudflare workers, we have bindings.

Bindings let you interact from your web app, from your website, from your agent as well, because our agents and MCP servers are kind of similar in that you can use bindings to interact with other Cloudflare products. And also, just like, of course, you can use other companies' products as well.

And of course, now we have a free tier. Durable objects used to not be free. Now you can use it. And I know startups who use Cloudflare who do not pay us, and they make money. I digress.

Nick Nisi3:43

But yeah, all of these pieces, they really help to they just fit naturally into building these agents, because they'll deliver the code to where you're at. And you can use the durable objects to store persistence on them. And you can also use things like authorization to make sure and there's a whole OAuth framework with Cloudflare's agents framework that lets you set up that authorization so that you can easily know who the worker is or the agent is acting on behalf of.

Lizzie Siegle4:13

Yeah.

Nick Nisi4:16

So.

Lizzie Siegle4:18

And this agenda will be made available at the end in the GitHub repo. It's a markdown file.

Nick Nisi4:25

So we did build an MCP server using Cloudflare and using WorkOS. And it's just a very basic one. You'll be able to check it out. And you can use it and run it today, which is really awesome. And we're just going to deploy it real quick.

MCP Server4:25

Nick Nisi4:38

So I'll just do npm run deploy, which will run Wrangler to deploy that. And as soon as it's out there, we'll be able to see it

in my compute here. Oops, it was just there.

Lizzie Siegle4:53

That's the Cloudflare dashboard. And it's also very easy to run locally as well, with npm run or Wrangler run, something similar.

Nick Nisi5:02

So a few seconds ago, we've got it deployed. And going back to the terminal, it gave me a URL here. And so I can just copy my workers URL. And I'm going to go over to my client, Claude.

And I'm just going to hit this button and say, add integration. And it's going to pop up. I'll make this big. And I can go add integration. And I'll just say, I want to add mcp.shop.

Lizzie Siegle5:27

Oh, what could it be? Naming themes is hard.

Nick Nisi5:31

Just tacking on it, slash mcp onto there. And now I've got mcp.shop. And I'm going to connect. And so once I connect, this is pulling up and allowing me to tell the agent who to act on behalf of, me in this case.

So I'm going to sign in with GitHub. It's going to do its thing. And then Claude is refreshed. And now it can act on behalf of me.

Lizzie Siegle5:57

And can we see the tools?

Nick Nisi5:59

Yeah.

Lizzie Siegle5:59

Yeah.

So what should we ask?

Nick Nisi6:08

Let's order a shirt.

Lizzie Siegle6:09

Let's order a shirt. I love shirts.

Nick Nisi6:14

Yo, I hear I can get a shirt. Get a shirt from you.

Live demos in an LLM.

Lizzie Siegle6:26

Wi-Fi don't fail us.

Nick Nisi6:30

So it's running. And it recognized that it has tools available now from mcp.shop. So it's going to list the inventory. We'll go ahead and let it run.

Yeah, there's an MCP shirt. You can get it for free. And you can pick your size. And then all it needs is just your company name and your mailing address. And so I'll say, give me I'll say XL and 123 Main Street,

Bellevue, Nebraska. There's a Bellevue, Nebraska.

And we'll do that.

Oh, it needs my company name.

Lizzie Siegle7:15

That's so LinkedIn.

Nick Nisi7:17

Duh.

Might be my company name is WorkOS Du now.

So let that run.

Oh, it's sure thinking about it. It's confirmed it.

Done. And there's my order number. It's going to be sent to that address. And I'm going to say, ooh, what is the order info? So I can see what is my name or my company name WorkOS Du? Kind of hope it is.

Lizzie Siegle7:59

Human in the loop. Need to confirm.

Nick Nisi8:02

No, it got it.

Lizzie Siegle8:04

Ah.

Nick Nisi8:04

Right. That was totally me, not Claude.

So yeah, I was able to order a shirt. And you can as well. But that's just a piece of it. So when we ran this, it's going into close that. If we go into my Cloudflare platform here and go to storage, kv, I've got an orders here.

Lizzie Siegle8:28

This is key-value storage.

Nick Nisi8:30

Yep. And there is the data from the order. So now I've got that saved off. I can use that. And it was all through that interface. So we really just gave Claude the tools that it needed. And it was able to act on my behalf.

And I can go back in. And I can say, can you tell me what you know about me?

User Identity8:46

Nick Nisi9:01

So we've got to get user info. And this is really just going to give me mostly the jaw information, what's on my JWT that Claude now knows about me. So it knows my name. It knows my email address.

In my jaw, I have my favorite song in there, "Careless Whisper." Now I will give you a rendition. And so from there, it also knows that I have admin permissions. So I've shot admin access, because that's in my roles and permissions.

The other cool thing that you can do with the Cloudflare piece of it, and because your MCP server is a durable object, you can also store data directly on that. That's located on that. You want to explain that?

Lizzie Siegle9:48

Durable objects, tough name. If you search Twitter, people tweet about how they're like, this is a bad name. Change the name. But very fast storage. You can spin them up per user. They're close to the user as well for faster retrieval and storage.

Nick Nisi10:07

And so what I did is I just asked it to change the demo mode to band. And that ran a tool in the MCP server itself

Fine-Grained Access10:07

Nick Nisi10:16

that is just going in. And on the context that's associated with this worker object, it's just changing the mode to band. And so now I've got that. And now I can say, I want another shirt, please. And it's going to try and run it.

I'll just always allow that now.

And it was able to check that. And it said, absolutely not. Go away.

Lizzie Siegle10:47

Wave.

Nick Nisi10:49

And so we can mix what it knows about me with what it has stored about me on the durable object. And that's unique for every user of it. And then I can do things like change it again. So if I say, pretty please, it might have a pretty please tool available.

Sure is thinking. Yay! Since I asked nicely, it's going to let me. And I just ordered another shirt.

Lizzie Siegle11:32

Prompt engineering.

If you want to build your own MCP servers on Cloudflare, you can click to deploy your own with no authorization. So it's authless. So probably don't do that. But it is very quick to do so. You click, click to deploy.

Deploy Your Own11:37

Lizzie Siegle11:51

It generates a GitHub repo for you. You get cloned that. And then you edit your own tools. And they give you some tools to begin with. So it's like very fast. But again, that is authless. Do do auth.

And it's still quick to deploy as well with auth, just like slightly less fast.

Nick Nisi12:10

Yeah. And the beauty of this is that we're bringing the pretty simple tools. This is just a no auth flow being added to an MCP. And MCP is effectively just an API. So we're just getting it caught up with the tools that we already have for humans.

Auth's Future12:10

Nick Nisi12:25

But it's important to get this ready to go for these tools to act on our behalf as well. And where we can see this going in the future is much more fine-grained authorization, where it's maybe authorizing per line changes or per tool changes or even maybe authorizing the networks, the connections between things.

And just doing as we see it growing to doing thousands of tasks on our behalf, this auth piece is going to be very important, and especially the audit trail as well. And we can get that with auth tools too, just to make sure that we can see why this interacted this way, on whose behalf was it on, and what was the end result, where did it fail, where did it go wrong, things like that.

Lizzie Siegle13:10

Think of your users not as users, but as deputies. They have access to tools. And they can use and also misuse them as well. Sometimes I think I trust people. I do a live demo. And I'm like, let's see user input.

People sometimes do not nice inputs.

Nick Nisi13:29

Yeah. So get out there and deputize your own tools. We have this repo available. There is a QR code for this repo. Also, the top QR code is.

Get the Shirt13:29

Lizzie Siegle13:40

Get your own shirt.

Nick Nisi13:41

A shirt. Yeah. Or you can just go to mcp.shop, which you will run the same workflow that I just ran. It doesn't have the pretty police tool in it, though, unfortunately. It'll just do it, even if you're mean to it.

But you can order a shirt for the low, low price of $0. So go check it out and get an MCP t-shirt.

Lizzie Siegle14:00

And if you want to add your own pretty please tool, check out the code in the second QR code. And we can't wait to see what MCP servers you build with auth. Thank you.

Nick Nisi14:09

Thank you.