Skip to content

Commit 817abbc

Browse files
Merge pull request #446 from basementstudio/canary
v0.6.0
2 parents 8cddea3 + 6d5d671 commit 817abbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2030
-1196
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"use client";
2+
3+
import { cn } from "@/utils/cn";
4+
5+
interface ActionCardGridProps {
6+
children: React.ReactNode;
7+
className?: string;
8+
}
9+
10+
export function ActionCardGrid({ children, className }: ActionCardGridProps) {
11+
return (
12+
<div className="not-prose">
13+
<div
14+
className={cn(
15+
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 my-6",
16+
className
17+
)}
18+
>
19+
{children}
20+
</div>
21+
</div>
22+
);
23+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
import { cn } from "@/utils/cn";
5+
import { Icons } from "@/components/icons";
6+
7+
type IconKey = keyof typeof Icons;
8+
9+
export interface ActionCardProps {
10+
label: string;
11+
icon: IconKey;
12+
onClick?: () => void;
13+
href?: string;
14+
}
15+
16+
export function ActionCard({ label, icon, onClick, href }: ActionCardProps) {
17+
const IconComponent = Icons[icon];
18+
19+
const content = (
20+
<>
21+
<span className="w-8 h-8 border border-dashed border-brand-neutral-400 bg-brand-neutral-600 grid place-items-center shrink-0">
22+
<IconComponent className="w-4 h-4 text-brand-w1" />
23+
</span>
24+
<span className="text-brand-w1 font-medium text-sm relative z-10">
25+
{label}
26+
</span>
27+
<span className="absolute -right-2 top-1/2 -translate-y-1/2 text-brand-neutral-600 pointer-events-none">
28+
<IconComponent className="size-12" />
29+
</span>
30+
</>
31+
);
32+
33+
const className = cn(
34+
"relative flex items-center gap-3 px-3 py-2.5",
35+
"border border-brand-neutral-600 bg-[rgba(5,5,5,0.85)]",
36+
"hover:border-brand-neutral-400",
37+
"cursor-pointer text-left overflow-hidden",
38+
"no-underline hover:no-underline !decoration-transparent hover:!decoration-transparent",
39+
"hover:!text-brand-w1 !opacity-100 hover:!opacity-100"
40+
);
41+
42+
if (href) {
43+
return (
44+
<Link href={href} className={className}>
45+
{content}
46+
</Link>
47+
);
48+
}
49+
50+
return (
51+
<button onClick={onClick} className={className}>
52+
{content}
53+
</button>
54+
);
55+
}

apps/website/components/icons.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,4 +520,77 @@ export const Icons = {
520520
/>
521521
</svg>
522522
),
523+
betterAuth: (props: React.SVGProps<SVGSVGElement>) => (
524+
<svg
525+
width="20"
526+
height="20"
527+
viewBox="0 0 24 24"
528+
fill="none"
529+
xmlns="http://www.w3.org/2000/svg"
530+
{...props}
531+
>
532+
<path
533+
d="M0 3.39014V20.6101H5.783V15.0601H12.217V8.93914H5.783V3.39014H0ZM12.217 8.93914L17.855 8.94014V15.0621H12.217V20.6101H24V3.39114H12.217V8.93914Z"
534+
fill="currentColor"
535+
/>
536+
</svg>
537+
),
538+
clerk: (props: React.SVGProps<SVGSVGElement>) => (
539+
<svg
540+
width="20"
541+
height="20"
542+
viewBox="0 0 128 128"
543+
fill="none"
544+
xmlns="http://www.w3.org/2000/svg"
545+
{...props}
546+
>
547+
<circle cx="64" cy="64" r="20" fill="currentColor" />
548+
<path
549+
d="M99.572 10.788c1.999 1.34 2.17 4.156.468 5.858L85.424 31.262c-1.32 1.32-3.37 1.53-5.033.678A35.846 35.846 0 0 0 64 28c-19.882 0-36 16.118-36 36a35.846 35.846 0 0 0 3.94 16.391c.851 1.663.643 3.712-.678 5.033L16.646 100.04c-1.702 1.702-4.519 1.531-5.858-.468C3.974 89.399 0 77.163 0 64 0 28.654 28.654 0 64 0c13.163 0 25.399 3.974 35.572 10.788Z"
550+
fill="currentColor"
551+
fillOpacity="0.5"
552+
/>
553+
<path
554+
d="M100.04 111.354c1.702 1.702 1.531 4.519-.468 5.858C89.399 124.026 77.164 128 64 128c-13.164 0-25.399-3.974-35.572-10.788-2-1.339-2.17-4.156-.468-5.858l14.615-14.616c1.322-1.32 3.37-1.53 5.033-.678A35.847 35.847 0 0 0 64 100a35.846 35.846 0 0 0 16.392-3.94c1.662-.852 3.712-.643 5.032.678l14.616 14.616Z"
555+
fill="currentColor"
556+
/>
557+
</svg>
558+
),
559+
workos: (props: React.SVGProps<SVGSVGElement>) => (
560+
<svg
561+
width="24"
562+
height="21"
563+
viewBox="0 0 24 21"
564+
fill="none"
565+
xmlns="http://www.w3.org/2000/svg"
566+
{...props}
567+
>
568+
<g clip-path="url(#clip0_6482_601)">
569+
<path
570+
d="M13.9761 0C13.5186 0.326507 13.1315 0.74324 12.8382 1.225L12.7843 1.31609L11.7677 3.09126L7.53582 10.4939L11.5441 17.4844L10.5284 19.2605C9.71354 20.6894 8.00963 21.3357 6.46369 20.8022C5.67525 20.5368 5.03597 19.9543 4.60435 19.238L4.56047 19.1634L0.351848 11.8099C0.119629 11.4138 4.45406e-06 10.9539 4.45406e-06 10.4939C-0.000793808 10.061 0.105719 9.63475 0.309848 9.254L0.351848 9.17861L4.6801 1.61426C5.23538 0.635676 6.25847 0.0269595 7.37372 0.000945946L7.44825 0H13.9761ZM15.3194 0.185405C16.8414 -0.332027 18.5119 0.28473 19.3456 1.66203L19.384 1.72711L23.6482 9.17766C23.8804 9.57297 24 10.0337 24 10.4939C24 10.925 23.8949 11.3563 23.6903 11.7342L23.6482 11.809L19.3199 19.3734C18.7646 20.3519 17.7415 20.9607 16.6263 20.9868L16.5518 20.9876H10.0239C10.4741 20.6622 10.861 20.2514 11.1576 19.7689L11.2157 19.6715L12.2323 17.8954L16.4642 10.4939L12.4559 3.49442L13.4162 1.82416C13.8477 1.07308 14.5047 0.460014 15.3194 0.185405Z"
571+
fill="currentColor"
572+
/>
573+
</g>
574+
<defs>
575+
<clipPath id="clip0_6482_601">
576+
<rect width="24" height="21" fill="currentColor" />
577+
</clipPath>
578+
</defs>
579+
</svg>
580+
),
581+
auth0: (props: React.SVGProps<SVGSVGElement>) => (
582+
<svg
583+
width="24"
584+
height="24"
585+
viewBox="0 0 24 24"
586+
fill="none"
587+
xmlns="http://www.w3.org/2000/svg"
588+
{...props}
589+
>
590+
<path
591+
d="M21.9783 7.448L19.6183 0H4.34527L2.01827 7.448C0.666275 11.76 2.04827 16.654 5.83327 19.463L12.0053 24L18.1623 19.448C21.9173 16.638 23.3443 11.76 21.9773 7.433L15.8173 12.013L18.1603 19.463L12.0033 14.866L5.84527 19.446L8.20327 12.013L2.01527 7.463L9.64528 7.418L12.0063 0L14.3623 7.404L21.9783 7.448Z"
592+
fill="currentColor"
593+
/>
594+
</svg>
595+
),
523596
};

