-
Notifications
You must be signed in to change notification settings - Fork 299
feat: agents mcp #643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: agents mcp #643
Conversation
mattzcarey
commented
Nov 8, 2025
- loads from Github, caches chunks in KV for 1 day.
- uses stemming to do a fuzzy keyword match.
|
commit: |
Claude Code ReviewCritical Issues1. Missing KV namespace ID in wrangler.jsonc (site/agents/wrangler.jsonc:10-13)
2. Top-level await breaks ES module compatibility (site/agents/src/server/utils.ts:26-29)
3. Environment access pattern is fragile (site/agents/src/server/utils.ts:3,40,126)
Minor Issues4. No test coverage
5. Error messages lose context (site/agents/src/server/index.ts:58-67)
6. Index rebuild on every request when cache miss (site/agents/src/server/utils.ts:139-171)
|
threepointone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will review in detail later, this is exciting but I need to finish my slides haha
| inputSchema | ||
| }, | ||
| async ({ query, k }) => { | ||
| const searchEffect = Effect.gen(function* () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sneaking in effect huh
site/agents-mcp/package.json
Outdated
| "types": "wrangler types" | ||
| }, | ||
| "dependencies": { | ||
| "@cfworker/json-schema": "^4.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }, | ||
| async ({ query, k }) => { | ||
| const searchEffect = Effect.gen(function* () { | ||
| console.log({ query, k }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd kinda like to have some logging on the queries are being asked. We need to instrument the server properly but I added this till then.
| export default { | ||
| async fetch(request: Request, env: Env, ctx: ExecutionContext) { | ||
| return createMcpHandler(mcpServer)(request, env, ctx); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can make a scheduled worker here and run this everyday
003e3e6 to
a758ed3
Compare
|
@mattzcarey can you check whether I've broken anything? if it looks good I'll land and ship |
| const CHUNK_SIZE = 2000; | ||
| const MIN_CHARS_PER_CHUNK = 500; | ||
|
|
||
| const chunker = await RecursiveChunker.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I'm not sure this works in prod...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently it does
Adds documentation for the new Agents SDK Documentation MCP server that provides token-efficient search of Cloudflare Agents SDK documentation. Related to cloudflare/agents#643 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
📚 Documentation syncA documentation PR has been created to sync these changes: The documentation updates include:
cc @cloudflare/docs-team |
|
📚 Documentation sync status ✅ Documentation has been synced to cloudflare-docs#26617 This PR adds the Agents SDK Documentation MCP server to the catalog of Cloudflare-managed MCP servers. This is an automated comment from the documentation sync workflow |
|
Looks good!! :) can test it at |
* feat: agents mcp * more effect and stemming * add readme * add note about ratelimiting * move it all into the site app * Update package-lock.json * fix: add main entrypoint and node compat --------- Co-authored-by: Sunil Pai <[email protected]>