Skip to content

The field guides / Learn MCP

MCP guides

Learn MCP concepts, compare server frameworks, and build, secure, debug, and deploy TypeScript MCP servers with practical xmcp guides.

Ready to build? Start with installation, choose a template, or explore integrations.

37 guides

MCP 2026-07-28: what changed and how to build a stateless server

MCP 2026-07-28 removed sessions and the initialize handshake. What changed, and how to keep state without a session.

How to call an MCP server from TypeScript

Connect to any MCP server from Node.js, list and call its tools, and read structured results with xmcp's client.

Caching MCP listings: ttlMs, cacheScope, and subscriptions/listen

Use ttlMs, cacheScope, and subscriptions to tell MCP clients how long tool, prompt, and resource listings stay fresh.

Human-in-the-loop MCP tools: asking users for input with input_required

Pause an MCP tool to ask the user a question with an input_required result, then finish the call on the retry.

MCP Server Cards: make your server discoverable

What an MCP Server Card at /.well-known/mcp/server-card.json contains, and how xmcp serves one for discovery.

MCP server observability: execution logs and trace context

See what your MCP server does in production with structured execution logs and W3C trace context from request _meta.

MCP structured output: outputSchema and structuredContent explained

Return typed data from MCP tools with outputSchema and structuredContent, including arrays, primitives, and unions.

How to serve Agent Skills from an MCP server

Publish Agent Skills from an MCP server with the Skills extension, and ship your first one with xmcp.

MCP tool permissions: show each user only the tools they can use

Add role-based access control to an MCP server: hide tools a caller can't use and reject direct calls with one policy.

Choosing an AI Tool for Building MCP Servers

Pair an AI coding assistant with xmcp to build a TypeScript MCP server, then check the result yourself.

From TypeScript functions to MCP tools

Turn typed TypeScript functions into MCP tools with xmcp's experimental schema inference from types and JSDoc.

Best MCP Server Frameworks in 2026: TypeScript Edition

Compare the official SDK, FastMCP, mcp-handler, and xmcp, and choose a TypeScript MCP framework for your project.

How to Deploy an MCP Server to Production (Vercel, Lambda, Railway)

Compare Vercel, AWS Lambda, Railway, and ECS for hosting an MCP server, and see the tradeoffs of each.

How to Debug Your MCP Server (MCP Inspector Guide)

Use the MCP Inspector to test tools, catch protocol errors, and diagnose the most common MCP server failures.

How to Monetize Your MCP Server (x402 and Polar)

Charge for MCP tool usage with x402 per-call payments or Polar subscriptions, using xmcp integrations.

MCP Elicitation: How AI Agents Ask Users for Input Mid-Task

How MCP elicitation asks the user for input during a tool call, which clients support it, and how to validate replies.

How to Add Authentication to Your MCP Server

Secure MCP server tools with OAuth 2.1 using xmcp's auth plugins for Better Auth, Clerk, Auth0, WorkOS, and Scalekit.

MCP Server: Python vs TypeScript (Which Should You Use?)

Compare the Python and TypeScript MCP SDKs on type safety, ecosystem, and tooling, and pick one for your team.

MCP Tools vs Resources vs Prompts: When to Use Each

MCP tools, resources, and prompts are controlled by different actors. Learn what each one is for and when to use it.

MCP vs OpenAI Function Calling: Key Differences Explained

MCP and OpenAI function calling both let models run your code, but they solve different problems. When to use each.

MCP Server vs REST API: When to Use Each

MCP servers and REST APIs serve different clients. When to build each one, and when you need both.

MCP Clients Explained: Claude, Cursor, and the Growing Ecosystem

A guide to MCP clients like Claude Desktop, Cursor, and GitHub Copilot, and how each one connects to MCP servers.

xmcp vs Vercel mcp-handler: Which MCP Solution Is Right for You?

xmcp vs Vercel's mcp-handler: file-based tools or an HTTP request handler. How to choose for your TypeScript app.

How to Build an MCP Server in TypeScript (2026 Guide)

Build an MCP server in TypeScript with xmcp: scaffold a project, write a tool, and connect it to Claude or Cursor.

Fix: MCP Server Won't Connect in Claude Desktop

A checklist for MCP servers that won't connect in Claude Desktop: transports, mcp-remote, STDIO logging, and config.

MCP Transports Explained: STDIO vs SSE vs Streamable HTTP

STDIO, legacy HTTP+SSE, and Streamable HTTP compared: when to use each MCP transport and how xmcp configures them.

MCP "Session not found" (HTTP 404): Causes & Fixes

Why MCP clients get HTTP 404 'Session not found' after a server restart or redeploy, and how stateless servers avoid it.

What Is an MCP Server? A Plain-English Guide

An MCP server exposes tools, resources, and prompts to AI clients. What that means, and how to build one with xmcp.

Integrating NestJS with xmcp

Add an MCP server to your NestJS application with tool discovery and a customizable module.

How to build an MCP App

Build an MCP App with xmcp: interactive React widgets and tool-rendered UIs that work in ChatGPT and other clients.

Securing Your MCP Server

When an MCP server needs authentication, how it works, and which approach fits your use case.

How to submit your ChatGPT MCP app

Prepare an xmcp MCP app for OpenAI review: deployed endpoint, accurate tool metadata, and domain verification.

Monetize your GPT apps with Stripe

Charge for GPT app features with Stripe external checkout, and gate tools behind a successful payment.

Running DOOM in ChatGPT: A Step-by-Step Guide

How we made DOOM playable inside ChatGPT with xmcp: frames rendered as images and inputs sent as tool calls.

Connect to external MCPs and make their tools yours

Generate typed TypeScript clients for remote or STDIO MCP servers with one xmcp command, with autocomplete for tools.

Integrating Polar with xmcp

Gate MCP tools behind Polar license keys in xmcp, and track per-tool usage for subscriptions and metered billing.

Integrating Better Auth with xmcp

Add authentication to an xmcp MCP server with Better Auth and PostgreSQL: sessions, OAuth 2.1, and account linking.

One framework to rule them all