Testing the server
As always, we have different choices to try out the server functionality:
- Creating a client
- Using the Inspector tool
- Testing with cURL
Let’s try out each of these options.
Using the Inspector tool
We covered the Inspector tool earlier in this chapter, but let’s quickly remind ourselves how it works with our newly created server. We can call the Inspector tool like so to start up a web server. Select the following fields:
- Transport Type: HTTP
- Server URL: http://localhost:8000/mcp(adjust the port if necessary)
Click the Connect button to connect to the server so you can use its features and then enter the following:
npx @modelcontextprotocol/inspector
As you can see, it’s very similar to testing SSE servers; just change the transport type and make sure your URL has /mcp at the end instead of /sse.
Testing with cURL
We introduced cURL in the previous chapter; we...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                