[GH-ISSUE #6093] Tanstack Start Example for MCP #19051

Closed
opened 2026-04-15 17:49:58 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @hardikmodi1 on GitHub (Nov 19, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6093

I am using better auth in my application using tanstack start. Its really awesome DX. Now I want to write MCP server for this app. Examples provided on documentation site uses Vercel mcp adapters, which according to their repo readme, supports only Nextjs and Nuxt.
Amy guide on how to do this for tanstack start.

Originally created by @hardikmodi1 on GitHub (Nov 19, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6093 I am using better auth in my application using tanstack start. Its really awesome DX. Now I want to write MCP server for this app. Examples provided on documentation site uses Vercel mcp adapters, which according to their repo readme, supports only Nextjs and Nuxt. Amy guide on how to do this for tanstack start.
GiteaMirror added the locked label 2026-04-15 17:49:58 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 19, 2025):

(tag @better-auth-agent if you would like an answer from the Agent)

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3551804050 --> @better-auth-agent[bot] commented on GitHub (Nov 19, 2025): (tag @better-auth-agent if you would like an answer from the Agent) <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@hardikmodi1 commented on GitHub (Nov 19, 2025):

@better-auth-agent

<!-- gh-comment-id:3551813161 --> @hardikmodi1 commented on GitHub (Nov 19, 2025): @better-auth-agent
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 19, 2025):

Hi there! Thanks for reaching out and for your kind words about Better Auth’s DX with Tanstack Start.

Although our official documentation and examples for the MCP server currently focus on Vercel’s adapters for Next.js and Nuxt, you can certainly adapt the approach for Tanstack Start. Here’s a high-level roadmap to get you started:

  1. Begin by reviewing our basic usage and framework-agnostic integration guides, which outline how to configure and initialize Better Auth in various environments. This will help you set the baseline for your Tanstack Start application.

  2. Compare the Vercel MCP adapter logic (e.g., how authentication endpoints, token handling, and session management are set up) with what you’d need in your Tanstack Start environment. The core idea is to replicate the necessary API routes and configuration while replacing Vercel-specific parts with components that are compatible with Tanstack Start.

  3. Leverage our plugin and hook system to integrate any additional functionality required by your MCP server. This flexibility should allow you to customize the MCP endpoints to your specific needs.

  4. Finally, consider checking our community discussions or creating an issue on GitHub if you run into challenges. There might be early community examples or someone with similar experience who can offer additional insights.

Could you share which part of the MCP server integration is proving most challenging for you? Tag @bekacru and @ping__ if you need more in-depth support from our core team. Tag @better-auth-agent if you would like an answer from the Agent.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3551814658 --> @better-auth-agent[bot] commented on GitHub (Nov 19, 2025): Hi there! Thanks for reaching out and for your kind words about Better Auth’s DX with Tanstack Start. Although our official documentation and examples for the MCP server currently focus on Vercel’s adapters for Next.js and Nuxt, you can certainly adapt the approach for Tanstack Start. Here’s a high-level roadmap to get you started: 1. Begin by reviewing our basic usage and framework-agnostic integration guides, which outline how to configure and initialize Better Auth in various environments. This will help you set the baseline for your Tanstack Start application. 2. Compare the Vercel MCP adapter logic (e.g., how authentication endpoints, token handling, and session management are set up) with what you’d need in your Tanstack Start environment. The core idea is to replicate the necessary API routes and configuration while replacing Vercel-specific parts with components that are compatible with Tanstack Start. 3. Leverage our plugin and hook system to integrate any additional functionality required by your MCP server. This flexibility should allow you to customize the MCP endpoints to your specific needs. 4. Finally, consider checking our community discussions or creating an issue on GitHub if you run into challenges. There might be early community examples or someone with similar experience who can offer additional insights. Could you share which part of the MCP server integration is proving most challenging for you? Tag @bekacru and @ping__ if you need more in-depth support from our core team. Tag @better-auth-agent if you would like an answer from the Agent. <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@rovertrack commented on GitHub (Nov 23, 2025):

I think for better DX we must make it support tanstack start and by default have some tools done for the users
@himself65 ?

<!-- gh-comment-id:3568229302 --> @rovertrack commented on GitHub (Nov 23, 2025): I think for better DX we must make it support tanstack start and by default have some tools done for the users @himself65 ?
Author
Owner

@hardikmodi1 commented on GitHub (Dec 20, 2025):

This worked as it is given in the docs. Only thing to note is to name the folder starting with . as [.] in tanstack.
Thanks everyone for the support

<!-- gh-comment-id:3677872536 --> @hardikmodi1 commented on GitHub (Dec 20, 2025): This worked as it is given in the docs. Only thing to note is to name the folder starting with `.` as `[.]` in tanstack. Thanks everyone for the support
Author
Owner

@himself65 commented on GitHub (Dec 20, 2025):

Thank u

<!-- gh-comment-id:3677895111 --> @himself65 commented on GitHub (Dec 20, 2025): Thank u
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#19051