@damper/mcp 0.3.5 → 0.3.7

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 (3) hide show
  1. package/README.md +30 -0
  2. package/dist/index.js +31 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -310,6 +310,36 @@ When working on tasks, follow this workflow for best results:
310
310
  > Sync all my documentation to Damper
311
311
  ```
312
312
 
313
+ ## Agent Instructions (CLAUDE.md)
314
+
315
+ Add this to your project's `CLAUDE.md` (or `.cursorrules` for Cursor) to ensure AI agents use Damper consistently:
316
+
317
+ ```markdown
318
+ ## Task Management with Damper MCP
319
+
320
+ This project uses Damper MCP for task tracking. **You MUST follow this workflow.**
321
+
322
+ ### At Session Start
323
+ 1. `get_project_context` - Read available project documentation
324
+ 2. `list_tasks` - Check for existing tasks to work on
325
+ 3. If working on a task: `start_task` to lock it
326
+
327
+ ### While Working
328
+ - `add_note` after each commit: "Committed abc123: description"
329
+ - `add_note` for decisions: "Decision: chose X because Y"
330
+ - `update_subtask` to mark subtask progress
331
+
332
+ ### At Session End (MANDATORY)
333
+ - ALWAYS call `add_note` with session summary before stopping
334
+ - ALWAYS call `complete_task` (if done) or `abandon_task` (if stopping early)
335
+ - NEVER leave a started task without completing or abandoning it
336
+
337
+ ### Why This Matters
338
+ - Locked tasks block other agents from working on them
339
+ - Notes help the next agent (or you) continue the work
340
+ - Project context saves future agents from re-analyzing the codebase
341
+ ```
342
+
313
343
  ## Environment
314
344
 
315
345
  | Variable | Required | Default |
package/dist/index.js CHANGED
@@ -635,7 +635,10 @@ server.registerTool('get_context_section', {
635
635
  openWorldHint: false,
636
636
  },
637
637
  }, async ({ section }) => {
638
- const data = await api('GET', `/api/agent/context/${encodeURIComponent(section)}`);
638
+ // Encode section for URL path - encodeURIComponent doesn't encode * which can cause
639
+ // issues with some proxies/CDNs that interpret * as a wildcard
640
+ const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
641
+ const data = await api('GET', `/api/agent/context/${encodedSection}`);
639
642
  // Handle glob pattern response (multiple sections)
640
643
  if (data.pattern && data.sections) {
641
644
  const lines = [`**Sections matching "${data.pattern}":**\n`];
@@ -704,6 +707,33 @@ server.registerTool('update_context_section', {
704
707
  structuredContent: result,
705
708
  };
706
709
  });
710
+ // Tool: Delete context section
711
+ server.registerTool('delete_context_section', {
712
+ title: 'Delete Context Section',
713
+ description: 'Delete a project context section. Use when documentation is outdated or no longer relevant.',
714
+ inputSchema: z.object({
715
+ section: z.string()
716
+ .regex(/^[a-z][a-z0-9-]{0,49}(\/[a-z][a-z0-9-]{0,49}){0,2}$/)
717
+ .describe('Section name or path to delete (e.g., "overview", "api/architecture")'),
718
+ }),
719
+ outputSchema: z.object({
720
+ success: z.boolean(),
721
+ section: z.string(),
722
+ }),
723
+ annotations: {
724
+ readOnlyHint: false,
725
+ destructiveHint: true,
726
+ idempotentHint: true,
727
+ openWorldHint: false,
728
+ },
729
+ }, async ({ section }) => {
730
+ const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
731
+ const result = await api('DELETE', `/api/agent/context/${encodedSection}`);
732
+ return {
733
+ content: [{ type: 'text', text: `🗑️ Deleted context section: ${result.section}` }],
734
+ structuredContent: result,
735
+ };
736
+ });
707
737
  // Tool: Sync project context (bulk upload)
708
738
  server.registerTool('sync_project_context', {
709
739
  title: 'Sync Project Context',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/mcp",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "MCP server for Damper task management",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {