Skip to content

Conversation

@irvinebroque
Copy link
Contributor

WIP do not merge

  • Resolve TODO comments
  • Lots of code references to update as API for both MCP Server and OAuth get finalized
  • Links to change once packages published
  • Some of these sections still WIP
  • agents-sdk as MCP client

M->>C: MCP access token
```

Read the docs for the [Workers oAuth Provider Library](/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified issues

  • Vale Style Guide - (Terms-error) Use 'OAuth' instead of 'oAuth'.

Proposed fix

Suggested change
Read the docs for the [Workers oAuth Provider Library](/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/) for more details.
Read the docs for the [Workers OAuth Provider Library](/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/) for more details.

The term 'oAuth' should be capitalized as 'OAuth' to comply with the style guide. This change is outside of any code references or URLs, so it's appropriate to make this correction.


### (3) Bring your own OAuth Provider

If your application already implements an Oauth Provider itself, or you use Stytch, Auth0, or authorization-as-a-service provider, you can use this in the same way that you would use a third-party OAuth provider, described above in (2).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified issues

  • Vale Style Guide - (Terms-error) Use 'OAuth' instead of 'Oauth'.

Proposed fix

Suggested change
If your application already implements an Oauth Provider itself, or you use Stytch, Auth0, or authorization-as-a-service provider, you can use this in the same way that you would use a third-party OAuth provider, described above in (2).
If your application already implements an OAuth Provider itself, or you use Stytch, Auth0, or authorization-as-a-service provider, you can use this in the same way that you would use a third-party OAuth provider, described above in (2).

I corrected the capitalization of 'Oauth' to 'OAuth' as per the style guide recommendation. This change does not affect any code references or URLs.


For example, the following code defines a simple MCP server that adds two numbers together:

{/* TODO: Reference code in Github, link to a runnable example, use Deploy to Workers button */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified issues

  • Vale Style Guide - (Terms-error) Use 'GitHub' instead of 'Github'.

Proposed fix

Suggested change
{/* TODO: Reference code in Github, link to a runnable example, use Deploy to Workers button */}
{/* TODO: Reference code in GitHub, link to a runnable example, use Deploy to Workers button */}

I corrected the capitalization of 'Github' to 'GitHub' as it was a straightforward capitalization issue not within any restricted context.

* Define public methods on your Worker that can be called by other Workers on the same Cloudflare account, via [Service Bindings](/workers/runtime-apis/bindings/service-bindings/rpc)
* Define public methods on [Durable Objects](/durable-objects) that can be called by other workers on the same Cloudflare account that declare a binding to it.
- Define public methods on your Worker that can be called by other Workers on the same Cloudflare account, via [Service Bindings](/workers/runtime-apis/bindings/service-bindings/rpc)
- Define public methods on [Durable Objects](/durable-objects) that can be called by other workers on the same Cloudflare account that declare a binding to it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified issues

  • Vale Style Guide - (Terms-error) Use 'Workers' instead of 'workers'.

Proposed fix

Suggested change
- Define public methods on [Durable Objects](/durable-objects) that can be called by other workers on the same Cloudflare account that declare a binding to it.
- Define public methods on [Durable Objects](/durable-objects) that can be called by other Workers on the same Cloudflare account that declare a binding to it.

I capitalized 'Workers' as per the style guide recommendation. This change does not affect any code references or special syntax.

@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Mar 16, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Introduced the Model Context Protocol (MCP) documentation with several new sections and examples related to MCP Servers and Clients.

  • Added documentation for Model Context Protocol (MCP) including MCP Servers and Clients.
  • Introduced sections on authentication and authorization for MCP Servers.
  • Provided examples for using third-party OAuth providers with MCP.
  • Included a getting started guide for deploying MCP Servers on Cloudflare.

Modified Files

  • src/content/docs/workers/runtime-apis/rpc/index.mdx

Added Files

  • src/content/docs/agents/model-context-protocol/index.mdx
  • src/content/docs/agents/model-context-protocol/mcp-client.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authentication/index.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authorization/external-oauth-provider.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authorization/index.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authorization/third-party-oauth-provider.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/authorization/worker-as-oauth-provider.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/examples/github.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/examples/index.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/examples/stytch.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/getting-started.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/index.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/tools.mdx
  • src/content/docs/agents/model-context-protocol/mcp-server/transport.mdx
  • src/content/docs/workers/runtime-apis/rpc/mcp-tools.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2025

Preview URL: https://d5a94c13.preview.developers.cloudflare.com
Preview Branch URL: https://bib-mcp-3.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/third-party-oauth-provider/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/third-party-oauth-provider/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/getting-started/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/getting-started/
https://developers.cloudflare.com/workers/runtime-apis/rpc/ https://bib-mcp-3.preview.developers.cloudflare.com/workers/runtime-apis/rpc/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/tools/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/tools/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/transport/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/transport/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/authentication/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/authentication/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-client/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-client/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/worker-as-oauth-provider/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/worker-as-oauth-provider/
https://developers.cloudflare.com/agents/model-context-protocol/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/examples/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/examples/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/authorization/oauth-provider-api-reference/
https://developers.cloudflare.com/workers/runtime-apis/rpc/mcp-tools/ https://bib-mcp-3.preview.developers.cloudflare.com/workers/runtime-apis/rpc/mcp-tools/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-server/ https://bib-mcp-3.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-server/

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2025

CI run failed: build logs

```

{/* TODO: Update code link */}
This will ensure that your users are redirected to GitHub to authenticate. If you're curious to understand what the `GitHubHandler` does you can read the code [here](https://github.com/geelen/mcp-remote-examples/blob/main/04-oauth-pivot/src/index.ts#L48-L152).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified issues

  • Vale Style Guide - (cloudflare.MeaningfulLinkWords-warning) Warning: Rewrite the link text for [here](https://github.com/geelen/mcp-remote-examples/blob/main/04-oauth-pivot/src/index.ts#L48-L152) to be more descriptive. For more information, refer to Descriptive link text.

Proposed fix

Suggested change
This will ensure that your users are redirected to GitHub to authenticate. If you're curious to understand what the `GitHubHandler` does you can read the code [here](https://github.com/geelen/mcp-remote-examples/blob/main/04-oauth-pivot/src/index.ts#L48-L152).
This will ensure that your users are redirected to GitHub to authenticate. If you're curious to understand what the `GitHubHandler` does you can read the code in the [GitHubHandler source code](https://github.com/geelen/mcp-remote-examples/blob/main/04-oauth-pivot/src/index.ts#L48-L152).

The link text 'here' is not descriptive. I've replaced it with 'GitHubHandler source code' to provide more context about the link's destination.

@irvinebroque irvinebroque mentioned this pull request Mar 18, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.