Skip to content

Nexus MCP SDK documentation

The groups follow what you came to do: learn the SDK, get a task done, look something up, or understand why the SDK is built this way.

Start here

  • Getting started: the tutorial. It takes you from an empty directory to a stdio server and a PHP client that calls it.

How-to guides

Server

  • Server API overview: the builder, the lifecycle, and the guide to every feature page.
  • Tools: registering tools, structured content, and schema validation.
  • Prompts: registering prompt renderers.
  • Resources: static and templated resources, and cache hints.
  • Completions: serving completion/complete.
  • Stores and pagination: page size, custom stores, runtime mutation.
  • Custom handlers: vendor-extension methods and spec-method overrides.
  • Extensions: enabling SEP-2133 extensions and the capability gate.
  • Tasks: brokering tool calls into polled long-running tasks (SEP-2663).
  • Apps: declaring ui:// views and linking tools to them (SEP-1865).
  • Skills: serving Agent Skills under skill:// (SEP-2640).
  • Subscriptions: serving subscriptions/listen streams.
  • Asking the client for input: the InputRequiredResult flow.
  • Attribute discovery: declaring features with #[AsTool] and friends.

Client

Authorization

Reference

Explanation

Runnable code

  • examples/: demo servers and clients over stdio, in-memory, and HTTP. They include the OAuth and MCP Apps end-to-end setups.