# Documentation - [Introduction](/en/docs): Vitest-native testing for Model Context Protocol servers. - [Getting started](/en/docs/getting-started): Install mcp-vitest and write your first passing test. - API - [API reference](/en/docs/api): Every export mcp-vitest ships, grouped by what you reach for it to do. - [mcpTest(serverOrFactory, options?)](/en/docs/api/mcp-test): Connect a server and get back an McpHarness, the entry point every other API builds on. - [McpHarness](/en/docs/api/harness): The methods and properties available on the harness returned by mcpTest() and createMcpTest(). - [Matchers](/en/docs/api/matchers): Typed vitest matchers for MCP tools, resources, prompts, and tool results. - [Testing sampling and elicitation](/en/docs/api/doubles): Answer a server's sampling, elicitation, and roots requests from inside a test. - [Notifications](/en/docs/api/notifications): Collect and wait on notifications a server pushes to the client. - [Snapshot testing](/en/docs/api/snapshots): Snapshot a server's tool, resource, and prompt surface, and validate structured output against its schema. - [Testing an external server](/en/docs/api/external-servers): Test a server you cannot import, over stdio or HTTP, with serveHandler and detectServerKind. - [Testing OAuth-protected servers](/en/docs/api/auth): Send bearer credentials with mcpTest, and drive both sides of the OAuth handshake with a fake authorization server. - [Lifecycles](/en/docs/api/lifecycles): Run the same suite across MCP protocol revisions with createMcpTest. - [Migrating](/en/docs/migrating): What changed release to release, and how to keep the old behavior if it bites.