Configuration

MCPJam Inspector can be configured using command-line arguments, a JSON configuration file, or environment variables.

Command-Line Arguments

When launching the Inspector via npx, you can use the following arguments:

Argument Description Example
--port <number> Specifies the port for the Inspector's web server. npx @mcpjam/inspector --port 8080
--config <path> Loads an mcp.json file to configure servers on startup. npx @mcpjam/inspector --config ./my-servers.json
--server <name> When used with --config, automatically connects to only the specified server from the file. npx @mcpjam/inspector --config mcp.json --server asana
--ollama <model> Starts the Inspector and an Ollama model simultaneously. npx @mcpjam/inspector --ollama llama3
<command> [args...] Connects to a single STDIO server on startup. npx @mcpjam/inspector npx -y @modelcontextprotocol/server-everything

mcp.json File

For managing multiple server configurations, you can use an mcp.json file. This format is compatible with tools like Claude Desktop and Cursor.

To use it, launch the inspector with the --config flag:

npx @mcpjam/inspector@latest --config mcp.json

Here is an example mcp.json file:

{
  "mcpServers": {
    "everything": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-everything"],
      "env": {
        "hello": "Hello MCP!"
      }
    },
    "currency": {
      "type": "sse",
      "url": "https://currency-mcp.wesbos.com/sse",
      "note": "For SSE connections, add this URL directly in Client"
    },
    "Sentry": {
      "command": "npx",
      "args": ["mcp-remote@latest", "https://mcp.sentry.dev/sse"]
    }
  }
}

Structure:

  • mcpServers: The root object.
  • <server-name>: A unique key for each server configuration (e.g., "everything").
    • command & args: For STDIO servers, specifies the command and its arguments to execute.
    • env: An object of environment variables to pass to the STDIO process.
    • type & url: For HTTP/SSE servers, specifies the connection type and endpoint URL.

Environment Variables

The Inspector uses the following environment variables. You can set them in a .env file in the project root or export them in your shell.

Variable Description Example
VITE_CONVEX_URL The URL for the Convex backend used for features like user accounts and evaluations. VITE_CONVEX_URL=https://industrious-stingray-146.convex.cloud
VITE_WORKOS_CLIENT_ID The client ID for WorkOS, used for user authentication. VITE_WORKOS_CLIENT_ID=client_01K4...
VITE_WORKOS_REDIRECT_URI The OAuth redirect URI for WorkOS authentication, especially for the Electron app. VITE_WORKOS_REDIRECT_URI=mcpjam://oauth/callback
PORT Overrides the default port (3001) for the Inspector's web server. PORT=8000