Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Model Context Protocol (MCP) Server + WorkOS AuthKit

This is an example Model Context Protocol (MCP) server that allows remote clients to connect and authenticate using WorkOS AuthKit.

AuthKit supports user management features including an organization-centric authentication model allowing you to control tool access based on user and organization permissions.

Getting Started

First to create a WorkOS account by signing into the WorkOS Dashboard.

Next, add the MCP server's callback URL as a Redirect URI under Redirects -> Sign in callback. If you are testing locally, this will be http://localhost:8788/callback, or if deployed, the domain of your deployed worker with the same /callback path.

Next, you must set the WORKOS_CLIENT_ID and WORKOS_CLIENT_SECRET environment variables. These can be obtained from the WorkOS Dashboard under API Keys.

You can set these in the Cloudflare dashboard or using the wrangler CLI:

$ npx wrangler secret put WORKOS_CLIENT_ID <your_workos_client_id>
$ npx wrangler secret put WORKOS_CLIENT_SECRET <your_workos_client_secret>

Note: The WORKOS_CLIENT_ID isn't technically a secret and so you may also choose to set it via your wrangler.jsonc configuration file. But WORKOS_CLIENT_SECRET is not public and should be securely set elsewhere.

And that's it! You can now test out your remote MCP server using the example playground below.

Testing MCP Authentication

Visit the Cloudflare Workers AI playground and enter the URL of your worker:

# Local
http://localhost:8788/sse

# Deployed
https://<your-worker-domain>/sse

After clicking Connect, you'll be redirected to your WorkOS AuthKit domain, where you can sign-in, and be returned to the playground authenticated as a WorkOS AuthKit user.

In the demo code, the generateImage tool is gated behind the image_generation permission. You can read more about Permissions in AuthKit here. Try assigning a permission with the image_generation slug to your user to see how it enables additional tools in the playground.

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • paulwing
  • 使用MCP服务创建的测试存储库

    Reviews

    3.4 (5)
    Avatar
    user_ai3dMoq4
    2025-04-24

    I've been using the workos-mcp-demo application by tobinsouth and I must say it has significantly improved my workflow. The simplicity and efficiency of this tool are remarkable, making my tasks much more manageable. Highly recommended for anyone looking to streamline their work processes.

    Avatar
    user_KVEKutL9
    2025-04-24

    I've been using workos-mcp-demo for a while now and it's been a game changer for my workflow. Created by tobinsouth, this tool is intuitive and powerful. It starts up smoothly and the welcome information is clear and helpful. Highly recommend for anyone looking to streamline their operations!

    Avatar
    user_fXZZN8K1
    2025-04-24

    As a dedicated user of the mcp application, I highly recommend the "workos-mcp-demo" by tobinsouth. This product offers an impressive demonstration of managing operations seamlessly, and its intuitive design makes it easy to navigate. Whether you're a seasoned professional or a newcomer, you'll find this tool to be incredibly valuable.

    Avatar
    user_Igl17HQZ
    2025-04-24

    I recently tried the workos-mcp-demo by tobinsouth, and it's an impressive tool for streamlining workflows! The user interface is intuitive, making it easy to navigate and utilize its powerful features. It's evident that a lot of thought went into the design and functionality. I highly recommend it for anyone looking to enhance their productivity with a reliable MCP application.

    Avatar
    user_J3IDd8Oh
    2025-04-24

    I've been using workos-mcp-demo by tobinsouth for a while now, and it has greatly improved my workflow efficiency. The intuitive interface and robust functionality make it an indispensable tool in my software toolkit. Highly recommend for anyone looking to streamline their operations!