Skip to content
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
9b0884b
DOC-6268 basic tool design docs
andy-stark-redis Feb 16, 2026
79605a3
DOC-6268 basic project setup
andy-stark-redis Feb 16, 2026
294c2f8
DOC-6268 50% complete
andy-stark-redis Feb 16, 2026
00ff590
DOC-6268 65% complete
andy-stark-redis Feb 16, 2026
267ab51
DOC-6268 75% complete plus better-formatted START_HERE.md
andy-stark-redis Feb 16, 2026
7c6ec83
DOC-6268 tool code complete (90% progress)
andy-stark-redis Feb 17, 2026
5af62c0
DOC-6268 initial development 100% complete
andy-stark-redis Feb 17, 2026
3561210
DOC-6268 extra fixes
andy-stark-redis Feb 17, 2026
4abe07d
DOC-6268 fixed bad parsing issues
andy-stark-redis Feb 17, 2026
aacb171
DOC-6268 fixed some more issues
andy-stark-redis Feb 17, 2026
3e80a10
DOC-6268 fixed overloads
andy-stark-redis Feb 17, 2026
b310fe8
DOC-6268 improve signature accuracy/coverage
andy-stark-redis Feb 17, 2026
aed73ab
DOC-6268 fix C# quirks
andy-stark-redis Feb 17, 2026
96bfffe
DOC-6268 more fixes
andy-stark-redis Feb 17, 2026
0f7c222
DOC-6268 full Lettuce and ioredis coverage
andy-stark-redis Feb 17, 2026
037b279
DOC-6268 now gets param doc comments properly
andy-stark-redis Feb 17, 2026
c29a570
DOC-6268 remove noise words from signatures
andy-stark-redis Feb 17, 2026
9682b37
DOC-6268 better type extraction
andy-stark-redis Feb 17, 2026
4875350
DOC-6268 removed node-redis CommandParser params
andy-stark-redis Feb 17, 2026
ff2f055
DOC-6268 better Lettuce generic type handling
andy-stark-redis Feb 17, 2026
c49aaa6
DOC-6268 removed language-specific markup from doc comment text
andy-stark-redis Feb 17, 2026
fb18102
DOC-6268 create initial main mapping file
andy-stark-redis Feb 17, 2026
c82cd26
DOC-6268 basic TCE display of method signatures
andy-stark-redis Feb 18, 2026
5bf445d
DOC-6268 better formatting for method signatures
andy-stark-redis Feb 18, 2026
09624a7
DOC-6268 foldouts for methods
andy-stark-redis Feb 18, 2026
3ec0183
DOC-6268 brighter type colour
andy-stark-redis Feb 18, 2026
12a99cf
DOC-6268 added comments to params and returns
andy-stark-redis Feb 18, 2026
8a576ac
DOC-6286 API method tab on commands pages
andy-stark-redis Feb 18, 2026
826f1c4
DOC-6268 made Java signature formatting consistent
andy-stark-redis Feb 18, 2026
6caf609
DOC-6268 correct Python param formatting
andy-stark-redis Feb 18, 2026
e489842
DOC-6268 remove C# XML comment tags
andy-stark-redis Feb 18, 2026
8b96890
DOC-6268 prevent Python bitfield get/set being listed as string set/g…
andy-stark-redis Feb 18, 2026
6ef6559
DOC-6268 aligned method sig tab with code example tabs
andy-stark-redis Feb 18, 2026
a886ef6
DOC-6268 added overrides file to facilitate manual edits
andy-stark-redis Feb 23, 2026
6f67612
DOC-6268 added JSON commands
andy-stark-redis Feb 23, 2026
b5fa98b
DOC-6268 added missing prompts in JSON CLI examples
andy-stark-redis Feb 23, 2026
a6d3335
DOC-6268 added list commands
andy-stark-redis Feb 23, 2026
84f869f
DOC-6268 sets commands
andy-stark-redis Feb 23, 2026
8ee045b
DOC-6268 sorted set commands
andy-stark-redis Feb 24, 2026
1ae0b90
DOC-6268 stream commands
andy-stark-redis Feb 24, 2026
07ab5ac
DOC-6268 removed 127.0.0.1 bit from CLI prompts
andy-stark-redis Feb 24, 2026
92c65df
DOC-6268 vector set commands
andy-stark-redis Feb 24, 2026
7105361
DOC-6268 geo commands
andy-stark-redis Feb 24, 2026
a039817
DOC-6268 bitmap/bitfield commands
andy-stark-redis Feb 24, 2026
4de7c7a
DOC-6268 time series commands
andy-stark-redis Feb 25, 2026
499422e
DOC-6268 HyperLogLog and Bloom commands
andy-stark-redis Feb 25, 2026
475704a
DOC-6286 Cuckoo and t-digest commands
andy-stark-redis Feb 25, 2026
dc89b7e
DOC-6268 Top-K and CMS commands
andy-stark-redis Feb 25, 2026
7ac76c2
DOC-6268 split mapping file into one file per command
andy-stark-redis Feb 25, 2026
cb13f34
DOC-6268 modified MCP to handle RQE module
andy-stark-redis Feb 25, 2026
c64b0b3
DOC-6268 MCP server improvements
andy-stark-redis Feb 26, 2026
10786b9
DOC-6268 query engne commands
andy-stark-redis Feb 26, 2026
f5154a2
DOC-6268 pub/sub commands for a few clients
andy-stark-redis Feb 26, 2026
b35c1b9
DOC-6268 script/function commands
andy-stark-redis Feb 26, 2026
e88a93d
DOC-6268 improved MCP server tool
andy-stark-redis Feb 26, 2026
36eb23d
DOC-6268 improved MCP server tool
andy-stark-redis Feb 26, 2026
c7b0437
DOC-6268 updated MCP tools
andy-stark-redis Feb 26, 2026
629e1d4
DOC-6268 updated MCP tools
andy-stark-redis Feb 26, 2026
08b8be8
DOC-6268 connection mgmt commands
andy-stark-redis Feb 27, 2026
68ebb30
DOC-6268 server mgmt commands
andy-stark-redis Feb 27, 2026
47dab15
DOC-6268 added dropdown arrow
andy-stark-redis Feb 27, 2026
bb84561
DOC-6268 deleted AI coding session files
andy-stark-redis Feb 27, 2026
01857f5
DOC-6268 fix badly-escaped formatting in Markdown files
andy-stark-redis Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions build/command-api-mapping-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Command API Mapping

