Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

What is an MCP server? The Model Context Protocol explained

MCP servers are how AI apps such as Claude, ChatGPT and VS Code reach your files, databases and services. This guide explains what an MCP server is, how local and remote servers differ, how each app connects, what can go wrong, and how to run your own on a VPS with HTTPS and authentication.

Short answer: An MCP server is a program that gives AI applications such as Claude, ChatGPT or VS Code access to tools, data and prompt templates through the Model Context Protocol, an open standard Anthropic released in November 2024. A local MCP server runs on your computer over stdio; a remote one runs as a web service over Streamable HTTP.

What is an MCP server?

An MCP server is a program that exposes tools, data and prompt templates to AI applications through the Model Context Protocol (MCP). Anthropic released MCP as an open standard on 25 November 2024, and it is now supported by Claude, ChatGPT, Visual Studio Code and many other AI tools. Instead of every AI app writing its own plug-in for GitHub, a database or your company's API, the service is wrapped once as an MCP server and any MCP-compatible app can use it.

The MCP documentation splits every setup into three roles:

  • MCP host: the AI application you use, such as Claude Desktop, ChatGPT or VS Code.
  • MCP client: a connection object the host creates for each server. One host can hold many clients, one per server.
  • MCP server: the program that provides the context, whether it runs on your laptop or on a server across the internet.

An MCP server is not an AI model. It does not think or generate text. It lists what it can do, the AI model decides when to use it, and the host sends the request and returns the result to the model.

What an MCP server provides: tools, resources and prompts

The three MCP server primitives, from the MCP architecture overview
PrimitiveWhat it isExampleMain methods
ToolsFunctions the AI model can call to take an actionRun a database query, create a GitHub issue, fetch a weather reporttools/list, tools/call
ResourcesData sources that give the model context (read by the client with resources/read)A file's contents, a database schema, an API responseresources/list, resources/read
PromptsReusable templates for a taskA "review this pull request" template with few-shot examplesprompts/list, prompts/get

Messages between client and server use JSON-RPC 2.0. The client asks tools/list what tools exist, passes their names, descriptions and input schemas to the model, and calls tools/call when the model picks one.

What is an MCP server in AI?

A large language model on its own only knows its training data and what you type. To read your files, query your sales figures or open a ticket, it needs tools. Before MCP, every AI product had its own plug-in format, so a company that wanted its service available in three AI apps had to build three integrations. MCP replaces that with one protocol: build the server once, and every host that speaks MCP can connect to it.

The MCP documentation is explicit that MCP only covers the exchange of context. It does not decide which model you use or how the app uses what the server returns.

How does an MCP server work?

In protocol version 2026-07-28, MCP is stateless: every request carries the protocol version and the client's capabilities in its _meta field, so the server can handle each request on its own. A typical exchange looks like this:

  1. Discovery (optional). The client sends server/discover, which every server must implement, and gets back the protocol versions, capabilities and identity the server supports.
  2. Listing. The client calls tools/list (and resources/list or prompts/list if the server offers them) and hands the tool names, descriptions and input schemas to the model.
  3. Calling. When the model decides a tool is needed, the host sends tools/call with the arguments, usually after showing it to you for approval.
  4. Result. The server runs the action, for example a database query or an API request, and returns text, images or structured JSON, which the host passes back to the model.

If the server needs more input during a call, such as a confirmation from you, it returns an "input required" result and the client retries the call with the answer. Servers built for the older handshake-based versions (2025-11-25 and earlier) start with an initialize request instead; the specification describes how newer clients detect them and fall back.

MCP server vs API

Ordinary REST APIMCP server
Written forDevelopers writing code against documented endpointsAI applications that discover tools at run time
DiscoveryRead the docs, then code each calltools/list returns names, descriptions and JSON Schemas the model reads
Message formatAny (usually JSON over HTTP verbs)JSON-RPC 2.0 over stdio or Streamable HTTP
Who decides the callYour codeThe AI model, usually with the user approving it
RelationshipMany MCP servers are thin wrappers that call an existing API on the model's behalf

MCP transports: stdio vs Streamable HTTP

The specification defines two standard transports. The messages are the same on both; only the way they are carried changes.

MCP transports in protocol version 2026-07-28
stdio (local)Streamable HTTP (remote)
Where the server runsOn the same machine, launched by the client as a subprocessAs an independent web service, anywhere on a network
How messages travelNewline-delimited JSON-RPC on stdin and stdoutEach message is an HTTP POST to one MCP endpoint, such as https://example.com/mcp
ResponsesOn stdout, one message per lineA single JSON object, or a Server-Sent Events (SSE) stream for that request
Clients servedTypically oneTypically many
AuthenticationCredentials come from environment variablesHTTP authentication; the spec's authorization section is based on OAuth 2.1
Loggingstderr only; anything else on stdout breaks the protocolNormal server logs
Good forDesktop tools, file access, developer tools on your own machineShared team tools, SaaS integrations, servers that ChatGPT or Claude on the web must reach

Two details trip people up. First, a stdio server must never print to stdout: the official build guide warns that a stray print() or console.log() corrupts the JSON-RPC stream. Log to stderr instead. Second, Streamable HTTP has changed between versions. It replaced the older HTTP+SSE transport in protocol version 2025-03-26, and version 2026-07-28 removed protocol-level sessions (the Mcp-Session-Id header) and the separate GET stream. Every request now carries its protocol version, and the client sends an MCP-Protocol-Version header with each POST. If a tutorial shows session IDs, it was written for an earlier revision; the specification describes how clients and servers fall back to talk to older versions.

How Claude, ChatGPT and VS Code connect to an MCP server

Checked against each vendor's documentation on 25 November 2026
ClientLocal (stdio) serversRemote serversRemote authentication
Claude DesktopYes, listed in claude_desktop_config.json under mcpServers with a command and argsYes, as a custom connectorOAuth, no sign-in, or fixed request headers such as an API key or bearer token
Claude on the webNoYes: Customize > Connectors, then + Add > Add custom connector (on Team and Enterprise, an owner adds it first)As above
ChatGPT (custom MCP servers, on the web)No local command servers; a private or local server can be reached through a Secure MCP Tunnel linked to the ChatGPT workspaceYes, by server URL; SSE and streaming HTTPOAuth, no authentication, or mixed (OAuth or no authentication)
VS CodeYes, as a command (stdio) serverYes, as an HTTP server (HTTP or SSE)As the server publisher documents; review any trust request before accepting it

The point that matters most for hosting: Claude's custom connectors reach your server from Anthropic's cloud, not from your laptop. Anthropic's help article says this applies even in Claude Desktop: the server must be reachable over the public internet from Anthropic's IP ranges, on the standard HTTPS port, and Claude cannot connect to a URL that names another port. A server that listens only on localhost cannot be used as a custom connector. A server behind a firewall can be, if you allowlist the outbound IP ranges Anthropic publishes for MCP tool calls (the "Outbound IP addresses" section of platform.claude.com/docs/en/api/ip-addresses). For a Claude custom connector you therefore need a public HTTPS endpoint, which is what the VPS section below sets up.

ChatGPT works differently. Its custom MCP server setup takes either a server URL or a Secure MCP Tunnel: a tunnel-client inside your network long-polls OpenAI and forwards each request to the private server, so OpenAI's documentation says the server does not need a public listener or an open inbound firewall port. Creating a tunnel and selecting it need tunnel permissions in your OpenAI organisation, and the tunnel must be linked to the ChatGPT workspace you use. A public HTTPS endpoint on a VPS is still the simpler option when you want the server online all the time or shared with clients outside your workspace.

On Claude Desktop, the config file is at %APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and ~/.config/Claude/claude_desktop_config.json on Linux. Restart the app after editing it.

MCP server security: authentication, least privilege and prompt injection

An MCP server lets an AI model act with real permissions, so it deserves the same care as any other public API, plus a few risks that are specific to AI.

