Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Getting started with the Inspector

For first-time exploration, use the official MCP Inspector. It provides a graphical interface where you can see tools, resources, prompts, input schemas, tool responses and protocol activity — much easier than constructing MCP requests by hand.

1. Start the Inspector

From a terminal:

npx -y @modelcontextprotocol/inspector@2.6.0

Inspector 2.6.0 needs Node.js 22.19 or later. The Inspector prints a local URL similar to:

http://127.0.0.1:6274?MCP_INSPECTOR_API_TOKEN=...

Open the complete URL printed by the command, including the token.

2. Add the UN System Data Commons server

In the Inspector:

  1. Open Servers and choose Add server.

  2. Use a simple server ID, for example un-datacommons.

  3. Select Streamable HTTP as the transport.

  4. Enter the endpoint:

    https://unsd-datacommons.gcp.un-icc.cloud/mcp
  5. Do not add custom headers unless you have specifically been given authentication information — the server currently needs none.

  6. Add and connect the server.

The server speaks MCP protocol version 2025-06-18. Newer clients negotiate down to it automatically; if the Inspector labels the connection as a “legacy” protocol era, that is why, and nothing is wrong.

A successful connection makes the server’s tools and resources visible in the Inspector. Open Resources first and read skill://data-commons-researcher/SKILL.md — the general research playbook — before running a search.

3. Check connectivity from the command line

You can confirm the endpoint is reachable, and discover what it exposes, without the graphical Inspector at all. Each recipe below was run against the live server when this page was written.

curl
Inspector CLI
Python
Claude Code
VS Code

The cleanest first check is the health endpoint next to the MCP path, which also tells you which server version is running:

URL='https://unsd-datacommons.gcp.un-icc.cloud/mcp'

curl -s "$URL/health"
# {"status":"OK","version":"1.3.0"}

A plain browser-style GET on the MCP path itself is not the method MCP uses, so it answers 405 — not an error with the service, just confirmation the endpoint is there:

curl -i "$URL"
# HTTP/2 405
# allow: POST, DELETE

A real MCP request is a JSON-RPC POST. The initialize handshake returns the server’s identity and capabilities (the answer arrives as a server-sent event, hence the data: prefix):

curl -s -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}'
# event: message
# data: {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-06-18", ... "serverInfo":{"name":"DC MCP Server", ...

Troubleshooting

“Connection lost” or “Error in input stream”
Make sure the local Inspector process is still running — the terminal in which you started it must remain active. If you pressed Ctrl-Z, the process is suspended but still holds its ports. Check with jobs -l and lsof -i :6274, bring it back with fg %1, stop it cleanly with Ctrl-C, then restart the Inspector.
Port 6274 is already in use
lsof -i :6274 shows which process owns it. If it is an old Inspector instance, stop that instance before starting another one.
The endpoint returns 405 to curl
Expected for a plain GET; see the curl tab above. Use the Inspector or an MCP-capable client to exercise the actual protocol.
401 or 403
Either your side of the network requires a proxy or credentials, or the endpoint has been placed behind authentication since this page was built. The server currently requires none; check GET …/mcp/health first — if that answers, the MCP path should too.
A tool answers with an error containing status 500
The MCP call itself worked; the server’s data backend refused the request. Two seen in the wild. unsupported SDMX component filter "donor" means a multi-entity request against data that has no entity dimensions — see Walkthrough C. failed to resolve place names: maps: REQUEST_DENIED means a place name the server could not match in its own index fell through to a geocoder that is not enabled: use the plain English short name (“Turkey”, “Iran”), not “Türkiye” or “Islamic Republic of Iran”. The search tools’ place parameters take names only; a DCID passed there fails the same way. DCIDs belong to the metadata and retrieval tools (entity_dcids, place_dcid, parent_place_dcid), which take the identifiers discovery returned.
Another UN Data Commons URL
Other addresses exist for other deployments (a Cloud Run run.app host, for example). They run different, older server versions with fewer tools and no playbooks, and they are not for external use. Everything in this book applies to https://unsd-datacommons.gcp.un-icc.cloud/mcp only.