Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

An MCP server is the server-side program that makes tools, data, or reusable prompts available to an AI application through the Model Context Protocol (MCP). The AI host connects an MCP client to that server, discovers the capabilities it declares, and then asks it to perform an allowed action or return context. The server is not the language model and does not have to be a complete AI application.

This guide explains the three MCP primitives, transport choices, protocol-version issues, and a TypeScript example you can adapt. It also shows how a screenshot service such as ScreenshotNeo can be exposed to an agent as an MCP tool.

How an MCP server fits into an AI application

MCP is an open standard that connects AI applications to the systems where your data and tools live, according to the official TypeScript SDK documentation. A typical connection has four parts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Host: the AI application, such as an editor or chat product, that the user operates.
  2. Client: the host-side MCP component that opens a protocol connection and presents available capabilities to the model.
  3. Server: your program. It declares tools, resources and prompts, validates requests, performs work and returns protocol messages.
  4. Backend: the APIs, files, databases or services that the server is authorized to access.

The model proposes a tool call; the client sends it to the server; the server executes its handler and returns text or structured data. A server can therefore be a small local process or a network service. It does not “run the model.”

#1 Best Overall
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
  • Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

The three server primitives

The MCP server overview separates capabilities by purpose:

Primitive What it does Typical example Who normally invokes it
Tools Request an action, calculation or retrieval. The handler runs on the server. Query an issue tracker, resize an image, or take a screenshot. The model, through the client, after the user allows it.
Resources Expose contextual data managed by the application. A document, database record or generated report identified by a URI. The host or client, often to provide context.
Prompts Reusable message templates and workflows. A “summarize this incident” template with arguments. Usually the user selects one; it is not an autonomous action.

Keep the boundary intentional. A read-only resource is safer than a tool that can modify the same data. Tool descriptions and input schemas are part of the interface the model sees, so state side effects, required permissions and limits there.

Transport: local process or remote service?

stdio for local integrations

With stdio, the host launches your server as a child process and exchanges protocol messages over standard input and output. It is a practical choice for a developer tool running on the same machine: no public port is required, and the host controls process lifetime. Log diagnostics to stderr, not stdout, because stdout carries protocol traffic.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Streamable HTTP for remote connections

Streamable HTTP is designed for a server reached over a network. You must handle deployment, authentication, authorization, TLS and concurrent requests. The host you choose must support the transport and its authentication method; there is no universal host compatibility matrix.

SSE and older examples

The v1 TypeScript SDK guide describes HTTP plus Server-Sent Events (SSE) as a backward-compatibility path. Do not copy an SSE example into a v2 deployment without checking the host and migration documentation.

Rank #2
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
  • Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
  • Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
  • CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
  • CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
  • CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)

Protocol and SDK versions matter

The stable TypeScript SDK v2 documentation states that its v2 line implements the 2026-07-28 MCP specification. That specification announcement describes several changes, including:

  • Retirement of the initialize/initialized exchange.
  • Retirement of the Mcp-Session-Id header.
  • An optional server/discover RPC.
  • Self-contained requests.
  • ttlMs and cacheScope metadata on list and resource-read responses.

These are version-specific statements, not properties of every MCP server. Older clients and the v1 SDK examples use different assumptions. Keep the SDK package, server, client and protocol revision aligned, and read the migration guide before combining snippets.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Working TypeScript example (SDK v2 baseline)

The following one-file pattern follows the v2 documentation’s McpServer and tool-registration model. It demonstrates a safe, deterministic tool; replace the handler with your own operation. Confirm current package names and transport helpers in the v2 guide before production use, because SDK APIs can change.

1. Create the project

mkdir mcp-demo
cd mcp-demo
npm init -y
npm install @modelcontextprotocol/sdk zod
npm install -D typescript tsx

Set your project to run TypeScript with npx tsx server.ts. A host that supports local MCP servers should be configured to launch that command using stdio.

2. Register a tool

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "text-tools",
  version: "1.0.0"
});

server.registerTool(
  "word_count",
  {
    title: "Count words",
    description: "Count non-empty whitespace-separated words in supplied text.",
    inputSchema: {
      text: z.string().min(1).max(100000)
    }
  },
  async ({ text }) => {
    const words = text.trim() ? text.trim().split(/s+/).length : 0;
    return {
      content: [{ type: "text", text: JSON.stringify({ words }) }],
      structuredContent: { words }
    };
  }
);

const transport = new StdioServerTransport();
await server.connect(transport);

The important pieces are the name, human-readable description, schema and callback. When a client lists tools, it receives that declaration. A conforming call supplies a text value; the SDK validates it before your handler runs. The callback returns normal content plus structured output for clients that understand it.

Rank #3
ELECROW CrowPi Case Kit for Raspberry Pi 5, 9-Inch Display
  • Not including the Raspberry Pi 5 (8GB), the Crowpi advanced version comes with the Raspberry Pi 5
  • ELECROW Black Case for the Raspberry Pi 5, CrowPi is equipped with a 9-inch HD touchscreen along with a camera; All the regular components used in DIY electronics are packed into the CrowPi development board, such as LCD, LED matrix, buzzer, light sensor, PIR sensor, ultrasonic sensor, IR sensor, etc
  • Raspberry Pi Sensors: The Crowpi raspberry pi 5 programming kit is jam-packed with lots of buttons such as 19 different sensors in a tidy easy to use package; You don't have to wait and wire things
  • Build Quality: Solid ABS shell and well made components in one place make it strong and convenient to travel
  • Programming Lessons: This raspberry pi 5 learning kit ships with step by step instructions and provides 21 lessons to take you through identifying components reading code and running it in the terminal

3. Connect it to a host

In your host’s MCP configuration, select a local/stdio server and set the command to npx with arguments tsx /absolute/path/to/server.ts (the exact UI labels vary by host). Restart or reload the host, inspect the discovered tool list, and ask the model to count a short sample. If discovery succeeds but calls fail, run the command directly and check stderr.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

End-to-end v1 quickstart option

If you need a documented runnable client/server pair rather than adapting the v2 pattern, use the v1 quickstart in the official v1 SDK guide. It instructs you to install dependencies, start simpleStreamableHttp.ts, then run its matching interactive client in another terminal. That sample covers tools, resources and prompts. Treat it as a v1 example: use its package names and protocol behavior together, and do not mix them with v2 snippets without checking migration notes.

Designing a production MCP server

Validate every argument

Use a schema with bounds, enumerations and required fields. Reject unknown or dangerous values before touching a backend. Never let a model-supplied path, URL or SQL fragment become an unrestricted filesystem or database operation.

Make permissions explicit

Give each tool the smallest credential scope possible. Separate read and write tools, require confirmation for destructive actions, redact secrets from returned content and log request IDs rather than tokens.

Return useful, bounded results

Prefer structured fields for values a client may need to reuse. Truncate huge documents, paginate lists and include actionable error text. A tool should report whether an operation was completed, not merely return an empty success message.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
  • Fully assembled for plug-and-play operation
  • Includes Raspberry Pi 5 with 8GB RAM
  • 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
  • M.2 HAT+
  • CanaKit Turbine Black Case for the Pi 5

Plan for latency and retries

Set backend timeouts, cancel work when the client disconnects and make mutating operations idempotent where possible. Remote Streamable HTTP deployments need TLS, authentication, rate limits and observability. For stdio, ensure only protocol messages use stdout and that the host can restart a crashed process.

Troubleshooting

The host shows no tools

  • Confirm the executable path, working directory and environment variables.
  • Run the exact launch command manually.
  • Check that diagnostics go to stderr, not stdout.
  • Verify the host supports your selected transport and protocol revision.

Initialization or session errors

You may be mixing a client that expects an older revision with a server targeting the 2026-07-28 specification. Align versions or use the matching v1 example. In particular, do not add Mcp-Session-Id or an initialize exchange to a flow that explicitly targets the newer revision.

Tool calls fail schema validation

Inspect the advertised schema and the actual JSON arguments. Enforce string lengths, numeric ranges and required properties at the server boundary. Return a clear error and avoid performing partial writes.

Remote calls time out

Check TLS and proxy buffering, server logs, backend deadlines and host support for Streamable HTTP. Test a trivial health-oriented tool first, then add the slow backend operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your MCP tool needs website images, you can call ScreenshotNeo instead of maintaining browser automation. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be disabled. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status.

One GET request returns PNG, JPEG or WebP (or a PDF):

Best Value
RasTech Raspberry Pi 5 8GB Kit with Active Cooler and Pi5 Case
  • 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
  • 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
  • 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
  • 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
  • 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for the full 63-option interface: full-page or CSS-selector capture, device and retina settings, dark mode, PDF paper and page controls, custom CSS/JavaScript, clicks, waits, request blocking, headers, cookies, user agents, timezone, geolocation, transparency, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data and OpenAPI. It also provides an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan, and annual billing gives two months free. Create a free ScreenshotNeo account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to use an MCP server

  • Use one when an AI host needs a consistent, discoverable interface to your private systems.
  • Choose tools for controlled actions, resources for application-managed context and prompts for user-selected workflows.
  • Choose stdio for a locally spawned integration; choose Streamable HTTP for a network service.
  • Pin compatible SDK and protocol versions, especially when moving between v1 examples and the 2026-07-28/v2 baseline.

Frequently Asked Questions

Is an MCP server an AI model?

No. It is server-side software that exposes declared capabilities to an MCP client. The host supplies the AI model and user interface.

Can one server expose tools and resources together?

Yes. A server may register multiple primitive types, provided each has a clear purpose and suitable authorization.

Should I use stdio or Streamable HTTP?

Use stdio when the host launches a local process. Use Streamable HTTP when clients connect over a network, subject to the host’s current transport and authentication support.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$259.95
Bestseller No. 2
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM); Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
$159.99
Bestseller No. 4
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
Fully assembled for plug-and-play operation; Includes Raspberry Pi 5 with 8GB RAM; 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
$339.97

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.