The `data/command-api-mapping/` directory contains individual JSON files mapping Redis commands to their client library method signatures.

## Structure

Each file is named after a Redis command (e.g., `GET.json`, `SET.json`, `BF.ADD.json`) and contains the API mappings for that command:

```json
{
"api_calls": {
"redis_py": [...],
"jedis": [...],
"lettuce_sync": [...],
"lettuce_async": [...],
"lettuce_reactive": [...],
"go-redis": [...],
"node_redis": [...],
"ioredis": [...],
"redis_rs_sync": [...],
"redis_rs_async": [...],
"nredisstack_sync": [...],
"nredisstack_async": [...],
"php": [...]
}
}
```

## Adding a New Command

1. Create a new file named `data/command-api-mapping/COMMAND_NAME.json` (e.g., `MGET.json`)
2. Add the `api_calls` structure with method signatures for each client
3. Run the merge script to generate the combined output

## Merging Files

To combine all individual files into a single `command-api-mapping.json`:

```bash
./build/merge-command-api-mapping.sh # Output to data/command-api-mapping.json
./build/merge-command-api-mapping.sh /path/to/output.json # Output to custom location
```

## Files

- `data/command-api-mapping/*.json` - Individual command mapping files (273 commands)
- `build/merge-command-api-mapping.sh` - Script to combine all files into a single JSON
- `build/command-api-mapping-README.md` - This file

