@getmikk/mcp-server 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+ # @getmikk/mcp-server
2
+
3
+ MCP (Model Context Protocol) server for [Mikk](https://github.com/Ansh-dhanani/mikk) — plugs your project's architectural intelligence directly into AI assistants like Claude, Cursor, and any MCP-compatible client.
4
+
5
+ Once connected, your AI assistant can answer questions like *"what breaks if I change this file?"*, *"who calls `parseToken`?"*, and *"what are the architectural constraints for this project?"* — all grounded in the actual call graph, not guesses.
6
+
7
+ ---
8
+
9
+ ## Requirements
10
+
11
+ - [Mikk](https://github.com/Ansh-dhanani/mikk) installed and initialized in your project (`mikk.json` + `mikk.lock.json` present)
12
+ - Node.js 18+ or Bun 1.x
13
+
14
+ ---
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install -g @getmikk/mcp-server
20
+ # or
21
+ bunx @getmikk/mcp-server /path/to/your/project
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Connecting to an MCP client
27
+
28
+ ### Claude Desktop
29
+
30
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
31
+
32
+ ```json
33
+ {
34
+ "mcpServers": {
35
+ "mikk": {
36
+ "command": "npx",
37
+ "args": ["-y", "@getmikk/mcp-server", "/absolute/path/to/your/project"]
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ ### Cursor / VS Code (via settings.json)
44
+
45
+ ```json
46
+ {
47
+ "mcp.servers": {
48
+ "mikk": {
49
+ "command": "npx",
50
+ "args": ["-y", "@getmikk/mcp-server", "/absolute/path/to/your/project"]
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ### Direct invocation
57
+
58
+ ```bash
59
+ mikk-mcp /path/to/project
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Tools (12)
65
+
66
+ All tools read from the lock file (`mikk.lock.json`) — fast, no re-parsing.
67
+
68
+ | Tool | Purpose |
69
+ |---|---|
70
+ | `mikk_get_project_overview` | Modules, function counts, tech stack, constraints |
71
+ | `mikk_query_context` | Ask an architecture question — returns graph-traced context with call chains |
72
+ | `mikk_impact_analysis` | Blast radius of changing a specific file |
73
+ | `mikk_before_edit` | **Call before editing any file** — exported functions at risk, constraints that apply, full blast radius |
74
+ | `mikk_find_usages` | Every function that calls a specific function — essential before renaming |
75
+ | `mikk_list_modules` | All declared modules with file/function counts |
76
+ | `mikk_get_module_detail` | Functions, files, exported API, and internal call graph for a module |
77
+ | `mikk_get_function_detail` | Params, return type, call graph, source body, error handling for a function |
78
+ | `mikk_search_functions` | Substring search across all function names |
79
+ | `mikk_get_constraints` | All architectural constraints and design decisions |
80
+ | `mikk_get_file` | Read raw source of any project file (with path traversal guard) |
81
+ | `mikk_get_routes` | Detected HTTP routes (Express / Koa / Hono style) |
82
+
83
+ ### Staleness warning
84
+
85
+ If `mikk.lock.json` is in a `drifted` or `conflict` state (i.e., out of sync with the source), every impact-sensitive tool will include a `"warning"` field in its response:
86
+
87
+ ```json
88
+ {
89
+ "warning": "⚠️ Lock file is drifted. Run `mikk analyze` for accurate results."
90
+ }
91
+ ```
92
+
93
+ Run `mikk analyze` in your project to refresh the lock.
94
+
95
+ ---
96
+
97
+ ## Resources (3)
98
+
99
+ | URI | Content |
100
+ |---|---|
101
+ | `mikk://contract` | The full `mikk.json` contract as JSON |
102
+ | `mikk://lock` | The full `mikk.lock.json` as JSON |
103
+ | `mikk://context` | The `claude.md` AI context document (if present) |
104
+
105
+ ---
106
+
107
+ ## Tool reference
108
+
109
+ ### `mikk_before_edit`
110
+
111
+ The most important tool. Call it **before** editing any file.
112
+
113
+ ```
114
+ files: string[] # relative paths, e.g. ["src/auth/verify.ts"]
115
+ ```
116
+
117
+ Returns for each file:
118
+ - Functions defined in the file
119
+ - Exported functions at risk (with their callers)
120
+ - Blast radius (how many nodes depend on this file)
121
+ - All project-level architectural constraints
122
+
123
+ ---
124
+
125
+ ### `mikk_query_context`
126
+
127
+ Ask an architecture question and get back a formatted context block ready to feed into your prompt.
128
+
129
+ ```
130
+ question: string # e.g. "How does token refresh work?"
131
+ maxHops: number (default 4)
132
+ tokenBudget: number (default 6000)
133
+ focusFile: string (optional) # anchor traversal from a specific file
134
+ focusModule: string (optional) # anchor traversal from a specific module
135
+ provider: 'generic' | 'claude' | 'compact' (default 'generic')
136
+ ```
137
+
138
+ Returns `isError: true` with a helpful message if no context was found (e.g. file doesn't exist in the lock).
139
+
140
+ ---
141
+
142
+ ### `mikk_find_usages`
143
+
144
+ Find everything that calls a function — complete with file, module, and line number.
145
+
146
+ ```
147
+ name: string # function name (e.g. "parseToken")
148
+ ```
149
+
150
+ ---
151
+
152
+ ### `mikk_impact_analysis`
153
+
154
+ ```
155
+ file: string # relative path to the file being changed
156
+ ```
157
+
158
+ Returns `changedNodes`, `impactedNodes`, depth, confidence, and the top 30 impacted functions.
159
+
160
+ ---
161
+
162
+ ## Recommended AI assistant workflow
163
+
164
+ 1. **Before editing** → call `mikk_before_edit` with the files you plan to touch
165
+ 2. **Understanding a flow** → call `mikk_query_context` with your question
166
+ 3. **Renaming a function** → call `mikk_find_usages` first
167
+ 4. **Exploring the project** → `mikk_get_project_overview` → `mikk_get_module_detail`
168
+
169
+ ---
170
+
171
+ ## License
172
+
173
+ Apache-2.0