# I built one self-hosted MCP server that every AI client shares

> Source: <https://dev.to/alexzai007/i-built-one-self-hosted-mcp-server-that-every-ai-client-shares-i9f>
> Published: 2026-12-06 15:33:38+00:00

**Key takeaway:** SelfMCP's three-tier tool exposure (search_tools, get_tool, call_tool) keeps the client-visible tool list fixed as upstream MCP servers are added, avoiding the degraded tool selection and context bloat that comes with putting 300 tools in front of a model.

Every AI app I use starts from zero.

Claude Code on the laptop, claude.ai on my phone and Codex each keep their own MCP servers, their own API keys and their own memory. A new laptop or a new AI meant an evening of setting everything up again, and my notes, passwords and Telegram were not reachable from any of them.

So I built **SelfMCP**: one MCP server, on a server I own, that every AI connects to. I think of it as an exosuit. The AI is swappable, the suit stays.

You connect each client once, with one URL and a browser sign-in (OAuth 2.1). After that every AI you use sees:

`claude mcp add ...` line you would put in a local config;
|  | Without SelfMCP | With SelfMCP | 
|---|---|---|
| Memory | each AI forgets the others | one memory, every AI reads and writes it | 
| MCP servers | set up again in every app | add once, every AI has it, no reconnect | 
| API keys | pasted into config files | in a vault: the AI uses them, never sees them | 
| New laptop or new AI | an evening of setup | paste one link | 

If you put 300 tools in front of a model, it gets worse at picking the right one, and your context fills up before you say anything. SelfMCP exposes tools in three tiers:

`get_tool` and calls it through `call_tool`.` search_tools`, `connect`, `status`.
The exposed tool list never changes when you add an upstream MCP, so no client has to reconnect.

Paste this into Claude Code or Codex:

```
Install SelfMCP for me: https://github.com/AlexZai007/selfmcp
```

or run it in a terminal:

```
curl -LsSf https://raw.githubusercontent.com/AlexZai007/selfmcp/main/install.sh | sh
```

It asks where to install (a VPS over SSH, this server, or only this computer), sets up HTTPS, a firewall and nightly backups, moves your notes, Claude skills and MCP configs over (passwords and keys go to the vault, not into notes), and connects Claude Code and Codex on your machine. Any $5 VPS with 2 GB RAM works.

Python 3.12, the official MCP SDK, Postgres, Caddy, Docker. AGPL-3.0. About 100 decision records in `docs/decisions` if you like reading why things are the way they are.

It is a beta (`v0.1.0-beta.2`), so expect rough edges. I would love feedback on two things: the security model (`docs/ARCHITECTURE.md`, `SECURITY.md`), and whether "one MCP for every client" matches how you use AI.
