← ALL POSTS

An MCP Server for One Person

My blog already had an MCP server I draft with, so I gave my portfolio one too. Deciding what it must never do was the real work.

WESSCOBY · NOV 2026 · 4 MIN READ

My blog runs on Auropress, and Auropress has an MCP server that I use to draft posts, among other things. Through it I can easily review, edit and write drafts.

After the recent changes to my portfolio, I wanted a smooth way to handle some of its functionality the same way. A typical example is updating the NOW block on the home page, and another is finishing the cover workflow by generating a post's cover and attaching it directly to the published post.

So I built the portfolio its own MCP server. Getting it running took one auth plugin, but deciding what an assistant is allowed to change took most of the thought.

What it may do

I didn't want the assistant publishing anything without me reviewing it first, and these are the limits it works within:

  • It reads everything: projects (drafts included) and their case studies, the NOW block, the about page, the published posts, and the freshness board that lists what has gone stale.
  • It drafts projects. A project it creates is always a draft, and a published project is read-only to it, so publishing happens in my dashboard after I have read the preview.
  • The NOW block and the about page change live, because they have no draft state.
  • A cover can be attached to a published post, but an existing cover is only replaced when I say so.
  • Nothing is deleted. No tool removes a project or a paragraph, so a case study that gets shorter leaves its extra paragraphs empty, which renders nothing, and the tool says so.

The server also gives every assistant that connects its own instructions, which include this:

Nothing can be deleted through MCP. State only what the owner said or the work shows: no invented numbers, roles, outcomes or transcripts.

The setup is one plugin

The portfolio already signs me in through Better Auth, and Better Auth's MCP plugin lets your app act as an OAuth authorization server for MCP clients. So the sign-in I already had became the server an assistant asks for a token. These are the two plugins that do it, from the auth config:

jwt(),
mcp({
	resource: mcpResource(process.env.BETTER_AUTH_URL ?? 'http://localhost:9377'),
	loginPage: '/admin/login',
	consentPage: '/admin/oauth/consent',
	scopes: MCP_SCOPES,
	allowDynamicClientRegistration: true,
	clientRegistrationDefaultApplicationType: 'native',
	allowUnauthenticatedClientRegistration: true,
	clientRegistrationDefaultScopes: MCP_SCOPES,
	accessTokenExpiresIn: 3600,
	refreshTokenExpiresIn: 30 * 86_400,
}),

Registration is open, so any client can register itself. The dashboard only lets one GitHub account sign in, though. A registered client gets a row in a table and nothing else until I sign in and approve it on the consent screen. native is there because some MCP clients register a callback on localhost, which the web default rejects.

The traps

Discovery lives at the root, and Better Auth lives at /auth. An MCP client finds the authorization server from metadata at the site's root, because the MCP spec says servers must implement OAuth 2.0 Protected Resource Metadata. My auth routes sit under /auth, so three small routes under /.well-known/ forward into Better Auth's handler. With those in place, a call without a token gets the answer that starts the sign-in, shown here without the headers that don't matter:

HTTP/1.1 401 Unauthorized
www-authenticate: Bearer resource_metadata="http://localhost:9377/.well-known/oauth-protected-resource/api/mcp"
{"jsonrpc":"2.0","error":{"code":-32000,"message":"missing authorization header"},"id":null}

Next refuses updateTag in a route handler. Every save in my dashboard expires the public pages' cache with updateTag, but the MCP endpoint is a route handler, and Next's own source says so plainly:

updateTag can only be called from within a Server Action. To invalidate cache tags in Route Handlers or other contexts, use revalidateTag instead. …

So the MCP writes use revalidateTag with an immediate expiry and record the expiry the same way a dashboard save does. That record matters because the freshness board would otherwise read an assistant's write as one made outside the dashboard.

A test read only the Location header. The first end-to-end test reported that authorizing landed on / instead of the consent screen, and the server was right. Node's fetch sends sec-fetch-mode: cors, and Better Auth treats that as a browser fetch:

function isBrowserFetchRequest(headers) {
	return headers?.get("sec-fetch-mode") === "cors";
}

So instead of a 302 it answered with JSON, which the test never looked at:

200 null {"redirect":true,"url":"/admin/oauth/consent?response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1%3A53682%2Fcallback&scope=openid+portfolio%3Aread&state=x&client_id=…

A real browser, driven through the same flow, was redirected to the consent screen. A script testing it has to accept either answer.

A token outlives its revocation. The access tokens are JWTs, and a JWT access token cannot be revoked, because it is never stored. Revoking an assistant in Settings would otherwise leave it working for up to an hour. So the endpoint checks that the consent still exists on every call, and revoking deletes the consent and the tokens together. One line from the test run proves it:

  ok   revoked, the very next call is refused

The first real call went through production the same day, and it listed my four published projects.

What it cost

Mostly time, and the deprecated client registration. This server uses dynamic client registration. The MCP spec released in July says Dynamic Client Registration is deprecated, retained for backwards compatibility with servers that don't support Client ID Metadata Documents. The rate limit also lives in the server's memory, which works for one instance and would not for two.

Where it lives

The endpoint is wesscoby.com/api/mcp, and connecting to it starts the sign-in on my dashboard, where only I can say yes.

If you're adding one

Start with read tools, keep publishing manual. But most importantly, start with why.