Authentication

  • Authorization is optional in the specification, but any remote server holding private data needs it. For HTTP servers the spec builds on OAuth 2.1: the server publishes OAuth 2.0 Protected Resource Metadata (RFC 9728), and clients must use Resource Indicators (RFC 8707) so each token names the server it is for.
  • Servers must check that every token was issued for them and reject anything else. Passing a client's token straight through to another API ("token passthrough") is explicitly forbidden.
  • Tokens go in the Authorization: Bearer header on every request, never in the URL query string.
  • A static bearer token is simpler and works with Claude's request headers, but ChatGPT's documentation lists only OAuth or no authentication. Choose based on the clients you need.

Least privilege

  • Give the server its own API key or database user with only the rights its tools need: read-only where possible, one schema, one repository.
  • Expose few, narrow tools. A run_sql tool that accepts any query is far riskier than get_order_status(order_id).
  • If you use OAuth scopes, the security best-practices page recommends a small starting scope set and asking for more only when a privileged tool is first used. Wildcard or omnibus scopes such as *, all or full-access are listed as a common mistake.
  • Mark read-only tools with the readOnlyHint annotation. ChatGPT treats tools without it as write actions and asks the user to confirm them.

Prompt injection and untrusted servers

Prompt injection is text that changes what the model does. The indirect kind arrives through content the model reads, such as a web page, an email or a file returned by a tool. Through MCP, a poisoned document can tell the model to call another tool and send data somewhere it should not go. The tools specification asks for a human in the loop who can deny tool calls, and says clients must treat tool annotations as untrusted unless they come from a trusted server. In practice:

  • Keep approval prompts on for any tool that writes, deletes, pays or sends.
  • Do not connect servers from unknown publishers. A local stdio server runs with your user account's permissions, and a malicious one can run any command you could.
  • Validate all tool inputs on the server, rate-limit tool calls and sanitise outputs. The specification lists all of these as server MUSTs.
  • Avoid connecting a tool that reads untrusted content and a tool that can send data out in the same session unless a person reviews each call.

How to self-host a remote MCP server on a VPS in India

A remote MCP server is just a small web service. A Linux VPS with a public IP, a domain name and a TLS certificate gives Claude's custom connectors the public HTTPS endpoint they need, and lets ChatGPT connect by URL without a tunnel. Running it on a server in Mumbai or Delhi NCR keeps the MCP server and any database it uses in India, close to Indian users. Tool results are still sent to the AI provider you connect, and tools that call outside services such as GitHub handle data wherever those services run.

  1. Set up the server. Start with a fresh Ubuntu VPS, create a non-root user, use SSH keys and turn on a firewall that allows only SSH, 80 and 443. Our Ubuntu VPS initial setup guide covers each step.
  2. Point a subdomain at it. Create an A record such as mcp.example.in pointing to the VPS IP. See how to point a domain to a VPS.
  3. Run your MCP server on localhost only. Build it with an official MCP SDK in its Streamable HTTP mode and bind it to 127.0.0.1 on a high port such as 8000, so only the reverse proxy can reach it. The specification recommends binding to localhost rather than all interfaces. Run it under systemd or in Docker (install Docker on Ubuntu) so it restarts after a reboot.
  4. Put a reverse proxy with TLS in front. The proxy terminates HTTPS on port 443 and forwards to the server. Caddy is the shortest route because it gets and renews Let's Encrypt certificates on its own once DNS points to the server and ports 80 and 443 are open:
    mcp.example.in {
        @noauth not header Authorization "Bearer {$MCP_TOKEN}"
        respond @noauth 401
        reverse_proxy 127.0.0.1:8000
    }
    Caddy replaces {$MCP_TOKEN} with the environment variable when it loads the config, and it flushes text/event-stream responses immediately, so SSE replies are not held back. The token check is a simple gate for clients that send a fixed header; for ChatGPT, or for many users, implement OAuth in the server itself.
  5. Or use nginx. If nginx already serves your sites, add a location block and get a certificate with Certbot:
    location /mcp {
        proxy_pass http://127.0.0.1:8000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_read_timeout 3600s;
    }
    nginx buffers proxied responses by default, which delays SSE events. The spec asks servers to send X-Accel-Buffering: no, and proxy_buffering off covers servers that do not. The default proxy_read_timeout is 60 seconds between two reads, so a quiet subscriptions/listen stream can be cut unless you raise it or the server sends SSE keep-alive comments, which the spec encourages.
  6. Check the server's own protections. It must validate the Origin header and return 403 for an invalid one, and it should authenticate every request.
  7. Connect a client. In Claude, add a custom connector with https://mcp.example.in/mcp and the authentication you chose. In ChatGPT on the web, add it as a custom MCP server with the same URL. Test it first with the official MCP Inspector to see the tool list and try calls.

