- Open Warp → Settings → MCP Servers
- Click "+ Add"
- Paste this configuration:
{
"auth-setup": {
"command": "node",
"args": [
"/home/officialrajdeepsingh/opensource/auth-setup/dist/mcp-server.js"
]
}
}- Click Start to activate the server
{
"nextjs-auth-setup": {
"command": "npx",
"args": ["-y", "auth-setup"]
}
}After adding the server, you should see:
- ✅ Server status: Running
- ✅ Tools available:
setup_nextjs_authcheck_nextjs_project
Open Warp Agent Mode and try these commands:
Set up Auth.js authentication in my Next.js project at /home/user/my-app
The agent will:
- Validate the project
- Ask which providers you want
- Set everything up automatically
Set up Auth.js with Google and GitHub OAuth in my Next.js project at /home/user/my-app using Prisma adapter
Set up Better Auth in my Next.js project at /home/user/my-app
Check if /home/user/my-app is a valid Next.js project with App Router
You can test the MCP server directly:
# Start the MCP server (it uses stdio)
node dist/mcp-server.jsThen send MCP protocol messages (JSON-RPC format).
Check MCP server logs in Warp:
Linux:
cd "${XDG_STATE_HOME:-$HOME/.local/state}/warp-terminal/mcp"
ls -la
# View logs for your server
cat nextjs-auth-setup.logYou: "I need to add authentication to my Next.js app"
Agent: "I can help you set up authentication. What's the path to your Next.js project?"
You: "/home/user/my-project"
Agent: [Checks project] "This is a valid Next.js project with App Router. Which authentication library would you like to use: Auth.js or Better Auth?"
You: "Auth.js with Google login"
Agent: [Sets up auth] "✅ Done! I've set up Auth.js with Google OAuth. Here's what I created:
- auth.ts
- middleware.ts
- app/api/auth/[...nextauth]/route.ts
- app/auth/signin/page.tsx
- .env.local
Next steps:
- Run: npm install
- Update .env.local with your Google OAuth credentials
- Generate AUTH_SECRET: openssl rand -base64 32"
You: "Add Auth.js with GitHub to /home/user/my-blog"
Agent: [Validates and sets up] "✅ Auth.js with GitHub is now configured in /home/user/my-blog. Don't forget to add your GitHub OAuth credentials to .env.local!"
- Check logs in Warp MCP settings
- Verify the path is correct
- Make sure Node.js is installed:
node --version
- Restart the MCP server in Warp
- Check that the build completed:
ls dist/mcp-server.js - Rebuild if needed:
npm run build
Make sure the MCP server can write to your Next.js project directory.
The Warp agent, using this MCP server, can:
✅ Validate Next.js projects
✅ Set up Auth.js with multiple providers
✅ Set up Better Auth
✅ Configure database adapters (Prisma, Drizzle)
✅ Generate all necessary files
✅ Update package.json automatically
✅ Provide environment variable templates
✅ Give clear next steps
❌ Install npm packages (you need to run npm install)
❌ Create OAuth credentials for you
❌ Start your dev server
❌ Set up the database schema (you need to run migrations)
You can be very specific with the agent:
Set up Auth.js in /home/user/my-app with:
- Google OAuth
- GitHub OAuth
- Credentials-based login
- Prisma adapter for PostgreSQL
The agent will use the MCP server to configure everything exactly as specified.
- Always provide absolute paths for best results
- Be specific about providers you want
- Mention your database if you're using one
- Ask the agent to check first if you're unsure about your project structure
After making changes to the code:
npm run buildThen restart the server in Warp MCP settings.
You're now ready to use AI-powered auth setup! 🎉