apps/website/components/layout/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function DocsPage({ toc = [], pageActions, ...props }: DocsPageProps) {
3535
<p className="text-sm text-brand-white mb-2 font-medium">
3636
On this page
3737
</p>
38-
<div className="flex flex-col pb-4 border-b border-white/20">
38+
<div className="flex flex-col pb-4 border-b border-white/20 max-h-2/3 overflow-y-auto sidebar-scrollbar">
3939
{toc.map((item) => (
4040
<TocItem key={item.url} item={item} />
4141
))}

apps/website/components/mdx-components.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ConceptBoxes, ConceptBox } from "./concept-boxes";
66
import { Callout } from "./ui/callout";
77
import { Video } from "./video";
88
import { McpConnect } from "./mcp-connect";
9+
import { OAuthPlugins } from "./oauth-plugins";
910

1011
export function getMDXComponents(components?: MDXComponents): MDXComponents {
1112
return {
@@ -17,6 +18,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
1718
Callout,
1819
Video,
1920
McpConnect,
21+
OAuthPlugins,
2022
...components,
2123
};
2224
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"use client";
2+
3+
import { ActionCard } from "@/components/action-card";
4+
import { ActionCardGrid } from "@/components/action-card-grid";
5+
6+
const OAUTH_PLUGINS = [
7+
{
8+
label: "Better Auth",
9+
icon: "betterAuth" as const,
10+
href: "/docs/integrations/better-auth",
11+
},
12+
{
13+
label: "Clerk",
14+
icon: "clerk" as const,
15+
href: "/docs/integrations/clerk",
16+
},
17+
{
18+
label: "WorkOS",
19+
icon: "workos" as const,
20+
href: "/docs/integrations/workos",
21+
},
22+
{
23+
label: "Auth0",
24+
icon: "auth0" as const,
25+
href: "/docs/integrations/auth0",
26+
},
27+
];
28+
29+
export function OAuthPlugins() {
30+
return (
31+
<ActionCardGrid>
32+
{OAUTH_PLUGINS.map((plugin) => (
33+
<ActionCard
34+
key={plugin.label}
35+
label={plugin.label}
36+
icon={plugin.icon}
37+
href={plugin.href}
38+
/>
39+
))}
40+
</ActionCardGrid>
41+
);
42+
}
Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,20 @@
11
---
22
title: "OAuth"
33
metadataTitle: "OAuth Authentication | xmcp Documentation"
4-
publishedAt: "2025-07-06"
5-
summary: "Learn how to use OAuth authentication in your xmcp application."
6-
description: "Implement OAuth in your MCP server with your own providers."
4+
publishedAt: "2025-01-16"
5+
summary: "OAuth authentication plugins for xmcp servers."
6+
description: "Production-ready OAuth implementations with authentication plugins."
77
---
88

99
<Callout variant="warning">
10-
This is an experimental feature and may not work as expected.
10+
The experimental `oauth` configuration has been deprecated in favor of
11+
production-ready plugin implementations.
1112
</Callout>
1213

13-
The OAuth provider implementation strictly implements Dynamic Client Registration.
14+
The built-in OAuth system has been replaced with dedicated authentication plugins that provide better DX, improved security, and more features out of the box.
1415

15-
You can configure the OAuth provider by adding the following to your `xmcp.config.ts` file:
16+
Use one of the official plugins below that handle OAuth flows, token management, and session handling for you:
1617

17-
```typescript title="xmcp.config.ts"
18-
import { XmcpConfig } from "xmcp";
18+
<OAuthPlugins />
1919

20-
const config: XmcpConfig = {
21-
experimental: {
22-
oauth: {
23-
baseUrl: "https://my-app.com",
24-
endpoints: {
25-
authorizationUrl: "https://auth-provider.com/oauth/authorize",
26-
tokenUrl: "https://auth-provider.com/oauth/token",
27-
registerUrl: "https://auth-provider.com/oauth/register", // mandatory
28-
},
29-
issuerUrl: "https://my-app.com",
30-
defaultScopes: ["openid", "profile", "email"],
31-
pathPrefix: "/oauth2",
32-
},
33-
},
34-
};
35-
36-
export default config;
37-
```
38-
39-
The usage of this configuration is only limited to the HTTP transport on apps scaffolded with `create-xmcp-app`, not with the adapter modes.
20+
Each plugin integrates directly with its respective auth provider and requires minimal configuration. Choose the one that matches your existing infrastructure or start fresh with any of them.

0 commit comments

Comments
 (0)