Chapter 7. Testing, Securing, and Sharing Your MCP Server
You’ve built your server. It provides tool, prompts, and resources to client applications. It supports a bevy of client-provided capabilities like sampling, elicitations, and roots, along with utilities to make your life and your users’ lives easier, like logging, notifications, and pagination. What’s next? Your work is not yet done. Like any other software project, you still need to test your server code, evaluate its performance, secure it, and finally share it with the world.
Testing should be familiar to the software engineer. Servers are code, after all, and thus testing them takes the same form as testing any other code: unit testing, integration testing, and end-to-end testing still take the spotlight here. But on top of that, you have additional tools, such as MCP Inspector (which we’ve been using throughout the server chapters) which allows you to directly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access