Fetch JSONPath MCP
A Model Context Protocol (MCP) server that provides tools for fetching JSON data and web content from URLs. Features intelligent content extraction, multiple HTTP methods, and browser-like headers for reliable web scraping.
Power your agent
Install from the publisher. Not a PlugMCP endpoint.
Host a copy with our keys and logs.
No packaged release in the registry yet. Follow the repository README.
Remote URL or a command on your machine? How the two installs differ
Run on PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
LaunchFrom the publisher
A Model Context Protocol (MCP) server that provides tools for fetching JSON data and web content from URLs. Features intelligent content extraction, multiple HTTP methods, and browser-like headers for reliable web scraping.
A Model Context Protocol (MCP) server that provides tools for fetching and extracting JSON data from URLs using JSONPath patterns.
Reduce LLM Token Usage & Hallucination - Instead of fetching entire JSON responses and wasting tokens, extract only the data you need.
❌ Traditional fetch (wasteful):
// API returns 2000+ tokens
{
"data": [
{
"id": 1,
"name": "Alice",
"email": "[email protected]",
"avatar": "https://...",
"profile": {
"bio": "Long bio text...",
"settings": {...},
"preferences": {...},
"metadata": {...}
},
"posts": [...],
"followers": [...],
"created_at": "2023-01-01",
"updated_at": "2024-01-01"
},
// ... 50 more users
],
"pagination": {...},
"meta": {...}
}
✅ JSONPath extract (efficient):
// Only 10 tokens - exactly what you need!
["Alice", "Bob", "Charlie"]
Using pattern: data[*].name saves 99% tokens and eliminates model hallucination from irrelevant data.
For most IDEs, use the uvx tool to run the server.
{
"mcpServers": {
"fetch-jsonpath-mcp": {
"command": "uvx",
"args": [
"fetch-jsonpath-mcp"
]
}
}
}
claude mcp add fetch-jsonpath-mcp -- uvx fetch-jsonpath-mcp
{
"mcpServers": {
"fetch-jsonpath-mcp": {
"command": "uvx",
"args": ["fetch-jsonpath-mcp"]
}
}
}
Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"fetch-jsonpath-mcp": {
"command": "uvx",
"args": ["fetch-jsonpath-mcp"]
}
}
}
"mcp": {
"servers": {
"fetch-jsonpath-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["fetch-jsonpath-mcp"]
}
}
}
# Installs the project plus dev tools (pytest, ruff) and demo server deps
uv sync
# Start demo server on port 8080
uv run demo/demo_server.py
uv run fetch-jsonpath-mcp
The demo server at http://localhost:8080 returns:
{
"foo": [{"baz": 1, "qux": "a"}, {"baz": 2, "qux": "b"}],
"bar": {
"items": [10, 20, 30],
"config": {"enabled": true, "name": "example"}
},
"metadata": {"version": "1.0.0"}
}
fetch-jsonExtract JSON data using JSONPath patterns with support for all HTTP methods.
{
"name": "fetch-json",
"arguments": {
"url": "http://localhost:8080",
"pattern": "foo[*].baz",
"method": "GET"
}
}
Returns: [1, 2]
Parameters:
url (required): Target URLpattern (optional): JSONPath pattern for data extractionmethod (optional): HTTP method (GET, POST, PUT, DELETE, etc.) - Default: "GET"data (optional): Request body for POST/PUT requestsheaders (optional): Additional HTTP headersfetch-textFetch web content with intelligent text extraction. Defaults to Markdown format for better readability.
{
"name": "fetch-text",
"arguments": {
"url": "http://localhost:8080",
"output_format": "clean_text"
}
}
Returns: Clean text representation of the JSON data
Output Formats:
"markdown" (default): Converts HTML to clean Markdown format"clean_text": Pure text with HTML tags removed"raw_html": Original HTML contentParameters:
url (required): Target URLmethod (optional): HTTP method - Default: "GET"data (optional): Request body for POST/PUT requestsheaders (optional): Additional HTTP headersoutput_format (optional): Output format - Default: "markdown"batch-fetch-jsonProcess multiple URLs with different JSONPath patterns concurrently.
{
"name": "batch-fetch-json",
"arguments": {
"requests": [
{"url": "http://localhost:8080", "pattern": "foo[*].baz"},
{"url": "http://localhost:8080", "pattern": "bar.items[*]"}
]
}
}
Returns: [{"url": "http://localhost:8080", "pattern": "foo[*].baz", "success": true, "content": [1, 2]}, {"url": "http://localhost:8080", "pattern": "bar.items[*]", "success": true, "content": [10, 20, 30]}]
Request Object Parameters:
url (required): Target URLpattern (optional): JSONPath patternmethod (optional): HTTP method - Default: "GET"data (optional): Request bodyheaders (optional): Additional HTTP headersbatch-fetch-textFetch content from multiple URLs with intelligent text extraction.
{
"name": "batch-fetch-text",
"arguments": {
"requests": [
"http://localhost:8080",
{"url": "http://localhost:8080", "output_format": "raw_html"}
],
"output_format": "markdown"
}
}
Returns: [{"url": "http://localhost:8080", "success": true, "content": "# Demo Server Data\n\n..."}, {"url": "http://localhost:8080", "success": true, "content": "{\"foo\": [{\"baz\": 1, \"qux\": \"a\"}, {\"baz\": 2, \"qux\": \"b\"}]..."}]
Supports:
This project uses jsonpath-ng for JSONPath implementation.
For complete JSONPath syntax reference, see the jsonpath-ng documentation.
Set environment variables to customize behavior:
# Request timeout in seconds (default: 10.0)
export JSONRPC_MCP_TIMEOUT=30
# SSL verification (default: true)
export JSONRPC_MCP_VERIFY=false
# Follow redirects (default: true)
export JSONRPC_MCP_FOLLOW_REDIRECTS=true
# Custom headers (will be merged with default browser headers)
export JSONRPC_MCP_HEADERS='{"Authorization": "Bearer token"}'
# HTTP proxy configuration
export JSONRPC_MCP_PROXY="http://proxy.example.com:8080"
Default Browser Headers: The server automatically includes realistic browser headers to prevent blocking:
Custom headers in JSONRPC_MCP_HEADERS will override defaults when there are conflicts.
# Run tests
uv run pytest
# Check code quality
uv run ruff check --fix
# Build and test locally
uv build
Releases are published to PyPI via Trusted Publishing — no API tokens. Bump version in pyproject.toml, then push a matching tag:
git tag v1.2.0 && git push origin v1.2.0
.github/workflows/release.yml verifies the tag matches the project version, runs lint and tests, builds the distributions, publishes to PyPI, and creates a GitHub release with the artifacts attached.
get-json → fetch-json, get-text → fetch-textmarkdownifyA Model Context Protocol (MCP) server that provides tools for fetching and extracting JSON data from URLs using JSONPath patterns.
Tools
No tool list yet. Remote servers get one after the first health check.
FAQ
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
No required environment variable is listed on this record.
Fetch Jsonpath runs locally over stdio.
Last checked 2026-10-26. A Model Context Protocol (MCP) server that provides tools for fetching and extracting JSON data from URLs using JSONPath patterns.