{"id":30202833,"url":"https://github.com/workos/authkit-xmcp","last_synced_at":"2025-08-13T11:08:11.113Z","repository":{"id":305779693,"uuid":"1020464342","full_name":"workos/authkit-xmcp","owner":"workos","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-21T19:50:55.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T12:01:35.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-15T23:14:31.000Z","updated_at":"2025-07-21T19:50:57.000Z","dependencies_parsed_at":"2025-07-22T01:44:22.848Z","dependency_job_id":"37919039-ce0d-435d-a035-fe92a8f727bf","html_url":"https://github.com/workos/authkit-xmcp","commit_stats":null,"previous_names":["workos/authkit-xmcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/workos/authkit-xmcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fauthkit-xmcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fauthkit-xmcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fauthkit-xmcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fauthkit-xmcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workos","download_url":"https://codeload.github.com/workos/authkit-xmcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fauthkit-xmcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270228408,"owners_count":24548821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-13T11:08:06.967Z","updated_at":"2025-08-13T11:08:11.066Z","avatar_url":"https://github.com/workos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XMCP + AuthKit\n\n[XMCP](https://github.com/basementstudio/xmcp) is one of the easiest ways to get up and running quickly for MCP using TypeScript. This project is a demo to help you get started adding AuthKit to your XMCP server.\n\n## Setup\n\nYou can create a new XMCP server via `npx create-xmcp-app@latest`. This will set up the file structure for the tools you need and give you `src/tools/greet.ts`.\n\nTo protect this tool with AuthKit, all you need to do is add the following URLs to `xmcp.config.ts`:\n\n```ts\nimport { type XmcpConfig } from \"xmcp\";\n\n// You either need to set the AUTHKIT_DOMAIN environment variable or replace the variable with hard-coded strings below.\nconst config: XmcpConfig = {\n  experimental: {\n    oauth: {\n      baseUrl: \"http://localhost:3002\", // Or your future deployment URL\n      endpoints: {\n        authorizationUrl: `${process.env.AUTHKIT_DOMAIN}/oauth2/authorize`,\n        tokenUrl: `${process.env.AUTHKIT_DOMAIN}/oauth2/token`,\n        registerUrl: `${process.env.AUTHKIT_DOMAIN}/oauth2/register`,\n        userInfoUrl: `${process.env.AUTHKIT_DOMAIN}/oauth2/userinfo`,\n      },\n      issuerUrl: process.env.AUTHKIT_DOMAIN as string,\n      defaultScopes: [\"openid\", \"profile\", \"email\"],\n    },\n  },\n  http: {\n    port: 3002,\n  },\n};\n// Don't forget to set your redirect URLs in the WorkOS dashboard.\n\nexport default config;\n```\n\nYou can find your AuthKit domain in your [WorkOS Dashboard](https://workos.com), where you can also set the redirect URI to point to your resource server's `/callback` endpoint.\n\nFrom here, you can run `npm run dev`. That's all!\n\n## Accessing user info in tools\n\nTo access user info in tools, extract it from the JWT bearer token in the header. You can see an example of this in `src/tools/userInfo.ts`.\n\nThis works by using `import { headers } from \"xmcp/headers\"` to access the headers handled by XMCP, and verification is done by `jose` using the JWKS endpoint on the AuthKit domain.\n\nTo access organization information or richer user metadata, use the [WorkOS SDK](https://workos.com/docs/sdks/node).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fauthkit-xmcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkos%2Fauthkit-xmcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fauthkit-xmcp/lists"}