MCP server supports client capabilities
Our Model Context Protocol (MCP) server now adapts to different client capabilities when serving tools generated by Stainless.
MCP clients like Claude Desktop, Cursor, or OpenAI Agents each handle the JSON schemas provided by MCP servers differently. For example, Cursor has a strict 60-character tool name length, and Claude Code does not support unions of objects at the top level of a tool.
To mitigate this, users can provide a --client argument to our MCP server to specify which client they are working with, and our server will automatically transform the generated JSON Schemas to serve clients a format that is compatible.
For example: npx my-api-mcp --client=claude-code
You can read more about the transformations in our recent blog post.