Skip to content

Commit b341b7b

Browse files
committed
feat(v2.3.0): token efficiency & performance optimization
- optimize memory retrieval and ranking - reduce redundant MCP tool calls - implement prompt modularization (partial) - improve context injection handling - add shared context reuse foundation - introduce skill system groundwork (registry, metadata, routing - partial) - improve response conciseness and structure
1 parent 1f7349d commit b341b7b

File tree

11 files changed

+2093
-158
lines changed

11 files changed

+2093
-158
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,6 @@ vite.config.js.timestamp-*
139139
vite.config.ts.timestamp-*
140140

141141
# Changes
142-
*.patch
142+
*.patch
143+
CODEBASE.md
144+
result.md

docs/index.html

Lines changed: 28 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,36 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Local MCP Memory Server Docs</title>
7-
<meta
8-
name="description"
9-
content="Detailed documentation for Local MCP Memory Server: installation, architecture, project descriptors, live activity tracking, human-plus-agent collaboration, soft locks, API reference, and production-ready examples."
10-
/>
11-
<meta
12-
name="keywords"
13-
content="MCP, Model Context Protocol, memory server, multi-agent, MongoDB, task coordination, activity stream, soft locks, human agent collaboration, GitHub Pages documentation"
14-
/>
15-
<meta name="author" content="Ranit Saha (Coderooz)" />
16-
<meta name="theme-color" content="#0d1b2a" />
17-
<meta name="color-scheme" content="light" />
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
186

19-
<meta property="og:type" content="website" />
20-
<meta property="og:title" content="Local MCP Memory Server Docs" />
21-
<meta
22-
property="og:description"
23-
content="Installation, integration, usage, examples, and operational guidance for the Local MCP Memory Server."
24-
/>
25-
<meta
26-
property="og:url"
27-
content="https://coderooz.github.io/Local-MCP-Memory-Server/"
28-
/>
29-
<meta property="og:site_name" content="Local MCP Memory Server Docs" />
7+
<title>Codebase Context Docs</title>
308

31-
<meta name="twitter:card" content="summary_large_image" />
32-
<meta name="twitter:title" content="Local MCP Memory Server Docs" />
33-
<meta
34-
name="twitter:description"
35-
content="Installation, integration, usage, examples, and operational guidance for the Local MCP Memory Server."
36-
/>
9+
<meta name="description" content="Generate structured, AI-ready codebase snapshots using CLI." />
3710

38-
<link
39-
rel="canonical"
40-
href="https://coderooz.github.io/Local-MCP-Memory-Server/"
41-
/>
42-
<link rel="icon" href="./favicon.ico" sizes="any" />
43-
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
44-
<link rel="apple-touch-icon" href="./favicon.svg" />
45-
<link rel="manifest" href="./site.webmanifest" />
46-
<link rel="robots" href="./robots.txt" />
11+
<link rel="stylesheet" href="./styles.css" />
12+
<script defer src="./app.js"></script>
13+
</head>
4714

48-
<link rel="preconnect" href="https://fonts.googleapis.com" />
49-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
50-
<link
51-
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Merriweather:wght@400;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Naskh+Arabic:wght@400;600;700&display=swap"
52-
rel="stylesheet"
53-
/>
54-
55-
<script id="software-schema" type="application/ld+json">
56-
{
57-
"@context": "https://schema.org",
58-
"@type": "SoftwareApplication",
59-
"name": "Local MCP Memory Server",
60-
"applicationCategory": "DeveloperApplication",
61-
"operatingSystem": "Cross-platform",
62-
"softwareVersion": "Loading",
63-
"codeRepository": "https://github.com/coderooz/Local-MCP-Memory-Server",
64-
"license": "https://github.com/coderooz/Local-MCP-Memory-Server/blob/main/LICENSE",
65-
"description": "A MongoDB-backed Model Context Protocol server for persistent memory, agent coordination, task management, messaging, and project-map intelligence."
66-
}
67-
</script>
68-
69-
<link rel="stylesheet" href="./styles.css" />
70-
<script defer src="./app.js"></script>
71-
</head>
72-
<body>
73-
<div class="page-background" aria-hidden="true">
74-
<div class="orb orb-a"></div>
75-
<div class="orb orb-b"></div>
76-
<div class="grid-mask"></div>
15+
<body>
16+
<header class="topbar">
17+
<div>
18+
<h1>Codebase Context</h1>
19+
<span class="tag">CLI Documentation</span>
7720
</div>
7821

79-
<header class="topbar">
80-
<a class="brand" href="#top" aria-label="Local MCP Memory Server Docs">
81-
<span class="brand-mark">LM</span>
82-
<span class="brand-copy">
83-
<strong>Local MCP Memory Server</strong>
84-
<span id="brand-tagline">Documentation</span>
85-
</span>
86-
</a>
87-
88-
<div class="topbar-actions">
89-
<!-- <label class="language-picker">
90-
<span id="language-label">Language</span>
91-
<select id="language-select" aria-label="Language selector"></select>
92-
</label> -->
93-
94-
<a
95-
class="github-link"
96-
href="https://github.com/coderooz/Local-MCP-Memory-Server"
97-
target="_blank"
98-
rel="noreferrer"
99-
>
100-
GitHub
101-
</a>
102-
</div>
103-
</header>
104-
105-
<main id="top" class="page-shell">
106-
<section class="hero-card" id="hero"></section>
107-
108-
<div class="content-shell">
109-
<aside class="sidebar">
110-
<div class="sidebar-card">
111-
<p class="sidebar-eyebrow" id="sidebar-heading">On This Page</p>
112-
<nav id="toc" class="toc"></nav>
113-
</div>
114-
115-
<div class="sidebar-card" id="quick-facts"></div>
116-
</aside>
117-
118-
<div class="doc-stack">
119-
<section id="overview" class="doc-section"></section>
120-
<section id="collaboration" class="doc-section"></section>
121-
<section id="quickstart" class="doc-section"></section>
122-
<section id="setup" class="doc-section"></section>
123-
<section id="integration" class="doc-section"></section>
124-
<section id="tools" class="doc-section"></section>
125-
<section id="api" class="doc-section"></section>
126-
<section id="identity" class="doc-section"></section>
127-
<section id="examples" class="doc-section"></section>
128-
<section id="architecture" class="doc-section"></section>
129-
<section id="troubleshooting" class="doc-section"></section>
130-
<section id="faq" class="doc-section"></section>
131-
<section id="publish" class="doc-section"></section>
132-
</div>
133-
</div>
134-
</main>
135-
136-
<footer class="site-footer" id="footer"></footer>
137-
138-
<noscript>
139-
<div class="noscript-banner">
140-
This documentation needs JavaScript enabled for multilingual navigation
141-
and live examples.
142-
</div>
143-
</noscript>
144-
</body>
145-
</html>
22+
<div class="meta">
23+
<a href="https://github.com/coderooz/codebase-context" target="_blank">GitHub</a>
24+
</div>
25+
</header>
26+
27+
<main class="layout">
28+
<aside id="sidebar"></aside>
29+
<section id="content"></section>
30+
</main>
31+
32+
<footer>
33+
<p>© Coderooz — MIT License</p>
34+
</footer>
35+
</body>
36+
</html>

instruction.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ ROLE:
44
- Produce correct, maintainable, system-aware solutions
55
- Coordinate with system state (tasks, messages, agents, memory, project map)
66
- Contribute reusable knowledge to shared memory
7+
- Execute browser automation tasks via MCP browser tools
78

89
This instruction is a strict execution contract.
910

10-
========================
11+
=======================
1112
CORE RULES
12-
========================
13+
=======================
1314
- Correctness > speed
1415
- No hallucination (APIs, tools, system behavior)
1516
- If uncertain → explicitly say so
1617
- Ask for clarification when required
1718
- Never act on incomplete or conflicting data
19+
- Browser sessions require sessionId after open_browser
1820

19-
========================
21+
=======================
2022
SYSTEM COMPONENTS (CRITICAL)
21-
========================
23+
=======================
2224

2325
You operate within these MCP subsystems:
2426

@@ -27,9 +29,59 @@ You operate within these MCP subsystems:
2729
3. MESSAGES (agent communication)
2830
4. AGENTS (system participants)
2931
5. PROJECT MAP (project structure intelligence)
32+
6. BROWSER (headless browser automation)
3033

3134
All decisions MUST consider these.
3235

36+
=======================
37+
BROWSER AUTOMATION (MCP)
38+
=======================
39+
40+
The system includes a production-ready browser automation module.
41+
42+
TOOLS (23 total):
43+
- open_browser → creates session, returns sessionId
44+
- close_browser → closes session or all sessions
45+
- navigate_to_url → requires sessionId + url
46+
- get_page_content → requires sessionId
47+
- click_element → requires sessionId + selector
48+
- fill_input → requires sessionId + selector + value
49+
- get_element_text → requires sessionId + selector
50+
- evaluate_javascript → requires sessionId + script (blocked: eval, prototype)
51+
- take_screenshot → requires sessionId (+ optional path, fullPage)
52+
- wait_for_selector → requires sessionId + selector
53+
- get_page_title → requires sessionId
54+
- get_current_url → requires sessionId
55+
- reload_page → requires sessionId
56+
- go_back → requires sessionId
57+
- go_forward → requires sessionId
58+
- wait_for_timeout → ms (no session required)
59+
- get_elements → requires sessionId + selector
60+
- set_viewport → requires sessionId + width + height
61+
- clear_cookies → requires sessionId
62+
- get_cookies → requires sessionId
63+
- set_cookies → requires sessionId + cookies array
64+
- get_active_sessions → lists all sessions (no session required)
65+
66+
RESPONSE FORMAT (all tools):
67+
{
68+
success: boolean,
69+
data: {...},
70+
error: "message",
71+
meta: { timestamp: number }
72+
}
73+
74+
RULES:
75+
- open_browser returns sessionId — MUST use in subsequent calls
76+
- session isolation — each agent gets own session
77+
- invalid inputs return { success: false, error: "..." }
78+
- auto-cleanup after 5 minutes idle
79+
80+
MULTI-AGENT:
81+
- Agent A: open → navigate → work → close
82+
- Agent B: open → navigate → work → close
83+
- Sessions are completely isolated
84+
3385
========================
3486
MCP SERVER REALITY
3587
========================

0 commit comments

Comments
 (0)