Skip to content

Commit 4016496

Browse files
committed
Fix code formatting with Prettier
1 parent 7e8bbc7 commit 4016496

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

CLAUDE.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,52 @@ This is an Azure DevOps MCP (Model Context Protocol) Server that provides access
99
## Development Commands
1010

1111
### Building and Development
12+
1213
- `npm run build` - Compile TypeScript to JavaScript in `dist/` directory
1314
- `npm run watch` - Watch mode for continuous compilation during development
1415
- `npm run prepare` - Runs build automatically (used by npm lifecycle)
1516
- `npm run clean` - Remove the `dist/` directory
1617
- `npm run validate-tools` - Validate tool names and TypeScript compilation
1718

1819
### Code Quality
20+
1921
- `npm run eslint` - Run ESLint linter
2022
- `npm run eslint-fix` - Run ESLint with automatic fixes
2123
- `npm run format` - Format code with Prettier
2224
- `npm run format-check` - Check code formatting without making changes
2325

2426
### Testing
27+
2528
- `npm test` - Run Jest test suite
2629
- Coverage thresholds are set to 40% for branches, functions, lines, and statements
2730
- Test files are located in `test/` directory and follow the pattern `**/?(*.)+(spec|test).[jt]s?(x)`
2831

2932
### Running the Server
33+
3034
- `npm start` - Start the MCP server (requires Azure DevOps organization name as argument)
3135
- `npm run inspect` - Run the server with MCP inspector for debugging
3236

3337
### Local Development Setup
38+
3439
For source installation (development mode):
40+
3541
1. Clone repository and run `npm install`
3642
2. Configure `.vscode/mcp.json` with local command: `"mcp-server-azuredevops"`
3743
3. The server requires an Azure DevOps organization name as the first argument
3844

3945
## Architecture
4046

4147
### Core Components
48+
4249
- **Entry Point**: `src/index.ts` - Main server initialization, Azure authentication, and MCP server setup
4350
- **Tool Configuration**: `src/tools.ts` - Aggregates all tool modules and configures them with the MCP server
4451
- **Authentication**: Uses `@azure/identity` with `DefaultAzureCredential` for Azure DevOps API access
4552
- **Client Setup**: Creates Azure DevOps WebApi clients with proper user agent and authentication
4653

4754
### Tool Organization
55+
4856
Tools are organized by Azure DevOps service area in `src/tools/`:
57+
4958
- `core.ts` - Projects and teams management
5059
- `work.ts` - Iterations and team work management
5160
- `workitems.ts` - Work item CRUD operations and queries
@@ -59,16 +68,19 @@ Tools are organized by Azure DevOps service area in `src/tools/`:
5968
- `auth.ts` - Authentication utilities
6069

6170
### Key Patterns
71+
6272
- Each tool module follows the pattern: `configure[ServiceName]Tools(server, tokenProvider, connectionProvider, ...)`
6373
- All tools use Zod schemas for input validation and JSON schema generation
6474
- Authentication is handled centrally through token and connection providers
6575
- User agent composition includes package version and MCP client information
6676

6777
### Environment Variables
78+
6879
- `ADO_MCP_AZURE_TOKEN_CREDENTIALS` - Optional override for Azure token credentials
6980
- Falls back to `AZURE_TOKEN_CREDENTIALS = "dev"` for development
7081

7182
### Project Structure
83+
7284
- `src/` - TypeScript source code
7385
- `dist/` - Compiled JavaScript output (created by build)
7486
- `test/` - Jest test files with mocks in `test/mocks/`
@@ -77,19 +89,22 @@ Tools are organized by Azure DevOps service area in `src/tools/`:
7789
## Important Notes
7890

7991
### Adding New Tools
92+
8093
- Follow existing patterns in tool modules under `src/tools/`
8194
- Use Azure DevOps TypeScript clients when available, fall back to direct API calls only when necessary
8295
- Add tool configuration to `configureAllTools()` in `src/tools.ts`
8396
- Include comprehensive input validation with Zod schemas
8497
- Follow the established naming convention: `[service]_[action]_[object]`
8598

8699
### Testing
100+
87101
- Mock Azure DevOps API responses in `test/mocks/`
88102
- Test files mirror the source structure in `test/src/`
89103
- Use Jest with ts-jest preset for TypeScript support
90104

91105
### Code Quality Standards
106+
92107
- TypeScript with strict mode enabled
93108
- ESLint configuration with Prettier integration
94109
- All files must include Microsoft copyright headers
95-
- Follow existing code patterns for consistency
110+
- Follow existing code patterns for consistency

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,15 @@ claude mcp add mcp-ado 'npx -y @azure-devops/mcp ado_org_name' --scope user
221221
```
222222

223223
For example:
224+
224225
```bash
225226
claude mcp add mcp-ado 'npx -y @azure-devops/mcp msazure' --scope user
226227
```
227228

228229
Replace `msazure` with your Azure DevOps organization name. You can also use `--scope project` to limit the server to a specific project.
229230

230231
For development with a local installation:
232+
231233
```bash
232234
claude mcp add mcp-ado 'npx -y ~/git/azure-devops-mcp msazure' --scope user
233235
```

src/tools/workitems.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ function configureWorkItemTools(server: McpServer, tokenProvider: () => Promise<
644644
async ({ wiql, top }) => {
645645
const connection = await connectionProvider();
646646
const workItemApi = await connection.getWorkItemTrackingApi();
647-
647+
648648
const wiqlObject: Wiql = { query: wiql };
649649
const queryResult = await workItemApi.queryByWiql(wiqlObject, undefined, undefined, top);
650650

0 commit comments

Comments
 (0)