Skip to content

Commit 6b4ecfb

Browse files
nishadeborahphilipsdebbiephilips-00aarora79
authored
Integrating with ink cli (#185)
* change v0 -> v0.1 * v0 -> v0.1 doc and test changes * using a constant variable * api version to the improt script * removed version from readme.md * replace v0 to ANTHROPIC_API_VERSION in md * fixed the syntax error * changed name back to v0 * reverting release notes change * changed v0.1 to {ANTHROPIC_API_VERSION} * move v0.1 -> v0 * v0.1 -> v0 * more updates for uniformity * docker changes * updated readme.md * updated docs/anthropic-registry-import.md * updated anthropic_registry_spi.md * updated design docs * changed {REGISTRY_CONSTANTS.ANTHROPIC_API_VERSION} to v0.1 in design docs * removed date and issue number * renamed v0_routes -> registry_routes * renamed test_v0_routes to test_registry_routes * refactored * changed import name from v0_router to registry_router * updates to md file * changed {{API_VERSION}} to {{{ANTHROPIC_API_VERSION}} * cisco security scanner * added llm to default analyzer * setting MCP_SCANNER_LLM_API_KEY to env variable * reverting llm change * both yara and llm * added #Security scans to gitignore * checking for placeholder value * testing pr * added the banner * changed the banner * removed the backup * using mcp_client.py instead of client.ts * added exit and quit * Enhanced UI - Claude Code Style Command Suggestions * added readme filed to the context * adding auto-complete to tools * added enter to auto-complete * Enhanced CLI user experience with improved styling and output - Added gradient-styled ASCII art banner (MCP CLI) with spacing - Implemented markdown table rendering for clean terminal display - Added cyan highlighting for file paths and reserved words in backticks - Suppressed tool output display (only show on errors for debugging) - Updated agent prompt to avoid showing raw tool output to users - Removed emoji from tool label (Tool instead of 🔧 Tool) - Fixed markdown rendering to preserve inline code highlighting * Add html2pdf.js dependency for flyer generation * Add RAG documentation reader capability to CLI agent Implemented simple keyword-based documentation search without embeddings: - Created docsReader.ts utility with search, read, and list functions - Added read_docs tool to agent with three modes: - Search by keywords (returns top 3 results) - Read specific file by path - List all available documentation files - Uses keyword frequency scoring with filename boost (10x) - Returns truncated content (1500 chars) to preserve context window - Recursively indexes all markdown files in docs folder - Handles nested directories (archived/, design/, etc.) Agent can now answer questions about project features, setup, configuration, and troubleshooting by reading from /docs folder. * Increase agent tool iteration limit from 5 to 25 Allows agent to perform more complex multi-step operations without hitting the tool usage limit prematurely. * Improve agent output quality and formatting Changes: - Increased max_tokens from 8192 to 16384 to prevent truncation - Rewrote system prompt using Claude Sonnet 4 best practices with XML tags - Added structured sections: <capabilities>, <behavior>, <thinking>, <output_format> - Emphasized comprehensive, well-formatted markdown output - Required pretty-printed JSON with proper indentation - Added explicit formatting rules for headings, lists, code blocks, blockquotes - Stressed importance of complete, non-truncated responses - Improved tool usage guidelines and security instructions - Organized prompt for better LLM comprehension and adherence Agent now produces cleaner, more complete, better-formatted responses. * Update banner to display 'MCP Registry CLI' with gradient colors Changed from 'MCP CLI' to full 'MCP Registry CLI' text on same lines. Color scheme: - MCP: cyan → blue → magenta - Registry: green (new section) - CLI: deep pink (#FF1493) Note: Original 'MCP CLI' banner code backed up locally in .scratchpad/ * Fix banner to display complete 'MCP Registry CLI' with proper spacing Added spacing between Registry and CLI sections: - Registry (green): fully visible - Spacing with empty spaces - C (hot pink #FF69B4): Command - Spacing with empty spaces - L I (deep pink #FF1493): Language Interface Banner now displays complete 'MCP Registry CLI' text with gradient colors: - MCP: cyan → blue → magenta - Registry: green - C: hot pink - LI: deep pink * Fix Registry Y character and straighten CLI alignment Changes: - Added missing 'Y' to end of Registry (green section) - Adjusted spacing to align CLI properly (reduced from 3 spaces to 2) - Straightened out the twist at top from Registry to CLI transition - All text now vertically aligned on same 6 lines Banner now displays perfectly: MCP Registry CLI with beautiful gradient colors * Fix banner alignment and missing Y character - Fixed missing Y in Registry word by adding proper character at end - Fixed slanting L and I characters by ensuring consistent character widths - Removed spacing gaps between color sections for seamless display - Verified TypeScript compilation with npm run typecheck * Increase spacing between Registry and CLI sections - Changed spacing from 2 spaces to 3 spaces between Registry and CLI - Fixes visual alignment and prevents L/I characters from tilting left - Registry word now displays correctly without overlapping with CLI - Verified TypeScript compilation * Add Y character to end of REGISTRY word in banner - Extended green section to include proper Y representation - Added ██╗ character at end of each REGISTRY row to complete the word - All 6 rows now display REGISTRY with complete Y character - Verified TypeScript compilation * Fix Y character rendering in REGISTRY word - Changed final character of each REGISTRY row to properly display Y - Row 1: ██╦ (top opening) - Row 2: ██╢ (right opening) - Row 3: ██╣ (left opening) - Row 4: ██╢ (right opening) - Row 5: ██╣ (left opening) - Row 6: ╚═╣ (bottom opening) - Y character now clearly visible in banner * Simplify banner Y character - keep only in first row - Removed complex Y characters from rows 2-6 - Row 1 shows Y distinctly with ██╦ - Rows 2-6 use standard ██║ for consistent Registry display - Added proper spacing between Registry and CLI - Y character now clearly visible in banner - Tested with npm start - banner renders correctly * Widen Y column in REGISTRY to make it distinct from I - Extended Y column to be 3 characters wide instead of 2 - Row 1: ██╗██╗██╗ (top of Y - wider) - Row 2: ██║██╣ ██║ (middle of Y) - Row 3: ██║██║ ██║ (middle of Y) - Row 4: ██║██║ ██║ (middle of Y - converging) - Row 5: ██║██║ ██║ (bottom converging) - Row 6: ╚═╝╚═╝╚═╝ (bottom of Y - point) - Y now clearly distinct from I character - Tested with npm start * Make Y character standalone section in bright green - Separated Y from Registry section into its own text color block - Y now rendered in bright green (#00FF00) for clear distinction - Row 1: ██╦╗ (top of Y - bright green) - Row 2-4: ██║║ (middle of Y - bright green) - Row 5: ██╗║ (converging Y - bright green) - Row 6: ╚═╝╝ (bottom point of Y - bright green) - Y is now unmistakably distinct and clearly visible - Tested with npm start * remove html2pdf.js * removed emojis * added bedrock support * Display AI model provider information on a single line * removed cisco security scanner - cause not in main * automatic token generation and refresh * changed default model to haiku * refactored to only include essential commands * added token support * Install @aws-sdk/client-bedrock-runtime dependency - Added missing AWS SDK for Bedrock support - Resolves build errors in bedrockClient.ts and modelClient.ts - Build now compiles successfully - Enables Bedrock model provider functionality * Update sample configuration to match cloudflare-docs-server-config.json - Changed sample config from generic "My Server" to actual Cloudflare example - Updated "proxypassurl" to "proxy_pass_url" (correct field name) - Added "description" field from example - Added "supported_transports" field from example - Sample now reflects real-world configuration structure - Helps users understand proper server configuration format * remove mention of isengard and use only profile * adding token refresh * adding token refresh * fixing merge conflict * fixing conflicts and pushing the change for token refresh * removing emojis * added source /md file * Fix ‘are you Claude’ response * added cost * changed AWS Bedrock -> Amazon Bedrock * fixed scrolling to the top * changed questions * undoing the last commit * fixing the viewport reload * banner update * updated prompt to not use emojis * updated proxypassurl to proxy_pass_url * show welcome message only once * setting to true even if aws profile and anthropic key are unavailable so it can assume execution credentials * only ANTHROPIC_API_KEY not LLM_API_KEY * remove LLM_API_KEY * fixed extra whitespace * removed the icon gen * Add CLI command: registry - allows running MCP Gateway CLI from anywhere with 'registry' command * split tokens into input and output token * footer token update * updates to readme * update nomenclature in readme.md * updating picture * removed img * adding img back * updating img path * removing extra.png * to use registry from cli * added pipe to before token * updating the readme.md --------- Co-authored-by: Nisha Deborah Philips <[email protected]> Co-authored-by: Amit Arora <[email protected]>
1 parent 20ad62f commit 6b4ecfb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+32237
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The **MCP Gateway & Registry** is an enterprise-ready platform that centralizes
8282

8383
## What's New
8484

85+
- **💬 Interactive MCP-Registry CLI** - Terminal-based chat interface with AI-powered MCP tool discovery. Supports Amazon Bedrock and Anthropic API. [MCP-Registry CLI](docs/mcp-registry-cli.md)
8586
- **🔒 MCP Server Security Scanning** - Integrated vulnerability scanning with [Cisco AI Defence MCP Scanner](https://github.com/cisco-ai-defense/mcp-scanner). Automatic security scans during server registration, periodic registry-wide scans with detailed markdown reports, and automatic disabling of servers with security issues.
8687
- **📥 Import Servers from Anthropic MCP Registry** - Import curated MCP servers from Anthropic's registry with a single command. [Import Guide](docs/anthropic-registry-import.md)
8788
- **🔌 Anthropic MCP Registry REST API Compatibility** - Full compatibility with Anthropic's MCP Registry REST API specification. [API Documentation](docs/anthropic_registry_api.md)

cli/bin/registry.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env node
2+
3+
import { spawn } from 'child_process';
4+
import { fileURLToPath } from 'url';
5+
import { dirname, join } from 'path';
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = dirname(__filename);
9+
const projectRoot = dirname(__dirname);
10+
11+
const child = spawn('npx', ['tsx', join(projectRoot, 'src/index.tsx'), ...process.argv.slice(2)], {
12+
stdio: 'inherit',
13+
shell: true
14+
});
15+
16+
child.on('exit', (code) => {
17+
process.exit(code);
18+
});

0 commit comments

Comments
 (0)