Scan your whole stack
Are you using unstring?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.0
unstring was last scanned on 25 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.0 LATEST | 25 Nov 2026 | No rules fired |
Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Some MCP clients and models send tool arguments as JSON strings: "pages": "[{\"title\": \"A\"}]"
where the tool's schema says array, "limit": "5" where it says integer. The server rejects
the call with expected array, received string (or Input should be a valid list), and the
agent retries, gives up, or writes nothing.
unstring repairs those arguments before the server sees them, guided by the tool's own
inputSchema. A value is decoded only where the schema does not allow a string, and only when
the decoded value has a type the schema does allow, so real strings are never touched. Use it
as a stdio proxy around any MCP server (no code changes, any language) or as one function.
pip install unstring
Put unstring proxy -- in front of the server command in your client's config:
{
"mcpServers": {
"notion": {
"command": "unstring",
"args": ["proxy", "--", "npx", "-y", "@notionhq/notion-mcp-server"]
}
}
}
Or with uvx, nothing to install first: "command": "uvx", "args": ["unstring", "proxy", "--", ...].
Each repair is reported on stderr (most clients show it in their MCP log):
unstring: create_pages: pages: string -> array; pages[0].position: string -> integer
| Option | What it does |
|---|---|
--wrap |
Also turn a single value into a one-item list where the schema wants an array ("ids": 4 becomes [4]). Off by default. |
--quiet |
Don't report repairs. |
--log FILE |
Append repair reports to a file instead of stderr. |
The proxy learns each tool's schema from the tools/list results the client asks for. If a
call names a tool it has not seen (the client cached the list), it asks the server for the
tool list itself, holds the call until the answer is in, and then sends it on, repaired. All
other messages pass through byte for byte.
from unstring import repair
schema = {
"type": "object",
"properties": {
"pages": {"type": "array", "items": {"type": "object", "properties": {
"title": {"type": "string"}, "position": {"type": "integer"}}}},
"query": {"type": "string"},
"limit": {"anyOf": [{"type": "integer"}, {"type": "null"}]},
},
}
result = repair({"pages": '[{"title": "A", "position": "2"}]', "query": "[1, 2]",
"limit": "10"}, schema)
print(result.value)
# {'pages': [{'title': 'A', 'position': 2}], 'query': '[1, 2]', 'limit': 10}
print([str(f) for f in result.fixes])
# ['pages: string -> array', 'pages[0].position: string -> integer', 'limit: string -> integer']
query stays a string: the schema says it is one. repair_arguments(args, schema) returns
only the value. Check one call from the command line:
$ unstring fix --schema tools.json --tool create_pages '{"pages": "[{\"title\": \"A\"}]"}'
repaired pages: string -> array
{
"pages": [
{
"title": "A"
}
]
}
--schema takes an inputSchema, a tool, or a saved tools/list result. The exit code is 2
when something was repaired, 0 when nothing needed it.
null where the schema wants
those types, at any depth: inside arrays, nested objects, $ref/$defs, anyOf/oneOf/
allOf, additionalProperties, patternProperties, prefixItems."\"[1, 2]\"")."['a', 'b']", "{'k': True}"), parsed safely with
ast.literal_eval, never eval.{"0": x, "1": y} where the schema wants an
array), as some HTTP bridges send them."True"/"FALSE" for booleans, "5.0" for an integer field.arguments object sent as one JSON string."type": ["string", "array"], an untyped field, {}),
the string is left alone, because there is no safe way to tell. Give the field a type if
you want it repaired.unstring proxy works with stdio servers. For a remote (Streamable HTTP) server, call
repair in the server where the arguments arrive."007" or "1,2" are not valid JSON and are not guessed at.Clients keep sending stringified arguments, intermittently, and every server works around it
on its own (tryParseJson helpers, z.preprocess, accept-a-string-too unions):
pages array parameter received as a string.List[str].expected array, received string.{"0": ..}
objects); the server's tryParseJson misses cases.arguments object passed as a string.MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.