Skip to main content
Glama
README.md
# Bob Demo MCP Server

A comprehensive MCP (Model Context Protocol) server that demonstrates Bob's capabilities through 9 specialized tools for file operations, code analysis, and git operations.

## Features

### šŸ“ File Operations (3 tools)
- **list_directory** - Browse project files and folders with optional recursive listing
- **read_file_content** - Read files with line numbers and optional line range selection
- **search_in_files** - Search across multiple files using regex patterns with context

### šŸ” Code Analysis (3 tools)
- **analyze_project_structure** - Get comprehensive project insights including file types, technologies, and structure
- **find_code_definitions** - Find functions, classes, methods, and interfaces in code
- **analyze_code_complexity** - Measure code metrics including lines, functions, and complexity

### šŸ”€ Git Operations (3 tools)
- **get_git_diff** - View changes and diffs with statistics
- **get_repository_info** - Get repository status, branch info, and commit details
- **analyze_commit_history** - Analyze commit patterns and contributor statistics

## Installation

```bash
# Install dependencies
npm install

# Build the server
npm run build
```

## Usage

This server is designed to be used with Bob AI Assistant through the MCP protocol. Once configured in Bob's MCP settings, the tools will be automatically available.

### Configuration

Add to Bob's MCP settings (`~/.bob/settings/mcp_settings.json`):

```json
{
  "mcpServers": {
    "bob-demo": {
      "command": "node",
      "args": ["/Users/ahmedchaudhry/Documents/IBM Bob/MCP/bob-demo-server/build/index.js"],
      "disabled": false,
      "alwaysAllow": [],
      "disabledTools": []
    }
  }
}
```

## Example Usage

Once configured, you can ask Bob naturally:

- "List all files in the current directory"
- "Analyze this project's structure"
- "Find all TODO comments in the code"
- "Show me what I've changed in git"
- "What functions are defined in this file?"
- "How complex is this code?"

Bob will automatically use the appropriate tools to answer your questions.

## Development

```bash
# Watch mode for development
npm run watch

# Build
npm run build
```

## Architecture

```
bob-demo-server/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # Main server entry point
│   ā”œā”€ā”€ tools/
│   │   ā”œā”€ā”€ file-operations.ts    # File operation tools
│   │   ā”œā”€ā”€ code-analysis.ts      # Code analysis tools
│   │   └── git-operations.ts     # Git operation tools
│   └── utils/
│       ā”œā”€ā”€ file-utils.ts         # File system utilities
│       ā”œā”€ā”€ git-utils.ts          # Git command utilities
│       └── parser-utils.ts       # Code parsing utilities
ā”œā”€ā”€ build/                    # Compiled JavaScript output
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md
```

## Requirements

- Node.js 18 or higher
- Git (for git operation tools)
- TypeScript 5.3 or higher

## License

MIT

## Author

Bob AI Assistant

TDQS

C2.1/5.0

Scored across 9 tools

Disambiguation4/5

Tools have distinct names covering different aspects (analysis, navigation, file operations), but lack descriptions could cause some ambiguity between similar-sounding tools like analyze_code_complexity and analyze_project_structure.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case (e.g., analyze_code_complexity, get_repository_info, list_directory). No mixed conventions.

Tool Count5/5

9 tools is well-scoped for a code analysis server, covering analysis, navigation, file reading, and searching without being overwhelming.

Completeness4/5

The set covers common code analysis tasks (complexity, history, structure, definitions, diff, file operations). Minor gaps like missing metadata or branch comparison, but overall sufficient for the inferred domain.

Maintenance

ActivityInactive
ResponsivenessNo issues