home / mcp / json mapping mcp server
Provides schema-aware mapping for JSON samples with heuristic path suggestions via an HTTP MCP server and local stdio runner.
Configuration
View docs{
"mcpServers": {
"bablu-singh-json-mapping-and-context-mcp-server": {
"url": "http://localhost:3004"
}
}
}You run a small, HTTP-based MCP server that explores JSON schemas, flattens nested data, and suggests field paths for ETL/API onboarding. It provides a lightweight, schema-aware mapping experience you can inspect and drive from an MCP client or Copilot Chat.
Connect to the JSON Mapping MCP server from your MCP client or Copilot Chat to explore and map fields in your JSON samples. You can upload a sample JSON, view the flattened schema with types and examples, and receive suggested paths for target field names. Use the HTTP endpoint to inspect live data, or run the server locally via a stdio flow and drive it directly from your environment.
Practical usage patterns you can follow: 1) Start the local JSON Mapping server so it exposes an HTTP interface on port 3004. 2) Use the Inspector tool to connect to http://localhost:3004 and browse the available endpoints. 3) Upload a JSON sample to build the schema index, then view flattened paths with types and examples. 4) Use search and map operations to find likely field paths for your target field names, or map multiple targets in bulk.
Prerequisites: Python 3.12+ and a virtual environment are recommended.
Set up a virtual environment and install dependencies.
python -m venv .venv
source .venv/bin/activate
pip install -r <(python - <<'PY'
import tomllib, sys
deps = tomllib.load(open("pyproject.toml","rb"))["project"]["dependencies"]
print("\n".join(deps))
PY)Start the local JSON Mapping server so it serves on port 3004.
.venv/bin/python json_mapping_server.pyOpen the MCP Inspector and connect to the local server to inspect the exposed API and behavior.
npx -y @modelcontextprotocol/inspector http://localhost:3004Use these tools to interact with the mapping server.
{
"upload_json_sample(json_data)": "load a JSON sample (e.g., sample_json.json) and build the schema index",
"list_schema(limit=200)": "view flattened paths with type + example values",
"search_fields(query, top_k=10)": "find likely paths for a single query",
"map_targets(targets, top_k=5)": "bulk mapping suggestions for multiple field names",
"clear_samples()": "reset the index"
}Load a JSON sample (e.g., sample_json.json) and build the schema index.
View flattened paths with type and example values.
Find likely paths for a single target field name using heuristic scoring.
Provide bulk mapping suggestions for multiple field names at once.
Reset the in-memory schema index and start fresh.