Skip to content
Back to search

mcp-explorer

CLI tool for exploring an MCP server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/simonw--mcp-explorer/badge.svg)](/listings/simonw--mcp-explorer)

HTML

<a href="/listings/simonw--mcp-explorer"><img src="/api/listings/simonw--mcp-explorer/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install this tool using `pip`:

pip install mcp-explorer

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 287 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # mcp-explorer
  2. [![PyPI](https://img.shields.io/pypi/v/mcp-explorer.svg)](https://pypi.org/project/mcp-explorer/)
  3. [![Changelog](https://img.shields.io/github/v/release/simonw/mcp-explorer?include_prereleases&label=changelog)](https://github.com/simonw/mcp-explorer/releases)
  4. [![Tests](https://github.com/simonw/mcp-explorer/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/mcp-explorer/actions/workflows/test.yml)
  5. [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/mcp-explorer/blob/master/LICENSE)
  6. CLI tool for exploring MCP servers
  7. ## Installation
  8. Install this tool using `pip`:
  9. ```bash
  10. pip install mcp-explorer
  11. ```
  12. ## Usage
  13. List the tools exposed by a streamable HTTP MCP server:
  14. ```bash
  15. mcp-explorer list https://agentic-mermaid.dev/mcp
  16. ```
  17. The default output is deliberately compact: each tool is shown as a signature and a one-line description. Use `-N` or `--no-truncate` for full descriptions and detailed parameter metadata:
  18. ```bash
  19. mcp-explorer list -N https://agentic-mermaid.dev/mcp
  20. ```
  21. This forces the current MCP 2 stateless protocol by default. Use `--legacy` to force the older initialize-handshake protocol instead:
  22. ```bash
  23. mcp-explorer list https://agentic-mermaid.dev/mcp --legacy
  24. ```
  25. Use `--json` to output the complete tool definitions, including their input schemas:
  26. ```bash
  27. mcp-explorer list https://agentic-mermaid.dev/mcp --json
  28. ```
  29. Inspect a single tool in detail:
  30. ```bash
  31. mcp-explorer inspect https://agentic-mermaid.dev/mcp render_svg
  32. ```
  33. This displays the tool's complete description, nested input and output schemas, annotations, execution metadata, icons, and `_meta`. Use `--json` for the complete tool definition as a single JSON object:
  34. ```bash
  35. mcp-explorer inspect https://agentic-mermaid.dev/mcp render_svg --json
  36. ```
  37. Call a tool by passing its arguments as a JSON object:
  38. ```bash
  39. mcp-explorer call \
  40. https://agentic-mermaid.dev/mcp \
  41. verify \
  42. '{"source":"graph TD; A-->B"}'
  43. ```
  44. Alternatively, use repeatable `-a/--argument NAME VALUE` options:
  45. ```bash
  46. mcp-explorer call \
  47. https://agentic-mermaid.dev/mcp \
  48. render_svg \
  49. -a source 'graph TD; A-->B' \
  50. -a options '{"padding":24}'
  51. ```
  52. Use `-` to read the raw JSON object from standard input:
  53. ```bash
  54. mcp-explorer call URL TOOL - < arguments.json
  55. ```
  56. When raw JSON and `-a` are combined, individual arguments override matching top-level keys in the JSON object and later `-a` values win. Values are interpreted using the tool's input schema: strings remain literal, while numbers, booleans, arrays, objects, and null are parsed as JSON. The assembled arguments are validated against the input schema before the tool is called.
  57. Use `--json` to print the tool's `structuredContent` as JSON. If the result has no structured content, this falls back to printing the first text content block:
  58. ```bash
  59. mcp-explorer call \
  60. https://datasette.simonwillison.net/-/mcp \
  61. execute_sql \
  62. -a database simonwillisonblog \
  63. -a sql 'select count(*) from blog_entry' \
  64. --json
  65. ```
  66. Use `--raw` for the complete MCP `CallToolResult` as JSON:
  67. ```bash
  68. mcp-explorer call URL TOOL -a name value --raw
  69. ```
  70. List every prompt exposed by a server:
  71. ```bash
  72. mcp-explorer prompts URL
  73. mcp-explorer prompts URL --json
  74. mcp-explorer prompts URL --legacy
  75. ```
  76. The human-readable output includes prompt arguments and whether each is required. JSON output contains the complete prompt definitions.
  77. List every directly-addressable resource exposed by a server:
  78. ```bash
  79. mcp-explorer resources URL
  80. mcp-explorer resources URL --json
  81. mcp-explorer resources URL --legacy
  82. ```
  83. The human-readable output includes each resource URI, MIME type, size, and description when available. Both commands follow pagination until all results have been collected.
  84. Use `info` to show the selected protocol, negotiation mechanism, supported versions, server identity, capabilities, and instructions:
  85. ```bash
  86. mcp-explorer info https://agentic-mermaid.dev/mcp
  87. mcp-explorer info https://agentic-mermaid.dev/mcp --json
  88. ```
  89. Use `doctor` to check both stateless and legacy compatibility. The selected mode is checked first and determines the exit status:
  90. ```bash
  91. mcp-explorer doctor https://agentic-mermaid.dev/mcp
  92. mcp-explorer doctor https://agentic-mermaid.dev/mcp --legacy
  93. ```
  94. Every command accepts `--json` and `--stateless/--legacy`. These options can appear anywhere after the command name. The `call` command also accepts `--raw`.
  95. For help, run:
  96. ```bash
  97. mcp-explorer --help
  98. ```
  99. You can also use:
  100. ```bash
  101. python -m mcp_explorer --help
  102. ```
  103. ## Development
  104. To contribute to this tool, first checkout the code. Run the tests like this:
  105. ```bash
  106. cd mcp-explorer
  107. uv run pytest
  108. ```
  109. And the development version of the tool like this:
  110. ```bash
  111. uv run mcp-explorer --help
  112. ```
  113. To update the `--help` reference in the README:
  114. ```bash
  115. uv run cog -r README.md
  116. ```
  117. ## Command reference
  118. <!-- [[[cog
  119. import cog
  120. from click.testing import CliRunner
  121. from mcp_explorer.cli import cli
  122. runner = CliRunner()
  123. sections = []
  124. for command in cli.commands:
  125. result = runner.invoke(cli, [command, "--help"])
  126. help = result.output.replace("Usage: cli", "Usage: mcp-explorer")
  127. sections.append(
  128. "### `mcp-explorer {} --help`\n\n```\n{}\n```".format(command, help)
  129. )
  130. cog.out("\n\n".join(sections))
  131. ]]] -->
  132. ### `mcp-explorer list --help`
  133. ```
  134. Usage: mcp-explorer list [OPTIONS] URL
  135. List the tools exposed by an MCP server at URL.
  136. Options:
  137. -N, --no-truncate Show full descriptions and detailed parameters.
  138. --json Output JSON.
  139. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  140. initialize handshake.
  141. --help Show this message and exit.
  142. ```
  143. ### `mcp-explorer prompts --help`
  144. ```
  145. Usage: mcp-explorer prompts [OPTIONS] URL
  146. List the prompts exposed by an MCP server at URL.
  147. Options:
  148. --json Output JSON.
  149. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  150. initialize handshake.
  151. --help Show this message and exit.
  152. ```
  153. ### `mcp-explorer resources --help`
  154. ```
  155. Usage: mcp-explorer resources [OPTIONS] URL
  156. List the resources exposed by an MCP server at URL.
  157. Options:
  158. --json Output JSON.
  159. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  160. initialize handshake.
  161. --help Show this message and exit.
  162. ```
  163. ### `mcp-explorer inspect --help`
  164. ```
  165. Usage: mcp-explorer inspect [OPTIONS] URL TOOL_NAME
  166. Inspect one tool exposed by an MCP server at URL.
  167. Options:
  168. --json Output JSON.
  169. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  170. initialize handshake.
  171. --help Show this message and exit.
  172. ```
  173. ### `mcp-explorer call --help`
  174. ```
  175. Usage: mcp-explorer call [OPTIONS] URL TOOL_NAME [ARGUMENTS_JSON]
  176. Call a tool with optional JSON and individual arguments.
  177. Options:
  178. -a, --argument NAME VALUE Set one tool argument; repeat for multiple
  179. arguments.
  180. --raw Output the complete MCP CallToolResult as JSON.
  181. --json Output JSON.
  182. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  183. initialize handshake.
  184. --help Show this message and exit.
  185. ```
  186. ### `mcp-explorer info --help`
  187. ```
  188. Usage: mcp-explorer info [OPTIONS] URL
  189. Show protocol and metadata for an MCP server at URL.
  190. Options:
  191. --json Output JSON.
  192. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  193. initialize handshake.
  194. --help Show this message and exit.
  195. ```
  196. ### `mcp-explorer doctor --help`
  197. ```
  198. Usage: mcp-explorer doctor [OPTIONS] URL
  199. Check stateless and legacy compatibility for an MCP server at URL.
  200. Options:
  201. --json Output JSON.
  202. --stateless / --legacy Force stateless MCP 2 (default) or the legacy
  203. initialize handshake.
  204. --help Show this message and exit.
  205. ```
  206. <!-- [[[end]]] -->

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.