1 change: 1 addition & 0 deletions build/command_api_mapping/ARCHITECTURE_DECISION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Architecture Decision: MCP Server vs Direct Integration\n\n## The Problem\n\nWe need to extract method signatures and doc comments from 14 client libraries, then match them to Redis commands using AI. Multiple team members need to use this tool.\n\n## Key Constraint: API Key Management\n\n**Direct Integration (Node.js + Claude API):**\n- Requires Claude/OpenAI API key\n- Can't store in source repo (security risk)\n- Each team member needs their own key\n- Each run requires prompting for key or using environment variable\n- Friction for team members without API access\n\n**MCP Server Approach:**\n- Rust WASM parsing tools exposed via MCP\n- Claude (via Augment) handles AI matching\n- Team members use Augment (which they already have)\n- No API key management needed\n- Augment handles authentication\n\n## Why MCP Server is Better Here\n\n### 1. **Team Access**\n- All team members have Augment\n- Not all team members have Claude/OpenAI API keys\n- MCP server removes the API key bottleneck\n\n### 2. **Separation of Concerns**\n- **MCP Server (Rust WASM)**: Pure parsing/extraction logic\n - Extract method signatures\n - Extract doc comments\n - Validate extracted data\n - No AI, no API keys needed\n - Reusable in other contexts\n\n- **Claude (via Augment)**: AI matching logic\n - Analyze signatures and docs\n - Match methods to Redis commands\n - Validate matches\n - Handle edge cases\n\n### 3. **Maintainability**\n- Parsing logic is stable and language-specific\n- AI logic can evolve without touching parsing code\n- MCP server can be versioned independently\n- Easy to test parsing in isolation\n\n### 4. **Reusability**\n- MCP server could be used for other documentation extraction tasks\n- Could be shared with other teams\n- Could be open-sourced\n\n## Proposed Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│ Augment Agent (Claude) │\n│ - Orchestrates extraction workflow │\n│ - Calls MCP server tools for parsing │\n│ - Calls Claude API for method-to-command matching │\n│ - Aggregates results into final JSON │\n└─────────────────────────────────────────────────────────┘\n ↓\n┌─────────────────────────────────────────────────────────┐\n│ MCP Server (Rust + WASM) │\n│ Tools: │\n│ - extract_python_signatures(file_path) │\n│ - extract_java_signatures(file_path) │\n│ - extract_go_signatures(file_path) │\n│ - extract_doc_comments(file_path, language) │\n│ - validate_signature(signature, language) │\n└─────────────────────────────────────────────────────────┘\n ↓\n┌─────────────────────────────────────────────────────────┐\n│ Client Library Source Code │\n│ (redis-py, node-redis, go-redis, etc.) │\n└─────────────────────────────────────────────────────────┘\n```\n\n## Implementation Plan\n\n### Phase 1: Build MCP Server (Rust + WASM)\n\n1. **Setup**\n - Create Rust project with `tree-sitter` dependency\n - Add tree-sitter grammars for: Python, Java, Go, TypeScript, Rust, C#, PHP\n - Create WASM bindings with `wasm-bindgen`\n\n2. **Parsing Tools**\n - `extract_signatures(file_path, language)` → JSON array of signatures\n - `extract_doc_comments(file_path, language)` → JSON map of method → doc comment\n - `validate_signature(signature, language)` → boolean\n\n3. **Output Format**\n ```json\n {\n \"method_name\": \"set\",\n \"signature\": \"set(name: str, value: str, ...) -> bool | None\",\n \"doc_comment\": \"Set the string value as value of the key...\",\n \"parameters\": [\n {\"name\": \"name\", \"type\": \"str\"},\n {\"name\": \"value\", \"type\": \"str\"}\n ],\n \"return_type\": \"bool | None\"\n }\n ```\n\n### Phase 2: MCP Server Wrapper\n\n1. Create MCP server that exposes parsing tools\n2. Package as Node.js module (can call WASM from Node)\n3. Define MCP tool schemas\n\n### Phase 3: Augment Integration\n\n1. Configure MCP server in Augment\n2. Create Augment agent that:\n - Calls MCP tools to extract from each client library\n - Calls Claude API to match methods to commands\n - Aggregates into final JSON\n - Validates against schema\n\n## Why This Works Better\n\n| Aspect | Direct Integration | MCP Server |\n|--------|-------------------|------------|\n| API Key Management | Each user needs key | Augment handles it |\n| Team Access | Limited to API key holders | All Augment users |\n| Reusability | Tied to this project | Can be reused |\n| Maintenance | Mixed concerns | Clean separation |\n| Testing | Harder to test parsing | Easy to test tools |\n| Extensibility | Hard to add new languages | Easy to add parsers |\n\n## About API Keys (The Lighter Side)\n\nYou're right that API key management isn't as hard as it seems:\n- Environment variables work fine\n- `.env` files (with `.gitignore`) work\n- CI/CD secrets work\n\nBUT:\n- MCP server approach is still better because:\n - Team members don't need to manage keys\n - Augment already handles authentication\n - Cleaner separation of concerns\n - More reusable\n\n## Recommendation\n\n**Go with MCP Server approach:**\n1. Build Rust WASM parsing tools\n2. Wrap in MCP server\n3. Use Augment to orchestrate extraction and matching\n4. Team members use Augment (which they already have)\n5. No API key friction\n6. Reusable for future documentation extraction tasks\n\n## Next Steps\n\n1. Confirm MCP server approach\n2. Design MCP tool schemas\n3. Start building Rust WASM parsing library\n4. Create MCP server wrapper\n5. Prototype with one client library (redis-py)\n"
1 change: 1 addition & 0 deletions build/command_api_mapping/AUGMENT_INTEGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Augment MCP Server Integration Guide\n\n## Current Status\n\n✅ **Server is fully functional and tested**\n- All 6 tools are discoverable\n- All tools respond correctly to invocations\n- Server builds without errors\n- Server starts without errors\n\n⏳ **Augment Integration Issue**\n- Augment shows red pip: \"No tools are available for this MCP server\"\n- This indicates Augment IS connecting but server isn't responding to ListTools\n\n## Configuration Options\n\nTry these configurations in order:\n\n### Option 1: Simple (Recommended)\n```json\n{\n \"mcpServers\": {\n \"redis-parser-mcp\": {\n \"command\": \"node\",\n \"args\": [\"/Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server/node/dist/index.js\"]\n }\n }\n}\n```\n\n### Option 2: With CWD\n```json\n{\n \"mcpServers\": {\n \"redis-parser-mcp\": {\n \"command\": \"node\",\n \"args\": [\"dist/index.js\"],\n \"cwd\": \"/Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server\"\n }\n }\n}\n```\n\n### Option 3: Full Path to Node\n```json\n{\n \"mcpServers\": {\n \"redis-parser-mcp\": {\n \"command\": \"/usr/local/bin/node\",\n \"args\": [\"dist/index.js\"],\n \"cwd\": \"/Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server\"\n }\n }\n}\n```\n\n## Troubleshooting Steps\n\n1. **Remove and re-add the server**\n - Go to Augment Settings\n - Remove the redis-parser-mcp server\n - Close VSCode completely\n - Reopen VSCode\n - Re-add the server with one of the configs above\n\n2. **Check if Augment daemon needs restart**\n - Run: `ps aux | grep -i augment | grep -v grep`\n - If there's an Augment process, try killing it\n - Restart VSCode\n\n3. **Verify server works manually**\n ```bash\n cd /Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server\n node node/dist/index.js\n ```\n Should start without errors and wait for connections.\n\n4. **Test tool discovery**\n ```bash\n cd /Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server/node\n npm run test-augment-discovery\n ```\n Should show all 6 tools are discoverable.\n\n## Available Tools\n\nOnce Augment connects, these tools will be available:\n\n1. **list_redis_commands** - List all Redis commands\n2. **list_clients** - List all supported Redis clients \n3. **get_client_info** - Get information about a specific client\n4. **extract_signatures** - Extract method signatures from source files\n5. **extract_doc_comments** - Extract documentation from code\n6. **validate_signature** - Validate method signatures\n\n## Files Modified\n\n- `node/package.json` - Added `\"type\": \"module\"`\n- `node/src/index.ts` - Fixed imports and removed startup messages\n- `node/src/data/data-access.ts` - Fixed imports\n- `node/src/data/components-access.ts` - Fixed imports\n- `node/src/test-wasm.ts` - Fixed imports\n- `node/src/integration-test.ts` - Fixed imports\n\n## Next Steps\n\n1. Try one of the configuration options above\n2. Remove and re-add the server in Augment Settings\n3. Close and reopen VSCode\n4. Check if tools now appear\n5. If still not working, try the other configuration options\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded personal paths leak developer home directory

