# MCP guides

Build, authenticate, debug, and deploy TypeScript MCP servers.

- [From TypeScript functions to MCP tools](https://xmcp.dev/blog/typescript-functions-as-mcp-tools): Reuse typed functions as MCP tools with experimental schema inference in xmcp. Generate input validation from TypeScript and JSDoc, and keep explicit schemas where you need them.

- [Best MCP Server Frameworks in 2026: TypeScript Edition](https://xmcp.dev/blog/best-mcp-server-frameworks): A practical guide to the main TypeScript frameworks for building MCP servers — the official SDK, FastMCP, Vercel's mcp-handler, and xmcp — with a clear recommendation for each use case.

- [How to Deploy an MCP Server to Production (Vercel, Lambda, Railway)](https://xmcp.dev/blog/deploy-mcp-server-production): A practical comparison of the main MCP server deployment targets — Vercel, AWS Lambda, Railway, and ECS — with the tradeoffs for each and how xmcp simplifies the Vercel path.

- [Best FastMCP Alternatives for TypeScript MCP Servers (2026)](https://xmcp.dev/blog/fastmcp-alternatives): Looking for alternatives to FastMCP? Here's how the main TypeScript MCP frameworks compare — and when xmcp, the official SDK, or Vercel's mcp-handler might be a better fit.

- [How to Debug Your MCP Server (MCP Inspector Guide)](https://xmcp.dev/blog/how-to-debug-mcp-server): MCP servers fail silently in ways that REST APIs don't. Here's how to use the MCP Inspector to test tools, catch protocol errors, and diagnose the most common issues.

- [How to Monetize Your MCP Server (x402 and Polar)](https://xmcp.dev/blog/how-to-monetize-mcp-server): Two practical approaches to charging for MCP tool usage: x402 for per-call micropayments and Polar for subscription-based access — using xmcp integrations.

- [MCP Elicitation: How AI Agents Ask Users for Input Mid-Task](https://xmcp.dev/blog/mcp-elicitation-explained): Learn how MCP elicitation requests user input during a tool call, which clients can handle it, and how to validate responses in an xmcp server.

- [How to Add Authentication to Your MCP Server](https://xmcp.dev/blog/mcp-server-authentication): A practical guide to securing MCP server tools with OAuth 2.1 — and how xmcp's auth plugins (Better Auth, Clerk, Auth0, WorkOS, Scalekit) make it straightforward.

- [MCP Server: Python vs TypeScript (Which Should You Use?)](https://xmcp.dev/blog/mcp-server-python-vs-typescript): Both Python and TypeScript have official MCP SDKs. Here's how they compare on type safety, ecosystem, tooling, and the path to production — and how to choose for your team.

- [MCP Tools vs Resources vs Prompts: When to Use Each](https://xmcp.dev/blog/mcp-tools-vs-resources-vs-prompts): MCP servers can expose three types of capabilities: tools, resources, and prompts. They're not interchangeable — each one is controlled by a different actor and used for a different purpose.

- [MCP vs OpenAI Function Calling: Key Differences Explained](https://xmcp.dev/blog/mcp-vs-openai-function-calling): OpenAI function calling and MCP both let AI models invoke external code — but they solve different problems. Here's how they compare and when to use each.

- [MCP Server vs REST API: When to Use Each](https://xmcp.dev/blog/mcp-vs-rest-api): MCP servers and REST APIs both expose functionality over a network — but they're designed for different clients. Here's when to build each one, and when you need both.

- [MCP Clients Explained: Claude, Cursor, and the Growing Ecosystem](https://xmcp.dev/blog/what-are-mcp-clients): An MCP server is only half the picture — here's a guide to the clients (Claude Desktop, Cursor, GitHub Copilot, and others) that connect to MCP servers, and how each one works.

- [xmcp vs Vercel mcp-handler: Which MCP Solution Is Right for You?](https://xmcp.dev/blog/xmcp-vs-mcp-handler): A focused comparison of xmcp and Vercel's mcp-handler — two very different takes on MCP in TypeScript. One is a standalone framework; the other bolts MCP onto an existing Next.js or Nuxt app.

- [How to Build an MCP Server in TypeScript (2026 Guide)](https://xmcp.dev/blog/build-mcp-server-typescript): A step-by-step guide to building a Model Context Protocol (MCP) server in TypeScript with xmcp: scaffold a project, write your first tool, run it locally, and connect it to Claude or Cursor.

- [Fix: MCP Server Won't Connect in Claude Desktop](https://xmcp.dev/blog/fix-mcp-server-claude-desktop-connection): A troubleshooting checklist for when your MCP server won't connect in Claude Desktop — transport mismatches, the mcp-remote bridge, STDIO logging, CORS, and config file mistakes.

- [MCP Transports Explained: STDIO vs SSE vs Streamable HTTP](https://xmcp.dev/blog/mcp-server-transports-explained): A clear breakdown of MCP server transports — STDIO, the legacy HTTP+SSE transport, and Streamable HTTP — when to use each, and how xmcp configures them with a single line.

- [MCP "Session not found" (HTTP 404): Causes & Fixes](https://xmcp.dev/blog/mcp-session-not-found-error): Why MCP clients get an HTTP 404 'Session not found' after an MCP server restarts or redeploys, what's actually happening with the Mcp-Session-Id, and how a stateless server design avoids it.

- [What Is an MCP Server? A Plain-English Guide](https://xmcp.dev/blog/what-is-an-mcp-server): An MCP server exposes tools, resources, and prompts to AI clients over the Model Context Protocol. Here's what that means, why it matters, and how to build one with xmcp.

- [Integrating NestJS with xmcp](https://xmcp.dev/blog/nestjs-integration): Add an MCP server to your NestJS application with tool discovery and a customizable module.

- [How to build an MCP App](https://xmcp.dev/blog/mcp-apps): Learn how to build an MCP App with xmcp — ship interactive React widgets, tool-rendered UIs, and ChatGPT-compatible resources with out-of-the-box support.

- [Securing Your MCP Server](https://xmcp.dev/blog/securing-your-mcp-server): A practical guide to authentication for MCP servers: when you need it, how it works, and which approach fits your use case.

- [How to submit your ChatGPT MCP app](https://xmcp.dev/blog/build-and-submit-gpt-apps): Prepare an xmcp MCP app for OpenAI review with a deployed endpoint, accurate tool metadata, domain verification, and reproducible test cases.

- [Monetize your GPT apps with Stripe](https://xmcp.dev/blog/apps-monetization): Learn how to monetize your GPT apps with Stripe external checkout — set up paywalls, handle payments server-side, and gate tools behind successful charges.

- [Running DOOM in ChatGPT: A Step-by-Step Guide](https://xmcp.dev/blog/doom-with-xmcp): Learn how we made DOOM playable inside ChatGPT using xmcp — rendering frames as images, streaming inputs, and shipping an MCP-powered game loop.

- [Connect to external MCPs and make their tools yours](https://xmcp.dev/blog/cli-typed-clients): Generate fully typed TypeScript MCP clients from remote HTTP servers or STDIO packages with one xmcp command, with autocomplete for tools and prompts.

- [Integrating Polar with xmcp](https://xmcp.dev/blog/polar-integration): Learn how to add paywalls and track per-tool usage with Polar license keys in xmcp — gating tools, subscriptions, and metered billing for MCP servers.

- [Integrating Better Auth with xmcp](https://xmcp.dev/blog/better-auth-integration): Learn how to add secure authentication to your xmcp MCP server using Better Auth with PostgreSQL — sessions, account linking, and OAuth 2.1 providers.