@stackguide/mcp-server 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +32 -348
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,60 +1,12 @@
1
1
  # StackGuide MCP Server
2
2
 
3
- A Model Context Protocol (MCP) server that provides dynamic language and framework context for AI coding assistants. Compatible with **Cursor** and **GitHub Copilot**.
3
+ Dynamic context loading for AI coding assistants. Works with **Cursor** and **GitHub Copilot**.
4
4
 
5
- ## Features
5
+ ## Quick Start
6
6
 
7
- - 🎯 **Dynamic Context Loading**: Load context based on your project type (Python/Django, React/Node, etc.)
8
- - 📋 **Rules Management**: Select and apply coding standards, best practices, and security guidelines
9
- - 📚 **Knowledge Base**: Access architecture patterns, common issues solutions, and code snippets
10
- - 💾 **Configuration Persistence**: Save and load your preferred configurations
11
- - 🔄 **Compatible**: Works with both Cursor and GitHub Copilot
12
- - ✨ **Dynamic Rule Management**: Create, edit, and delete rules at runtime using tools
13
- - 🌐 **Web Documentation**: Fetch and cache documentation from any URL
14
- - 📝 **Rule Templates**: Quick-start templates for common rule types (coding-standard, best-practice, security, architecture, testing)
15
- - 🔗 **Cursor Directory Integration**: Browse, search, and import rules from [cursor.directory](https://cursor.directory/rules/) - a community-driven repository of AI coding rules
16
-
17
- ## Supported Project Types
18
-
19
- | Type | Languages | Frameworks |
20
- |------|-----------|------------|
21
- | `python-django` | Python | Django, DRF |
22
- | `python-fastapi` | Python | FastAPI |
23
- | `python-flask` | Python | Flask |
24
- | `react-node` | JavaScript, TypeScript | React, Node.js, Express |
25
- | `react-typescript` | TypeScript | React |
26
- | `vue-node` | JavaScript, TypeScript | Vue.js, Node.js |
27
- | `nextjs` | JavaScript, TypeScript | Next.js, React |
28
- | `express` | JavaScript, TypeScript | Express.js |
29
- | `nestjs` | TypeScript | NestJS |
30
- | `laravel` | PHP | Laravel |
31
- | `rails` | Ruby | Ruby on Rails |
32
- | `golang` | Go | - |
33
- | `rust` | Rust | - |
34
-
35
- ## Installation
36
-
37
- ### From npm (Recommended)
38
-
39
- ```bash
40
- npm install -g @stackguide/mcp-server
41
- ```
42
-
43
- ### From Source
44
-
45
- ```bash
46
- git clone https://github.com/taimiralain/StackGuide-MCP.git
47
- cd StackGuide-MCP
48
- npm install
49
- npm run build
50
- ```
51
-
52
- ## Configuration
53
-
54
- ### For Cursor
55
-
56
- Add to your Cursor settings (`.cursor/mcp.json`):
7
+ ### 1. Configure
57
8
 
9
+ **Cursor** (`.cursor/mcp.json`):
58
10
  ```json
59
11
  {
60
12
  "mcpServers": {
@@ -66,23 +18,7 @@ Add to your Cursor settings (`.cursor/mcp.json`):
66
18
  }
67
19
  ```
68
20
 
69
- Or if installed from source:
70
-
71
- ```json
72
- {
73
- "mcpServers": {
74
- "stackguide": {
75
- "command": "node",
76
- "args": ["/path/to/StackGuide-MCP/dist/index.js"]
77
- }
78
- }
79
- }
80
- ```
81
-
82
- ### For VS Code with GitHub Copilot
83
-
84
- Add to `.vscode/mcp.json` in your workspace:
85
-
21
+ **VS Code** (`.vscode/mcp.json`):
86
22
  ```json
87
23
  {
88
24
  "mcpServers": {
@@ -94,302 +30,50 @@ Add to `.vscode/mcp.json` in your workspace:
94
30
  }
95
31
  ```
96
32
 
97
- Or add to your user settings (`settings.json`):
98
-
99
- ```json
100
- {
101
- "github.copilot.chat.mcpServers": {
102
- "stackguide": {
103
- "command": "npx",
104
- "args": ["-y", "@stackguide/mcp-server"]
105
- }
106
- }
107
- }
108
- ```
109
-
110
- ## Usage
111
-
112
- ### Available Tools
113
-
114
- #### Project Type Management
115
- - `list_project_types` - List all supported project types
116
- - `select_project_type` - Activate a project type context
117
- - `get_current_context` - Get the currently active context
118
-
119
- #### Rules Management
120
- - `list_rules` - List available rules for current project
121
- - `get_rule` - Get full content of a specific rule
122
- - `select_rules` - Select which rules to include in context
123
- - `search_rules` - Search rules by keyword
124
-
125
- #### Knowledge Base
126
- - `list_knowledge` - List knowledge base files
127
- - `get_knowledge` - Get content of a knowledge file
128
- - `select_knowledge` - Select knowledge to include
129
- - `search_knowledge` - Search knowledge base
130
-
131
- #### Configuration
132
- - `save_configuration` - Save current context setup
133
- - `load_configuration` - Load a saved configuration
134
- - `list_configurations` - List all saved configurations
135
- - `delete_configuration` - Delete a configuration
136
- - `export_configuration` - Export config as JSON
137
- - `import_configuration` - Import config from JSON
138
-
139
- #### Dynamic Rule Management (NEW!)
140
- - `create_rule` - Create a new custom rule from scratch
141
- - `create_rule_from_template` - Create a rule using a template
142
- - `list_rule_templates` - List available rule templates
143
- - `update_rule` - Update an existing user rule
144
- - `delete_rule` - Delete a user rule
145
- - `list_user_rules` - List all user-created rules
146
- - `export_user_rules` - Export all user rules as JSON
147
- - `import_user_rules` - Import user rules from JSON
148
-
149
- #### Web Documentation (NEW!)
150
- - `fetch_web_docs` - Fetch documentation from any URL
151
- - `fetch_multiple_docs` - Fetch multiple URLs at once
152
- - `get_web_doc` - Get a cached web document
153
- - `search_web_docs` - Search cached documentation
154
- - `list_web_docs` - List all cached documents
155
- - `get_suggested_docs` - Get suggested docs for a project type
156
- - `remove_web_doc` - Remove a cached document
157
-
158
- #### Cursor Directory Integration (NEW!)
159
- - `browse_cursor_directory` - Browse rules by category from cursor.directory
160
- - `search_cursor_directory` - Search for rules on cursor.directory
161
- - `get_cursor_directory_rule` - Get a specific rule by slug
162
- - `list_cursor_directory_categories` - List all available categories
163
- - `get_popular_cursor_rules` - Get popular/featured rules
164
- - `import_cursor_directory_rule` - Import a rule into your local collection
165
-
166
- #### Context
167
- - `get_full_context` - Get complete active context
168
- - `add_custom_rule` - Add a custom rule
169
-
170
- ### Example Workflow
171
-
172
- 1. **Select your project type:**
173
- ```
174
- Use select_project_type with "react-node"
175
- ```
176
-
177
- 2. **View available rules:**
178
- ```
179
- Use list_rules to see all available rules
180
- ```
181
-
182
- 3. **Select specific rules:**
183
- ```
184
- Use select_rules with the IDs of rules you want
185
- ```
186
-
187
- 4. **Save your configuration:**
188
- ```
189
- Use save_configuration with a name like "My React Setup"
190
- ```
191
-
192
- 5. **Get full context for AI:**
193
- ```
194
- Use get_full_context to get all selected rules and knowledge
195
- ```
196
-
197
- ### Available Resources
198
-
199
- - `rules://{project_type}/all` - All rules for a project type
200
- - `knowledge://{project_type}/all` - All knowledge for a project type
201
- - `context://active` - Currently active context (includes rules, user rules, knowledge, and web docs)
202
- - `user-rules://{project_type}/all` - All user-created rules for a project type
203
- - `web-doc://{doc_id}` - Specific cached web document
204
- - `templates://rules` - Available rule templates
205
-
206
- ### Available Prompts
207
-
208
- - `setup_project` - Initialize context for a new project
209
- - `code_review` - Review code with active rules
210
- - `apply_patterns` - Apply architecture patterns
211
-
212
- ## Adding Custom Rules
213
-
214
- ### Via Tool
215
- Use the `add_custom_rule` tool with:
216
- - `name`: Rule name
217
- - `category`: One of `coding-standards`, `best-practices`, `security`, `performance`, `architecture`, `testing`, `documentation`, `naming-conventions`
218
- - `content`: Rule content in Markdown
219
- - `description`: Brief description
220
-
221
- ### Via Files
222
- Add Markdown files to the `data/rules/{project-type}/{category}/` directory:
223
-
224
- ```markdown
225
- # Rule Title
226
-
227
- Description of the rule.
228
-
229
- ## Guidelines
230
-
231
- - Guideline 1
232
- - Guideline 2
233
-
234
- ## Examples
235
-
236
- ```python
237
- # Code example
238
- ```
239
- ```
240
-
241
- ## Configuration Storage
33
+ ### 2. Use
242
34
 
243
- User configurations are stored in `~/.stackguide/`:
244
- - `configurations.json` - All saved configurations
245
- - `rules/{project-type}/*.json` - User-created rules
246
- - `web-docs/cache.json` - Cached web documentation
35
+ Just ask your AI assistant:
36
+ - *"Select project type react-node"*
37
+ - *"List available rules"*
38
+ - *"Get full context"*
39
+ - *"Browse cursor directory for python rules"*
247
40
 
248
- ## Development
41
+ ## Supported Stacks
249
42
 
250
- ### Build
43
+ `python-django` · `python-fastapi` · `python-flask` · `react-node` · `react-typescript` · `vue-node` · `nextjs` · `express` · `nestjs` · `laravel` · `rails` · `golang` · `rust`
251
44
 
252
- ```bash
253
- npm run build
254
- ```
45
+ ## Tools (42 total)
255
46
 
256
- ### Run in Development
257
-
258
- ```bash
259
- npm run dev
260
- ```
261
-
262
- ### Project Structure
263
-
264
- ```
265
- StackGuide-MCP/
266
- ├── src/
267
- │ ├── index.ts # Main entry point
268
- │ ├── config/
269
- │ │ ├── types.ts # TypeScript types
270
- │ │ └── persistence.ts # Configuration storage
271
- │ ├── resources/
272
- │ │ ├── rulesProvider.ts # Rules management
273
- │ │ └── knowledgeProvider.ts # Knowledge base
274
- │ └── services/
275
- │ ├── ruleManager.ts # Dynamic rule CRUD
276
- │ └── webDocumentation.ts # Web docs fetcher
277
- ├── data/
278
- │ ├── rules/ # Rule files by project type
279
- │ │ ├── python-django/
280
- │ │ └── react-node/
281
- │ └── knowledge/ # Knowledge files by project type
282
- │ ├── python-django/
283
- │ └── react-node/
284
- ├── docs/
285
- │ └── ADDING_CUSTOM_RULES.md # Guide for adding rules
286
- ├── package.json
287
- ├── tsconfig.json
288
- └── README.md
289
- ```
290
-
291
- ## Dynamic Rule Management
292
-
293
- ### Creating Rules from Templates
294
-
295
- 1. **List available templates:**
296
- ```
297
- Use list_rule_templates
298
- ```
299
-
300
- 2. **Create a rule from template:**
301
- ```
302
- Use create_rule_from_template with:
303
- - templateId: "coding-standard"
304
- - projectType: "react-node"
305
- - name: "My Team Standards"
306
- ```
307
-
308
- 3. **Edit the rule:**
309
- ```
310
- Use update_rule with the rule ID and new content
311
- ```
312
-
313
- ### Creating Rules from Scratch
314
-
315
- ```
316
- Use create_rule with:
317
- - projectType: "python-django"
318
- - name: "API Versioning"
319
- - category: "best-practices"
320
- - content: "# API Versioning\n\nAlways version your APIs..."
321
- - description: "Guidelines for API versioning"
322
- ```
323
-
324
- ## Web Documentation
325
-
326
- ### Fetching Documentation
327
-
328
- ```
329
- Use fetch_web_docs with:
330
- - url: "https://react.dev/reference/react/useState"
331
- - projectType: "react-node"
332
- - title: "useState Hook"
333
- ```
334
-
335
- ### Getting Suggestions
336
-
337
- ```
338
- Use get_suggested_docs with projectType: "react-node"
339
- ```
340
-
341
- This returns popular documentation URLs for the framework.
47
+ | Category | Tools |
48
+ |----------|-------|
49
+ | **Project** | `list_project_types` `select_project_type` `get_current_context` |
50
+ | **Rules** | `list_rules` `get_rule` `select_rules` `search_rules` `create_rule` `update_rule` `delete_rule` |
51
+ | **Knowledge** | `list_knowledge` `get_knowledge` `select_knowledge` `search_knowledge` |
52
+ | **Config** | `save_configuration` `load_configuration` `list_configurations` `export_configuration` |
53
+ | **Web Docs** | `fetch_web_docs` `list_web_docs` `search_web_docs` `get_suggested_docs` |
54
+ | **Cursor Directory** | `browse_cursor_directory` `search_cursor_directory` `import_cursor_directory_rule` `get_popular_cursor_rules` |
55
+ | **Context** | `get_full_context` `add_custom_rule` |
342
56
 
343
57
  ## Cursor Directory Integration
344
58
 
345
- [cursor.directory](https://cursor.directory/rules/) is a community-driven repository of cursor rules for various technologies. StackGuide-MCP integrates with it to let you:
346
-
347
- ### Browse Rules by Category
59
+ Import community rules from [cursor.directory](https://cursor.directory/rules/):
348
60
 
349
61
  ```
350
- Use browse_cursor_directory with category: "typescript"
62
+ browse_cursor_directory category:"python"
63
+ search_cursor_directory query:"react best practices"
64
+ import_cursor_directory_rule slug:"nextjs-react-typescript-cursor-rules"
351
65
  ```
352
66
 
353
- Available categories include: typescript, python, react, next.js, vue, django, fastapi, nestjs, prisma, tailwindcss, and many more.
67
+ ## Custom Rules
354
68
 
355
- ### Search for Rules
69
+ Create your own rules that persist across sessions:
356
70
 
357
71
  ```
358
- Use search_cursor_directory with query: "react hooks best practices"
72
+ create_rule projectType:"react-node" name:"My Standards" category:"best-practices" content:"..."
359
73
  ```
360
74
 
361
- ### Get Popular Rules
362
-
363
- ```
364
- Use get_popular_cursor_rules
365
- ```
366
-
367
- Returns featured rules from popular frameworks.
368
-
369
- ### Import Rules
370
-
371
- ```
372
- Use import_cursor_directory_rule with:
373
- - slug: "nextjs-react-typescript-cursor-rules"
374
- - projectType: "react-typescript"
375
- - category: "best-practices"
376
- ```
377
-
378
- This fetches the rule from cursor.directory and saves it to your local rules collection.
379
-
380
- ## Contributing
381
-
382
- 1. Fork the repository
383
- 2. Create a feature branch
384
- 3. Add your rules/knowledge files or enhance the server
385
- 4. Submit a pull request
386
-
387
- ### Adding Support for New Frameworks
388
-
389
- 1. Add project type to `src/config/types.ts`
390
- 2. Create rule files in `data/rules/{new-type}/`
391
- 3. Create knowledge files in `data/knowledge/{new-type}/`
75
+ Rules are stored in `~/.stackguide/rules/`.
392
76
 
393
77
  ## License
394
78
 
395
- GPL-3.0 - See [LICENSE](LICENSE) for details.
79
+ GPL-3.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackguide/mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP Server for dynamic language and framework context loading - Compatible with Cursor and GitHub Copilot",
5
5
  "main": "dist/index.js",
6
6
  "bin": {