Medium Severity

Multiple files contain hardcoded absolute paths referencing a developer's local machine: /Users/andrew.stark/Documents/Repos/docs/.... This appears in AUGMENT_INTEGRATION_GUIDE.md, AUGMENT_INTEGRATION_SUCCESS.md, AUGMENT_QUICK_START.md, and MCP_SERVER_STATUS.md. These paths expose the developer's username and local directory structure, and won't work for any other team member.

Additional Locations (2)

Fix in Cursor Fix in Web

1 change: 1 addition & 0 deletions build/command_api_mapping/AUGMENT_INTEGRATION_SUCCESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ✅ Augment MCP Server Integration - SUCCESS!\n\n## Status: COMPLETE\n\nThe MCP server is now fully integrated with Augment and all 6 tools are available.\n\n## Final Configuration\n\n```json\n{\n \"mcpServers\": {\n \"redis-parser-mcp\": {\n \"command\": \"node\",\n \"args\": [\"/Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server/node/dist/index.js\"]\n }\n }\n}\n```\n\n**Key Point:** The path must include the `node/dist/index.js` subdirectory, not just `dist/index.js`.\n\n## Available Tools\n\nAll 6 tools are now accessible through Augment:\n\n1. **list_redis_commands** - List all Redis commands from command definition files\n2. **list_clients** - List all supported Redis clients across 7 languages\n3. **get_client_info** - Get detailed information about a specific client\n4. **extract_signatures** - Extract method signatures from client source files\n5. **extract_doc_comments** - Extract documentation from code\n6. **validate_signature** - Validate method signatures across languages\n\n## Test Results\n\n### ✅ Tool Discovery (5/5 tests passed)\n- Server instance created\n- Tool discovery handler registered\n- All 6 tools discoverable\n- All tool schemas valid\n- All tools have required fields\n\n### ✅ Tool Invocation (6/6 tests passed)\n- list_redis_commands invocation\n- list_clients invocation\n- get_client_info invocation with valid client\n- Error handling for invalid client\n- Response format validation\n- Tool invocation with optional parameters\n\n### ✅ Data Loaded\n- 410 core Redis commands\n- 30 RedisSearch commands\n- 26 JSON commands\n- 49 Bloom commands\n- 17 TimeSeries commands\n- 14 client libraries across 7 languages\n\n## Issues Fixed\n\n1. **ES Module Configuration** - Added `\"type\": \"module\"` to package.json\n2. **Import Paths** - Added `.js` extensions to all local imports\n3. **Startup Messages** - Removed console output interfering with MCP protocol\n4. **Configuration Path** - Corrected path to include `node/dist/index.js`\n\n## What You Can Do Now\n\nWith the MCP server integrated, you can use Augment to:\n\n1. **Extract signatures from all 14 client libraries** across 7 languages\n2. **Build comprehensive command-to-API mappings** automatically\n3. **Validate signatures** across different languages\n4. **Generate mapping files** for your documentation\n5. **Analyze client implementations** of Redis commands\n\n## Next Steps\n\nYou can now use Augment to:\n- Generate complete mapping files for all Redis commands\n- Extract signatures from specific client libraries\n- Validate method signatures\n- Create comprehensive documentation\n\nThe MCP server is production-ready! 🚀\n"
1 change: 1 addition & 0 deletions build/command_api_mapping/AUGMENT_QUICK_START.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Augment MCP Server - Quick Start Guide\n\n## ✅ Status: READY TO USE\n\nYour MCP server is fully integrated with Augment and all 6 tools are available.\n\n## Configuration\n\nYour Augment Settings should have this configuration:\n\n```json\n{\n \"mcpServers\": {\n \"redis-parser-mcp\": {\n \"command\": \"node\",\n \"args\": [\"/Users/andrew.stark/Documents/Repos/docs/build/command_api_mapping/mcp-server/node/dist/index.js\"]\n }\n }\n}\n```\n\n## Available Tools\n\n### 1. list_redis_commands\nList all Redis commands from command definition files.\n\n**Parameters:**\n- `include_modules` (boolean, optional) - Include module commands (default: true)\n- `include_deprecated` (boolean, optional) - Include deprecated commands (default: true)\n- `module_filter` (array, optional) - Filter to specific modules\n\n### 2. list_clients\nList all supported Redis clients across 7 languages.\n\n**Parameters:**\n- `language_filter` (array, optional) - Filter by programming language\n\n### 3. get_client_info\nGet detailed information about a specific client.\n\n**Parameters:**\n- `client_id` (string, required) - Client ID\n\n### 4. extract_signatures\nExtract method signatures from client source files.\n\n**Parameters:**\n- `file_path` (string, required) - Path to source file\n- `language` (string, required) - Programming language (python, java, go, typescript, rust, csharp, php)\n- `method_name_filter` (array, optional) - Filter to specific method names\n\n### 5. extract_doc_comments\nExtract documentation from code.\n\n**Parameters:**\n- `file_path` (string, required) - Path to source file\n- `language` (string, required) - Programming language\n- `method_names` (array, optional) - Specific methods to extract docs for\n\n### 6. validate_signature\nValidate method signatures across languages.\n\n**Parameters:**\n- `signature` (string, required) - Method signature to validate\n- `language` (string, required) - Programming language\n\n## What's Loaded\n\n- **410** core Redis commands\n- **30** RedisSearch commands\n- **26** JSON commands\n- **49** Bloom commands\n- **17** TimeSeries commands\n- **14** client libraries across **7** languages:\n - Python (redis-py, redis-vl)\n - Node.js (node-redis, ioredis)\n - Java (Jedis, Lettuce)\n - Go (go-redis)\n - Rust (redis-rs)\n - C# (NRedisStack)\n - PHP (redis-php)\n\n## Example Usage\n\nYou can now ask Augment to:\n\n1. \"Extract all method signatures from the Python redis-py client\"\n2. \"List all Redis commands in the JSON module\"\n3. \"Get information about the Node.js ioredis client\"\n4. \"Validate this Java method signature: public String get(String key)\"\n5. \"Extract documentation from the Go redis client\"\n\n## Files\n\n- **Server code:** `build/command_api_mapping/mcp-server/node/src/index.ts`\n- **Configuration:** `build/command_api_mapping/mcp-server/AUGMENT_CONFIG_FINAL.json`\n- **Tests:** `build/command_api_mapping/mcp-server/node/src/test-augment-*.ts`\n\n## Troubleshooting\n\nIf tools don't appear:\n1. Check that the path includes `node/dist/index.js`\n2. Verify the path is absolute (starts with `/`)\n3. Close VSCode completely and reopen it\n4. Remove and re-add the server in Augment Settings\n\n## Next Steps\n\nYou can now use Augment to:\n- Generate complete command-to-API mappings\n- Extract signatures from all client libraries\n- Build comprehensive documentation\n- Validate implementations across languages\n\nEnjoy! 🚀\n"
Loading