rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
PROJECT README
Map-First Just-In-Time (JIT) Tool Routing for DeepSeek Harness (DSH) and Modern AI Agent Runtimes.
🚀 Eliminate the Tool Context Tax. Zero prompt bloat, zero hallucinated tool calls, instant execution.
As AI agent developers equip their agents with more capabilities via the Model Context Protocol (MCP), a major architectural bottleneck arises:
search_tools()). In practice, this forces a "Two-Turn Latency Tax" (Step 1: AI searches tools -> Step 2: AI calls tool), doubling response time from 5s to 15s+, and frequently misses tools due to semantic retrieval ambiguity.[ Traditional Static MCP ]
Prompt = [ 50,000 Tokens of Tool Schemas ] + [ "User Message" ]
Result: Slow, expensive, degraded attention.
[ Naive Dynamic ToolRouter ]
User: "Summarize meeting" ──► AI: search_tools("meeting") ──► Wait 10s ──► AI: call_tool()
Result: Multi-turn latency penalty, fragile recall.
[ DSH Map-First JIT Router (This Project) ]
User: "Summarize meeting" ──► Fast Asset Map Scan (<5ms) ──► JIT Mount ──► Native Direct Call
Result: 0 Token waste in idle turns, 100% credentialed recall, single-step execution!
dsh-mcp-map-router introduces a tiered, deterministic architecture:
mcp_registry.json):
Maintains a verified catalog of available MCP servers, their credentials, category profiles, and fast keyword/intent triggers.| Metric | All-in-One Static MCP | Naive Dynamic Router | Map-First JIT Router (Ours) |
|---|---|---|---|
| Idle Context Tax | 30k ~ 60k tokens | ~500 tokens | ~200 tokens (Minimal) |
| Execution Steps | 1 step | 2+ steps (Search + Exec) | 1 step (Direct JIT) |
| First-Token Latency | Slow (Heavy prompt) | Extremely Slow (2 turns) | Fast (< 1s cold start) |
| Credential Reliability | 100% | Often unauthenticated | 100% (Pre-verified) |
| Hallucination Risk | High (Context confusion) | High (Mismatched schema) | Near Zero |
dsh-mcp-map-router/
├── src/
│ └── index.ts # DeepSeek Harness (Cordis) Plugin implementation
├── python/
│ └── mcp_map_router.py # Standalone universal CLI engine (Antigravity/Cursor/Claude)
├── mcp_registry.example.json # Sanitized Asset Map schema specification
├── package.json # DSH plugin package definition
├── LICENSE # MIT License
└── README.md # Project documentation
Install the plugin into your DeepSeek Harness environment:
npm install dsh-plugin-map-router
Add configuration to your cordis.yml or plugin manager:
plugins:
mcp-map-router:
registryPath: './config/mcp_registry.json'
autoMount: true
scoreThreshold: 3
keepAliveTurns: 2
Copy mcp_registry.example.json to mcp_registry.json and configure your tools:
cp mcp_registry.example.json mcp_registry.json
Run CLI operations:
# Check current active vs dormant tools
python3 python/mcp_map_router.py status
# List predefined profile presets
python3 python/mcp_map_router.py list
# Switch to a lightweight profile
python3 python/mcp_map_router.py use minimal
# Scan intent and auto-mount Just-In-Time
python3 python/mcp_map_router.py scan "Need to export meeting attendees" --mount
mcp_registry.json){
"$schema": "https://json-schema.org/draft/2020-12/schema",
"version": "1.0.0",
"default_profile": "minimal",
"profiles": {
"minimal": ["core-evaluator"],
"office": ["core-evaluator", "meeting-assistant"]
},
"servers": {
"meeting-assistant": {
"displayName": "Enterprise Meeting Assistant",
"category": "office",
"description": "Meeting scheduling and transcript extraction",
"toolsCount": 28,
"tags": ["meeting", "transcripts", "schedule", "minutes"],
"intentPatterns": ["meeting transcript", "schedule meeting"],
"serverConfig": {
"serverUrl": "https://api.example.com/mcp/v1",
"headers": {
"Authorization": "Bearer ${MEETING_TOKEN}"
}
}
}
}
}
We welcome issues and pull requests! Whether adding adapter support for additional agent frameworks (LangGraph, AutoGen, CrewAI) or improving intent classification algorithms, your contributions are appreciated.
MIT License. See LICENSE for details.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: mcp、model-context-protocol、deepseek-harness。