Building and Testing Servers
In this chapter, we will cover the basics of building and testing servers. We will start with a simple server that uses the STDIO transport. The STDIO transport is a simple way to communicate with the server using standard input and output streams. Building STDIO servers is a great way to get started with the Model Context Protocol (MCP) and understand how it works. It should also be added that the STDIO transport is the most common way to communicate with the server, and it’s meant for servers running on your machine.
As part of the chapter, we will also cover different ways of testing the server. It’s important that what we build works as expected. We will cover different tools that can be used visually, in the CLI, and in code.
In this chapter, you will learn how to do the following:
- Build a simple server using the STDIO transport
- Describe the core concepts of the server
- Test the server using different tools...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                