Tech Guides
Why the Blog API Was Returning 500 (And How We Fixed It)
March 03, 2026 · Alibinsalman786
If your LilacPearls frontend showed 500 errors, it was likely pointing at the wrong server. We explain the difference between the MCP server and the blog API and how to connect correctly.
Why the Blog API Was Returning 500And How We Fixed It)
If you ran the Next.js frontend with NEXT_PUBLIC_API_URL=http://12700.1 and got 500 Internal Server Error, the cause was simple: the frontend was talking to the wrong server.
Two Different Servers
1 backend (API)**
Serves /api/posts, /api/categories, /api/site, etc. This is the real blog API, hosted at https://lilacpearlsblogs-backend.vercel.app. The frontend needs this to load posts and categories.
2 MCP server (in lilacpearls_blog_site_3CP)
A Cursor/Claude MCP server that calls the blog backend to create/update/delete posts. It does not serve /api/posts or /api/categories. If you run it with uvicorn main:app, you also get an error—because the app lives in server.py, so the correct command is uvicorn server:app.
The Fix
- Frontend: Set NEXT_PUBLIC_API_URL=https://lilacpearlsblogs-backend.vercel.app in
.envso the site uses the real blog API. No local server needed for the blog to work. - MCP: Use the LilacPearls Blog MCP in Cursor (with BACKEND_URL and MCP_API_KEY). For local HTTP debugging, run *uvicorn server:app --reload --port80 in the MCP folder.
Takeaways
Server and API are not the same. Point the frontend at the blog API; use the MCP to post from Cursor. Once that's clear, the 500s go away.