inspector logo
130 forks
837 stars
Free

What is Inspector

Inspector is a powerful developer tool designed by Model Context Protocol (MCP) to facilitate the testing and debugging of MCP servers. With Inspector, developers can ensure that their MCP server implementations are functioning correctly and efficiently. This tool is particularly useful for those who are working with AI systems that utilize the Model Context Protocol to connect with various data sources and tools. By providing a robust client interface and server proxy, Inspector allows developers to interact with their MCP servers and diagnose any issues that may arise.

How to Use Inspector

Using Inspector is straightforward and designed to integrate seamlessly into your development workflow. Here’s a step-by-step guide:

  1. Running the Inspector:

    • You don't need to clone any repositories to start using Inspector. Simply employ npx to run it directly from your MCP server repository.
    • For example, if your server file is located at build/index.js, you can run:
      npx @modelcontextprotocol/inspector node build/index.js
      
    • Customize your server execution by passing arguments and setting environment variables:
      npx @modelcontextprotocol/inspector build/index.js arg1 arg2
      npx @modelcontextprotocol/inspector -e KEY=value node build/index.js
      
  2. Accessing the Client UI:

    • The Inspector runs a client interface by default on port 5173 and an MCP proxy server on port 3000. Open your web browser and navigate to the client UI to start testing and debugging.
    • Ports can be customized to suit your needs:
      CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js
      
  3. Authentication:

    • Inspector supports bearer token authentication for secure connections. Input your token in the client UI to authenticate your session with the MCP server.
  4. Development and Production Modes:

    • If you are developing Inspector itself, use npm run dev for development mode or npm run build followed by npm start for production mode.

Key Features of Inspector

  • Seamless Integration: Easily integrates with existing MCP server implementations without the need for additional setup.
  • Command-Line Flexibility: Provides powerful command-line options to pass arguments and environment variables, making it adaptable to various development scenarios.
  • Client UI and Proxy Server: Runs a user-friendly client interface and a proxy server to facilitate communication and debugging.
  • Customizable Ports: Allows customization of default ports to fit into existing network configurations without conflict.
  • Secure Authentication: Supports bearer token authentication to ensure secure, authorized access to MCP servers.
  • Cross-Platform Compatibility: Offers specific commands to accommodate different operating systems, including Windows.

Inspector is a versatile and indispensable tool for developers working with MCP servers, providing the necessary functionalities to ensure robust and secure server implementations. Whether you're in the development or production phase, Inspector helps streamline testing and debugging processes effectively.

How to Use

To use the inspector, follow these steps:

  1. Visit https://github.com/modelc...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using inspector capabilities within your Claude conversations

Additional Information

Created

October 3, 2024

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More