Description
MCP Inspector v2 expands resource templates using plain string replacement instead of RFC 6570 expansion.
This causes two related problems:
- Query expressions such as
{?topic} do not produce an input control.
- Reserved characters in simple variables are inserted without percent encoding.
Reproduction
Advertise this resource template:
{
"name": "events",
"uriTemplate": "foobar://events/{topic}"
}
In Inspector:
- Open the resource template.
- Enter
foo/bar for topic.
- Click Read Resource.
- Inspect the generated
resources/read request.
Actual result
Inspector sends:
{
"uri": "foobar://events/foo/bar"
}
The inserted slash creates another path segment. A standards-compliant resource-template matcher rejects the URI:
{
"code": -32602,
"message": "Resource not found",
"data": {
"uri": "foobar://events/foo/bar"
}
}
When the server advertises:
Inspector does not display a topic input.
Expected result
Inspector should expand templates according to RFC 6570.
For {topic}, the value foo/bar should produce:
foobar://events/foo%2Fbar
For {?topic}, Inspector should display a topic input and generate an encoded query expression.
Suspected cause
The web client appears to extract and replace only plain variables:
const variables = /\{(\w+)\}/g
template.replace(/\{(\w+)\}/g, (_, name) => values[name])
This does not support RFC 6570 operators or encode values.
Suggested correction
Use an RFC 6570 implementation for:
- Variable discovery.
- Form generation.
- URI expansion.
- Reserved-character encoding.
- Query-expression expansion.
Add coverage for:
foobar://events/{topic}
foobar://events{?topic}
Test values containing /, ?, #, %, spaces, and Unicode text.
Environment
- MCP Inspector:
v2.0.0
- Protocol revision:
2026-07-28
- Transport: Streamable HTTP
- Client: Inspector web UI
Description
MCP Inspector v2 expands resource templates using plain string replacement instead of RFC 6570 expansion.
This causes two related problems:
{?topic}do not produce an input control.Reproduction
Advertise this resource template:
{ "name": "events", "uriTemplate": "foobar://events/{topic}" }In Inspector:
foo/barfortopic.resources/readrequest.Actual result
Inspector sends:
{ "uri": "foobar://events/foo/bar" }The inserted slash creates another path segment. A standards-compliant resource-template matcher rejects the URI:
{ "code": -32602, "message": "Resource not found", "data": { "uri": "foobar://events/foo/bar" } }When the server advertises:
Inspector does not display a
topicinput.Expected result
Inspector should expand templates according to RFC 6570.
For
{topic}, the valuefoo/barshould produce:For
{?topic}, Inspector should display atopicinput and generate an encoded query expression.Suspected cause
The web client appears to extract and replace only plain variables:
This does not support RFC 6570 operators or encode values.
Suggested correction
Use an RFC 6570 implementation for:
Add coverage for:
Test values containing
/,?,#,%, spaces, and Unicode text.Environment
v2.0.02026-07-28