Publishing an MCP Server on Your Own VPS
How to think about setting up, on your own VPS, a mechanism that safely bridges AI to external data and features. We also cover how to narrow the scope of exposure.

Ren

Procura
Why set one up on your own VPS
- If you want the AI to handle data only you have (notes, database contents), you don't need to hand it over to an outside party
- You decide which features are available (you write what the AI is allowed to do)
- If you keep it running, the AI can call it anytime

Ren

Wilson
How to narrow the scope of exposure

Procura
- Always require authentication, so that only those holding a key or token can call it
- Don't casually allow strong operations like writing or deleting
- Don't expose it to the whole internet; limit it to only the parties who need it
- Keep call logs so you can notice unexpected usage
Prepare a way to cut connections too
Windows you've built tend to be left alone after you stop using them. Connections you made just to try something, or keys that went unused after someone changed roles, can remain and stay as an entrance without anyone noticing. Regularly review whether only connections actually in use remain, and shut down anything you don't recognize early.
- Manage the keys and tokens you've issued in a list so you can disable them at any time
- Review connections that are no longer used on a regular schedule, with a deadline
- Don't give one key multiple purposes

Wilson

Procura
Ren
Procura
When it's called by several AIs at once
You can also set up a single MCP server so that several AI apps or several users call it at the same time. It's convenient, but when access concentrates at once, responses can slow down or things can be processed in an unintended order. It may not matter in a personal experiment, but once it's meant to be shared by several people, review it with simultaneous access in mind.
- Record who called it and when, so you can see the state of simultaneous access
- Design write operations so they don't produce contradictions even when run at the same time
- If you expect more users, check how the load behaves early

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.