Compare

Hosted vs. Self-Hosted MCP Servers: Compare the Costs

A hosted MCP server is run for you by a provider. A self-hosted one runs on a machine you operate, either on your laptop or as a shared service on your own server. Self-hosting gives you control and costs you maintenance. Hosting, like MCPifex, hands the runtime to someone else so you only manage settings.

A concrete example

Say you want Claude to query a Postgres database. Self-hosted, you install an MCP server package on your machine and add a command to Claude's config so it launches the server as a subprocess. It works, but it lives on your laptop, and you own every update.

Hosted, you create an instance of a PostgreSQL server in a portal, save the database credentials there, and paste one URL and key into Claude. Someone else keeps the server running.

Local, remote and hosted are three different words

The MCP spec defines two transports: stdio and Streamable HTTP.[1] With stdio, the client launches the server as a subprocess on the same machine. With Streamable HTTP, the server sits at a URL such as https://example.com/mcp and the client connects over the network.[2]

Those describe the connection, not who runs the server. You can start your own process on your own VPS and expose it over HTTP. That is a remote server, and you are still self-hosting. "Hosted" means a provider runs the process and holds the credentials for you.

Who does the work

Self-hosting means you handle:

  • installing the runtime and keeping it patched;
  • updating dependencies;
  • storing and rotating credentials;
  • testing the connection and recovering when it breaks.

A shared self-hosted service can centralize all of that for a team. You just have to build and maintain it. Hosting moves the runtime work to the provider. You still own the upstream account, its privileges and its credential lifecycle. If a database password rotates, the instance needs the new one either way.

Security: whose privileges does the server run with?

An unconstrained local server can inherit the privileges of the user who starts it. A malicious package could read files or make network requests on its own, without any tool call from the client. MCP's security guidance recommends sandboxing, restricted filesystem and network access, and reviewing what you run locally.[4] A self-hosted setup can have all of that, but only if you configure it.

As of September 2026, MCPifex runs one server process per client session and applies tool policy at the gateway. The client only sees enabled tools, and calls to disabled or uncataloged tools are refused. That limits which operations a client can request. It is not a full sandbox for arbitrary package code, so treat it as one layer. See MCP tools for the protocol side.

Side by side

Self-hostedHosted (MCPifex)
Where it runsYour machine, container or serverMCPifex's infrastructure
Transportstdio locally, or Streamable HTTP if you expose itStreamable HTTP, one endpoint
CredentialsWherever you choose to keep themSaved once in the portal, masked in the UI
Tool access controlWhatever the server or your gateway supportsPer-instance on/off; unlisted tools always refused
Connection testingYou set up tests and monitoring"Test connection" makes a real health-check call
MaintenanceYoursThe provider runs the server; you manage instance settings
CostYour infrastructure and timeA plan, see pricing

What the config looks like

A self-hosted local server is usually a command in the client's config file:

{
  "mcpServers": {
    "<name>": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-<name>"]
    }
  }
}

A hosted one is a URL and a key. This example uses Claude Code's project configuration, so other clients differ. Replace the placeholder with an instance API key:

{
  "mcpServers": {
    "mcpifex": {
      "type": "http",
      "url": "https://mcpifex.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_MCPX_KEY>"
      }
    }
  }
}

For step-by-step client setup, see the guides for Claude Code, Claude Desktop and ChatGPT.

Which should you choose?

Self-host when you need control over the runtime, want the server inside a private network, or use a package that isn't in a managed catalog. Plan for updates, secrets, monitoring and recovery. A good test is to restart the host, replace a credential and reconnect from a second client. Those routine events show the real cost better than the first successful call.

Use hosting when a supported server does the job and you'd rather not run it. Check that the server you need is available, what the plan costs, and that your client can connect. Neither transport nor who owns the machine decides how strong the access boundary is, so check the tool controls in either case.

Where MCPifex fits

MCPifex is a marketplace and hosted gateway for MCP. You create an instance in the portal, choose which tools are enabled, and connect any MCP client with one key. Browse the marketplace or see the PostgreSQL server as a worked example. The quickstart covers setup, and MCPifex vs. Composio compares two hosted options.

Sources

  1. MCP Specification: Transports, modelcontextprotocol.io, revision 2026-07-28.
  2. MCP Specification: Streamable HTTP transport, modelcontextprotocol.io, revision 2026-07-28.
  3. Connect to Remote MCP Servers, modelcontextprotocol.io.
  4. MCP Security Best Practices, modelcontextprotocol.io.
  5. Connect to Local MCP Servers, modelcontextprotocol.io.