git-mob-mcp-server 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,12 +1,17 @@
1
1
  # Git Mob MCP Server
2
2
 
3
- ![NPM Version](https://img.shields.io/npm/v/git-mob-mcp-server)
4
- ![CI Release](https://github.com/Mubashwer/git-mob-mcp-server/actions/workflows/ci-release.yml/badge.svg)
3
+ [![NPM Version](https://img.shields.io/npm/v/git-mob-mcp-server)](https://www.npmjs.com/package/git-mob-mcp-server)
4
+ [![CI Release](https://github.com/Mubashwer/git-mob-mcp-server/actions/workflows/ci-release.yml/badge.svg)](https://github.com/Mubashwer/git-mob-mcp-server/actions/workflows/ci-release.yml)
5
5
  [![codecov](https://codecov.io/gh/Mubashwer/git-mob-mcp-server/graph/badge.svg?token=21GJOEYQGG)](https://codecov.io/gh/Mubashwer/git-mob-mcp-server)
6
- ![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Mubashwer/git-mob-mcp-server/blob/main/LICENSE)
7
7
 
8
8
  Node.js server implementing Model Context Protocol (MCP) for [`git mob` CLI app](https://github.com/Mubashwer/git-mob)
9
9
 
10
+ *You can attribute a git commit to more than one author by adding one or more Co-authored-by trailers to the commit's message. Co-authored commits are visible on GitHub.
11
+ For more information, see [here](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors).*
12
+
13
+ This MCP Server will help you add them automatically and also help you store and manage co-authors for pair/mob programming sessions.
14
+
10
15
  Built using [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk)
11
16
 
12
17
  ## Features
@@ -16,25 +21,33 @@ Built using [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/
16
21
  - Choose team members for pairing / mobbing session
17
22
  - Automatic appending of Co-authored-by in for co-authors in commit messages during pairing / mobbing session
18
23
 
24
+ ## Prerequisites
25
+
26
+ ### System Requirements
27
+
28
+ - **Node.js**: Version 18 or higher
29
+ - **git**: Git v2.32 or later must be installed and configured
30
+ - **git-mob CLI**: [git-mob CLI app](https://github.com/Mubashwer/git-mob?tab=readme-ov-file#installation) must be installed
31
+
19
32
  ## API
20
33
 
21
34
  ### Resources
22
35
 
23
- - `git_mob_help`: General help and usage information for the Git Mob CLI.
24
- - `git_mob_version`: The installed version of the Git Mob CLI.
36
+ - `git_mob_cli_help`: General help and usage information for the Git Mob CLI.
37
+ - `git_mob_cli_version`: The installed version of the Git Mob CLI.
25
38
 
26
39
  ### Tools
27
40
 
28
- - `git_mob_help`: Displays general help and usage information for the Git Mob CLI.
41
+ - `git_mob_cli_help`: Displays general help and usage information for the Git Mob CLI.
29
42
  - `setup_git_mob_globally`: Sets up git-mob globally for the user.
30
- - `setup_git_mob_locally`: Sets up git-mob locally for the current repository.
43
+ - `setup_git_mob_locally`: Sets up git-mob locally for the current repository when it overrides `core.hooksPath` git configuration variable (e.g when using husky).
31
44
  - `add_team_member`: Adds a new team member using their key, name, and email.
32
45
  - `delete_team_member`: Deletes a team member by their key.
33
46
  - `list_team_members`: Lists all team members that have been added to Git Mob.
34
47
  - `set_mob_session_coauthors`: Sets the active pairing or mob session by specifying the keys of the team members to include as coauthors.
35
48
  - `clear_mob_session`: Clears the active mob or pairing session.
36
49
  - `list_mob_session_coauthors`: Lists all coauthors currently included in the active mob or pairing session.
37
- - `list_mob_session_coauthors` (trailers): Lists the git Co-authored-by trailers for the coauthors currently included in the active mob or pairing session.
50
+ - `list_mob_session_coauthor_trailers`: Lists the git Co-authored-by trailers for the coauthors currently included in the active mob or pairing session.
38
51
 
39
52
  ## Usage with Claude Desktop
40
53
 
@@ -76,6 +89,40 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
76
89
  }
77
90
  ```
78
91
 
92
+ ## Setup
93
+
94
+ Run the `setup_git_mob_globally` MCP tool once to configure git-mob globally for all repositories
95
+
96
+ ## Local Development
97
+
98
+ For local development and testing of the MCP server:
99
+
100
+ 1. **Clone the repository**:
101
+
102
+ ```bash
103
+ git clone https://github.com/Mubashwer/git-mob-mcp-server.git
104
+ cd git-mob-mcp-server
105
+ ```
106
+
107
+ 2. **Install dependencies**:
108
+
109
+ ```bash
110
+ npm install
111
+ ```
112
+
113
+ 3. **Start development server**:
114
+
115
+ ```bash
116
+ npm start
117
+ ```
118
+
119
+ This command will:
120
+
121
+ - Build the TypeScript source code in watch mode (automatically rebuilds on file changes)
122
+ - Start the MCP Inspector for testing and debugging the server locally
123
+
124
+ The MCP Inspector will be available at the URL shown in the terminal output, allowing you to test the server's tools and resources interactively.
125
+
79
126
  ## License
80
127
 
81
128
  This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
@@ -13,9 +13,9 @@ export const createGitMobServer = () => {
13
13
  resources: {},
14
14
  },
15
15
  });
16
- registerGitMobResourceTemplate(server, resourceTemplates.gitMobHelp);
17
- registerGitMobResource(server, resources.gitMobVersion);
18
- registerGitMobTool(server, tools.getGitMobHelp);
16
+ registerGitMobResourceTemplate(server, resourceTemplates.gitMobCliHelp);
17
+ registerGitMobResource(server, resources.gitMobCliVersion);
18
+ registerGitMobTool(server, tools.getGitMobCliHelp);
19
19
  registerGitMobTool(server, tools.setupGitMobGlobally);
20
20
  registerGitMobTool(server, tools.setupGitMobLocally);
21
21
  registerGitMobTool(server, tools.addTeamMember);
@@ -1,7 +1,7 @@
1
1
  import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { getHelp } from "../clients/gitMobClient.js";
3
3
  import { UriTemplate } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
4
- const name = "git_mob_help";
4
+ const name = "git_mob_cli_help";
5
5
  const template = new ResourceTemplate(new UriTemplate("gitmob://help{?command}"), {
6
6
  list: undefined,
7
7
  complete: {
@@ -1 +1 @@
1
- export { default as gitMobHelp } from "./gitMobHelp.js";
1
+ export { default as gitMobCliHelp } from "./gitMobCliHelp.js";
@@ -1,6 +1,6 @@
1
1
  import {} from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { getVersion } from "../clients/gitMobClient.js";
3
- const name = "git_mob_version";
3
+ const name = "git_mob_cli_version";
4
4
  const uri = "gitmob://version";
5
5
  const metadata = {
6
6
  description: "The installed version of the Git Mob CLI.",
@@ -1 +1 @@
1
- export { default as gitMobVersion } from "./gitMobVersion.js";
1
+ export { default as gitMobCliVersion } from "./gitMobCliVersion.js";
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { getHelp } from "../clients/gitMobClient.js";
3
- const name = "get_git_mob_help";
3
+ const name = "git_mob_cli_help";
4
4
  const description = "Displays general help and usage information for the Git Mob CLI. " +
5
5
  "You can optionally provide a command ('setup', 'coauthor', or 'help') " +
6
6
  "to get detailed help for that specific command.";
@@ -1,4 +1,4 @@
1
- export { default as getGitMobHelp } from "./getGitMobHelp.js";
1
+ export { default as getGitMobCliHelp } from "./getGitMobCliHelp.js";
2
2
  export { default as setupGitMobGlobally } from "./setupGitMobGlobally.js";
3
3
  export { default as setupGitMobLocally } from "./setupGitMobLocally.js";
4
4
  export { default as addTeamMember } from "./addTeamMember.js";
@@ -14,7 +14,14 @@ const annotations = {
14
14
  };
15
15
  const callback = async () => {
16
16
  const { ok, value } = await listMobSessionCoauthorTrailers();
17
- return { isError: !ok, content: [{ type: "text", text: value || "" }] };
17
+ if (!ok) {
18
+ return { isError: true, content: [{ type: "text", text: value }] };
19
+ }
20
+ const lines = value.split("\n").filter((line) => line.trim() !== "");
21
+ return {
22
+ isError: false,
23
+ content: lines.map((line) => ({ type: "text", text: line })),
24
+ };
18
25
  };
19
26
  const tool = {
20
27
  name,
@@ -13,7 +13,14 @@ const annotations = {
13
13
  };
14
14
  const callback = async () => {
15
15
  const { ok, value } = await listMobSessionCoauthors();
16
- return { isError: !ok, content: [{ type: "text", text: value || "" }] };
16
+ if (!ok) {
17
+ return { isError: true, content: [{ type: "text", text: value }] };
18
+ }
19
+ const lines = value.split("\n").filter((line) => line.trim() !== "");
20
+ return {
21
+ isError: false,
22
+ content: lines.map((line) => ({ type: "text", text: line })),
23
+ };
17
24
  };
18
25
  const tool = {
19
26
  name,
@@ -14,7 +14,14 @@ const annotations = {
14
14
  };
15
15
  const callback = async () => {
16
16
  const { ok, value } = await listCoauthors();
17
- return { isError: !ok, content: [{ type: "text", text: value || "" }] };
17
+ if (!ok) {
18
+ return { isError: true, content: [{ type: "text", text: value }] };
19
+ }
20
+ const lines = value.split("\n").filter((line) => line.trim() !== "");
21
+ return {
22
+ isError: false,
23
+ content: lines.map((line) => ({ type: "text", text: line })),
24
+ };
18
25
  };
19
26
  const tool = {
20
27
  name,
@@ -0,0 +1,3 @@
1
+ export * from "./GitMobResource.js";
2
+ export * from "./GitMobResourceTemplate.js";
3
+ export * from "./GitMobTool.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-mob-mcp-server",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "MCP Server for git-mob CLI app",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",