Skip to content

feat(plugin-mcp): add support for server instructions#15858

Open
jhb-dev wants to merge 2 commits intopayloadcms:mainfrom
jhb-dev:feat/mcp-server-instructions
Open

feat(plugin-mcp): add support for server instructions#15858
jhb-dev wants to merge 2 commits intopayloadcms:mainfrom
jhb-dev:feat/mcp-server-instructions

Conversation

@jhb-dev
Copy link
Contributor

@jhb-dev jhb-dev commented Mar 5, 2026

What?

Adds an instructions option to the MCP plugin's MCPServerOptions type.

Why?

The MCP protocol supports an instructions field that is sent to clients during initialization. The Payload MCP plugin currently doesn't expose this option, so users have no way to provide instructions describing how to use the server and its features.

How?

  • Added instructions field to MCPServerOptions in types.ts
  • Pass instructions through to the MCP SDK via createMcpHandler in getMcpHandler.ts
mcpPlugin({
  collections: { ... },
  mcp: {
    serverOptions: {
      instructions: 'This server manages blog posts and pages.',
    },
  },
})

@kendelljoseph
Copy link
Contributor

Cool! Makes sense to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants