MCP JSON Navigator

MCP JSON Navigator

Enables efficient navigation and search of large JSON files (>10MB) through intelligent path exploration and fuzzy search capabilities, designed to save tokens by avoiding loading entire files into context.

Category
访问服务器

README

MCP JSON Navigator

A Model Context Protocol (MCP) server that provides intelligent JSON navigation and search capabilities for AI assistants. Mostly design for saving tokens and manipulating large files > 10MB in a few seconds.

Require FileSystem. Note the json should note use "." in keys

Capabilities

  1. "Search keys & values ("phone", "email", "location")"
  2. "Precise path lookup with optional case-sensitive matching"
  3. "Structural exploration of very large JSON files (without loading everything into model context)"

📦 Installation

MacOS/Linux

git clone https://github.com/Adsdworld/mcp-json-navigator && cd mcp-json-navigator && npm install && npm run build

Windows (tested)

git clone https://github.com/Adsdworld/mcp-json-navigator; cd mcp-json-navigator; npm install; npm run build

⚙️ Configuration

Add to your MCP settings file (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "json-navigator": {
      "command": "node",
      "args": ["C:\\Users\\YOUR_USERNAME\\mcp-json-navigator\\build\\index.js"]
    }
  }
}

Replace YOUR_USERNAME and the path with your actual installation location.

🔎 Json-query

{ 
  "Request": {
    "limit": 50,
    "query": "phone",
    "filepath": "C:\\Shared\\With\\Claude\\data.json",
    "caseSensitive": false
  },
  "Response": {
  "results": [
    {
      "path": "result[0]",
      "score": 2
    },
    {
      "path": "result[1]",
      "score": 2
    }
  ]
}
}

🛤️ Json-explore

{
  "Request": {
    "filepath": "C:\\Shared\\With\\Claude\\data.json",
    "jsonpath": "result[1]",
    "verbosity": 5
  },
  "Response": {
    "message": "Hello, Brannon! Your order number is: #100",
    "phoneNumber": "(268) 822-7569",
    "phoneVariation": "+90 343 871 10 66",
    "status": "disabled",
    "name": "{object: 3 keys, 49 chars}",
    "username": "Madalyn-Koss",
    "password": "_jRAnwKTcLZwdj6",
    "emails": "[list: 2 items, 54 chars]",
    "location": "{object: 6 keys, 175 chars}",
    "website": "https://sour-debris.com/",
    "domain": "wrong-leaf.org",
    "job": "{object: 5 keys, 123 chars}",
    "creditCard": "{object: 3 keys, 60 chars}",
    "uuid": "476c7b47-0c28-4dc1-b872-7c4256a95675",
    "objectId": "68fe628328b168737793b750"
  }
}

🎯 Who is this for?

This tool is designed for AI assistants that need to navigate and search through large JSON files efficiently.

When dealing with massive JSON structures (hundreds of MB, deeply nested objects, thousands of entries), AI models face several challenges:

  • Token limitations: Large JSON files can't fit entirely in the context window
  • Performance: Parsing and searching large structures is slow
  • Precision: Finding specific data in complex nested structures is difficult

MCP JSON Navigator solves these problems by:

  • Providing intelligent exploration with adjustable verbosity levels
  • Using fuzzy search with camelCase tokenization for natural queries
  • Allowing precise navigation using JSON paths
  • Grouping and scoring results intelligently

✨ Features

1. Smart JSON Exploration (json-explore)

Navigate through JSON structures with adjustable detail levels:

// Get an overview (verbosity: 0-1)
{ "users": "list", "config": "object", "version": "string" }

// See structure with counts (verbosity: 2-3)
{ "users": "[list: 150 items]", "config": "{object: 12 keys, 450 chars}" }

// Full expansion for small objects (verbosity: 4-5)
{ "users": [...], "config": {...} }

Parameters:

  • filepath: Path to the JSON file
  • jsonpath (optional): Navigate to specific path (e.g., users[0].profile)
  • verbosity: 0-5 (default: 4)
    • 0: Keys only
    • 1: Keys with types
    • 2: Keys with counts
    • 3: Keys with counts and character sizes
    • 4: Smart expansion for small objects
    • 5: Raw data
  • listDisplayLimit: Max items to show in arrays (default: 5)
  • objectDisplayLimit: Max keys to show in objects (default: 6)
  • charDisplayLimit: Max characters for expansion (default: 200)

2. Intelligent Search (json-query)

Search through keys and values with fuzzy matching and camelCase tokenization:

// These all find "phoneNumber" and "phoneVariation"
query: "phone"query: "number"query: "variation"

How it works:

  1. Tokenization: Splits camelCase, snake_case, kebab-case, and generates n-grams
  2. Fuzzy Matching: Uses similarity scoring to find partial matches
  3. Weighted Scoring: Keys score higher than values
  4. Smart Grouping: Groups related results from the same JSON branch

Parameters:

  • filepath: Path to the JSON file
  • query: Search term (supports partial matches)
  • limit: Max results to return (default: 20, min: 10)
  • caseSensitive: Enable exact matching filter (default: false)

When caseSensitive: true, returns an additional exactMatch field with results that contain the exact query string.

🚀 Usage Examples

Example 1: Exploring a Large JSON File

// First, get an overview
json-explore({
  filepath: "C:\\Shared\\With\\Claude\\data.json",
  verbosity: 1
})
// → { "users": "list", "products": "list", "config": "object" }

// Then navigate to a specific section
json-explore({
  filepath: "C:\\Shared\\With\\Claude\\data.json",
  jsonpath: "users[0]",
  verbosity: 5
})
// → Full details of the first user

Example 2: Searching for Contacts

// Find all phone-related fields by high scores paths
json-query({
  filepath: "C:\\Shared\\With\\Claude\\contacts.json",
  query: "phone",
  limit: 20
})
// → Results with paths like "contacts[0].phoneNumber", "contacts[1].phoneVariation"

// Returning a list of exact paths found that exactly match + high scores paths
json-query({
  filepath: "C:\\Shared\\With\\Claude\\contacts.json",
  query: "qsbHBJ5sd4HBSDsdjhHBS",
  caseSensitive: true
})

Example 3: Complex Navigation

// Navigate deep into nested structures
json-explore({
  filepath: "api-response.json",
  jsonpath: "result.data.items[3].metadata",
  verbosity: 3
})
// → Full details metadata either an object / list / primitif

🛠️ Technical Details

Architecture

  • TypeScript-based: Fully typed for reliability
  • MCP Protocol: Built on Model Context Protocol standard
  • Fast Fuzzy Search: Uses fast-fuzzy library for efficient matching
  • Inverted Index: Builds searchable index with n-gram tokenization
  • Smart Grouping: Groups results by JSON structure for better relevance

Search Algorithm

  1. Tokenization:

    • Normalizes text (camelCase → camel Case)
    • Generates 3-5 character n-grams
    • Builds inverted index: token → [paths with weights]
  2. Query Phase:

    • Tokenizes query
    • Computes fuzzy similarity scores
    • Accumulates scores per path
    • Applies key/value weights
  3. Result Grouping:

    • Groups paths by structural similarity
    • Scores by frequency × depth
    • Returns top representative paths

📄 License

MIT License - See LICENSE file for details.

You are free to:

  • ✓ Use commercially
  • ✓ Modify
  • ✓ Distribute
  • ✓ Use privately

Just mention the source: https://github.com/Adsdworld/mcp-json-navigator

🤝 Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

📚 Related Projects

🔗 Links

  • GitHub: https://github.com/Adsdworld/mcp-json-navigator
  • MCP Documentation: https://modelcontextprotocol.io/

Built with ❤️ for AI assistants navigating complex JSON structures.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选