Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d69fafb
move storage to the client manager
mattzcarey Nov 14, 2025
5ae0fc1
fix: url missing after page load
mattzcarey Nov 14, 2025
06d8204
fix: dots
mattzcarey Nov 14, 2025
3d297e3
fix: callback handling is now in client manager with 2 stage storage.
mattzcarey Nov 14, 2025
a2a5337
some auth edge cases
mattzcarey Nov 14, 2025
3e64892
make storage sync for the moment to reduce complexity
mattzcarey Nov 14, 2025
9215674
better default states
mattzcarey Nov 14, 2025
050ea26
cancel button on frontend
mattzcarey Nov 14, 2025
6a8de3f
remove openai from agents package.json
mattzcarey Nov 14, 2025
1c5d5a9
unify mcp storage
mattzcarey Nov 14, 2025
3078663
fix lock file
mattzcarey Nov 14, 2025
c6cfcfc
fix: tests
mattzcarey Nov 14, 2025
6f13b13
feat: more refactor
mattzcarey Nov 14, 2025
3cecc93
tools tests
mattzcarey Nov 14, 2025
fcf7aa9
update x402
mattzcarey Nov 14, 2025
8268b7e
fix: types
mattzcarey Nov 14, 2025
dc1237c
update default model in playground
mattzcarey Nov 14, 2025
fcc2948
Merge branch 'main' into feat/mcp-storage-adapter
mattzcarey Nov 14, 2025
55d2452
reasoning card
mattzcarey Nov 14, 2025
2e37160
Apply suggestion from @mattzcarey
mattzcarey Nov 17, 2025
1e936c7
fix: from review
mattzcarey Nov 17, 2025
d909624
add smooth scrolling
mattzcarey Nov 17, 2025
3e616d4
fix: calling restore onstart and json schema the rest of the time
mattzcarey Nov 17, 2025
5161b0d
fix: oauth tests
mattzcarey Nov 17, 2025
0fc2de9
remove smooth scroll :(
mattzcarey Nov 17, 2025
d5b672e
make tests smaller
mattzcarey Nov 17, 2025
1c138ec
rename to client for review
mattzcarey Nov 18, 2025
d3f5182
revert changes to mcp.connect()
mattzcarey Nov 18, 2025
021c167
make storage async
mattzcarey Nov 18, 2025
704d07c
fix readonly nit
mattzcarey Nov 18, 2025
0a7acad
revert remove openai ai sdk provider
mattzcarey Nov 18, 2025
64c4a7d
remove public storage api
mattzcarey Nov 18, 2025
e09b3cb
add todos for ensureJsonSchema
mattzcarey Nov 18, 2025
cf448d8
fix: mcp server states and unify observability to the mcp client mana…
mattzcarey Nov 18, 2025
9eac678
remove callback cache
mattzcarey Nov 18, 2025
d8a1d4f
dead
mattzcarey Nov 18, 2025
f482b0c
createConnection. in memory method
mattzcarey Nov 18, 2025
5ef1e8b
add tests
mattzcarey Nov 18, 2025
51fca96
changeset
mattzcarey Nov 18, 2025
67033d8
Merge branch 'main' into feat/mcp-storage-adapter
mattzcarey Nov 18, 2025
7ad9317
formatting
mattzcarey Nov 18, 2025
d1f479f
claude comments
mattzcarey Nov 18, 2025
0966d6c
remove redundant checks
mattzcarey Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/x402-mcp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export class PayAgent extends Agent<Env> {
);
console.log("Agent will pay from this address:", account.address);

const { id } = await this.mcp.connect("http://localhost:8787/mcp");
const { id } = await this.addMcpServer(
"x402",
"http://localhost:8787/mcp",
"http://localhost:3000"
);

// Build the x402 MCP client
this.x402Client = withX402Client(this.mcp.mcpConnections[id].client, {
Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"url": "https://github.com/cloudflare/agents/issues"
},
"dependencies": {
"@ai-sdk/openai": "2.0.64",
"@cfworker/json-schema": "^4.1.1",
"@modelcontextprotocol/sdk": "^1.21.0",
"ai": "5.0.89",
Expand Down
2 changes: 2 additions & 0 deletions packages/agents/src/ai-chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ export class AIChatAgent<Env = unknown, State = unknown> extends Agent<
override async onRequest(request: Request): Promise<Response> {
return this._tryCatchChat(() => {
const url = new URL(request.url);

if (url.pathname.endsWith("/get-messages")) {
const messages = this._loadMessagesFromDb();
return Response.json(messages);
}

return super.onRequest(request);
});
}
Expand Down
Loading
Loading