MCP CLI Application

by richard-senior

329 downloads Not rated yet

About

A cross-platform MCP server implementation for Amazon Q and Claude, providing multiple tools in a single executable.

Explore

- Calculator tool for basic arithmetic operations
- Prompt registry to manage and retrieve stored prompts
- Rule creator to define development standard rules
- Rules processor to check files against rules
- Google Search tool to fetch top search results
- Wikipedia image search and save tools

To build the application:

./build.sh

To build and run the application:

./run.sh [options]

To configure Amazon Q to use this MCP application, add the following to your ~/.aws/amazonq/mcp.json file:

{
  "mcpServers": {
    "mcp": {
      "command": "/path/to/mcp",
      "description": "MCP server providing various utility tools",
      "tools": {
        "calculator": {
          "description": "A calculator tool that can perform basic arithmetic operations"
        },
        "prompt_registry": {
          "description": "A tool to manage and retrieve prompts from the prompt registry"
        },
        "rule_creator": {
          "description": "A tool to create and manage development standard rules"
        },
        "rules_processor": {
          "description": "A tool to process files against development standard rules"
        },
        "google_search": {
          "description": "A tool to perform Google searches and return the top results"
        },
        "wikipedia_image": {
          "description": "A tool to search for images on Wikipedia"
        },
        "wikipedia_image_save": {
          "description": "A tool to save Wikipedia images to disk"
        }
      }
    }
  }
}

The MCP application provides several tools that extend Amazon Q's capabilities:

./bin/mcp "list_rules amazonq"


Amazon Q Usage:

Create a new rule for Amazon Q that enforces proper error handling in Go files
List all the rules for the Cursor tool
```

This is a CLI application for the Model Context Protocol (MCP) that can be invoked by Amazon Q.

Overview

MCP is an open protocol that standardizes how applications provide context to LLMs. This CLI application implements the MCP protocol to extend Amazon Q's capabilities by providing additional tools and context.

Project Structure

- /cmd/mcp: Main application entry point
- /internal: Private application and library code
- /internal/logger: Logging utilities
- /internal/processor: MCP request processing logic
- /pkg: Library code that's ok to use by external applications
- /api: OpenAPI/Swagger specs, JSON schema files, protocol definition files
- /configs: Configuration file templates or default configs
- /test: Additional external test apps and test data

Building and Running

To build the application:

./build.sh

To build and run the application:

./run.sh [options]

Command Line Options

- --debug: Enable debug logging
- --input <file>: Input file path (if not provided, stdin will be used)
- --output <file>: Output file path (if not provided, stdout will be used)

Tools and Features

The MCP application provides several tools that extend Amazon Q's capabilities:

1. Calculator

A calculator tool that can perform basic arithmetic operations.

Example Usage:

./bin/mcp "calculate 2 + 2"

Amazon Q Usage:

Calculate the square root of 144

2. Prompt Registry

A tool to manage and retrieve prompts from a local prompt registry. Prompts are stored in ~/.mcp/prompts directory.

Example Usage:
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.