What size VPS does an MCP server need?

Most MCP servers are small processes that wait for a request, call an API or database, and return the result, so their own CPU and memory use is usually low. What sets the size is what runs beside them: a database, a headless browser for a scraping tool, or an automation tool such as n8n. Measure the memory of your server under real use rather than guessing, and use our guide on how much RAM a VPS needs to size the rest. We have not benchmarked specific MCP servers, so we do not quote RAM figures for them here.

Our KVM VPS starts at ₹674 (US$7.66) per 30 days plus 18% GST for 2 vCPU, 4 GB RAM, 40 GB NVMe and 5 TB of transfer, with full root access, in Mumbai (BOM-1) or Delhi NCR (DEL-1). Each 30-day period is paid in advance, Linux servers are usually ready in under 60 seconds, and you can move up a plan later. See KVM VPS plans.

This guide was written by the Bigdomainhost team with AI assistance; Bigdomainhost sells the VPS plans mentioned. Protocol details were checked against the MCP specification, version 2026-07-28, and client details against each vendor's documentation on 25 November 2026. MCP changes quickly, so check the linked pages before you build.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is an MCP server in simple words?

It is a small program that lets an AI app use something outside itself, such as your files, a database or a service like GitHub. The server lists its tools, the AI model picks one when it needs it, and the app runs the call and passes the result back, usually after you approve it.

What is an MCP server in AI?

In AI, an MCP server is the bridge between a language model and the outside world. The model cannot read your database or call an API by itself; the MCP server offers those actions as tools with names, descriptions and input schemas, the model picks one, and the host app runs it through the server and returns the result.

Is MCP only for Claude?

No. Anthropic open-sourced the Model Context Protocol as an open standard on 25 November 2024, and other hosts support it, including ChatGPT and Visual Studio Code. An MCP server built once can be used by any compatible client, though each client supports different transports and sign-in methods.

What is the difference between a local and a remote MCP server?

A local server runs on your own computer: the AI app launches it and talks to it over stdio, its standard input and output. A remote server runs as a web service and uses the Streamable HTTP transport, so many users and cloud apps such as ChatGPT or Claude on the web can reach it over HTTPS.

Is an MCP server safe to use?

It is as safe as the server and the permissions you give it. A local server runs with your user account's rights, so install only servers from publishers you trust. Keep approval prompts on for actions that write or send data, give each server the narrowest API key it needs, and watch for prompt injection from content the tools read.

Can ChatGPT or Claude connect to an MCP server on localhost?

Claude cannot. Its custom connectors connect from Anthropic's cloud, even in Claude Desktop, so the server must be reachable from the internet over HTTPS on the standard port 443; a server behind a firewall works only if you allowlist Anthropic's published outbound IP ranges, and one that listens only on localhost does not work. ChatGPT can reach a private or local server through OpenAI's Secure MCP Tunnel, which runs a tunnel client inside your network and needs tunnel permissions plus a tunnel linked to your ChatGPT workspace. Claude Desktop and VS Code can also run local stdio servers on your own machine.

Do I need a VPS to run an MCP server?

Not for a local one; it runs on your own computer. You need a server with a public IP when the MCP server must be online all the time, be shared by a team, or be reached by Claude custom connectors, which need a public HTTPS endpoint. A small Linux VPS with a domain, a reverse proxy and a TLS certificate is enough for most.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.