-
Book Overview & Buying
-
Table Of Contents
Learn Model Context Protocol with TypeScript
By :
There are many tools at your disposal to test the server. Why we test is that we want to ensure that the server is working as expected. The tools we will cover in this chapter are as follows.
This is a CLI tool that can present both a UI and a CLI interface. The latter is meant for scripting and automation.
The UI is meant for manual testing and debugging. In this example command, we run the inspector tool. Ensure that you stand in the same directory as the server file when you run the following commands.
Running the inspector tool with TypeScript entails running it using npx like so:
npx @modelcontextprotocol/inspector node ./build/index.js
Here, we’re running the inspector tool using npx. You can also add the./build/index.js to npx @modelcontextprotocol/inspector executable path, but that’s optional. At the latest, you need to fill in this information on the web page.
Ensure you then fill in the following fields...