git-mob-mcp-server 1.0.7 → 1.0.9

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
@@ -14,35 +14,31 @@ Built using [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/
14
14
  - Setup git mob CLI globally or locally
15
15
  - Add / delete / list team members
16
16
  - Choose team members for pairing / mobbing session
17
- - Automatic appending of Co-authored-by in for co-authors in commit messages during pairing / mobbing session
17
+ - Automatic appending of Co-authored-by in for co-authors in commit messages during pairing / mobbing session
18
18
 
19
19
  ## API
20
20
 
21
21
  ### Resources
22
- - `git_mob_help`: Displays general help and usage information for the Git Mob CLI.
22
+
23
+ - `git_mob_help`: General help and usage information for the Git Mob CLI.
23
24
  - `git_mob_version`: The installed version of the Git Mob CLI.
24
- - `team_members`: List of all the team members that have been added to Git Mob.
25
- - `mob_session_coauthors`: List of all coauthors currently included in the active mob or pairing session.
26
- - `mob_session_coauthors` (trailers): List of the git Co-authored-by trailers for the coauthors currently included in the active mob or pairing session.
27
25
 
28
26
  ### Tools
27
+
28
+ - `git_mob_help`: Displays general help and usage information for the Git Mob CLI.
29
+ - `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.
29
31
  - `add_team_member`: Adds a new team member using their key, name, and email.
30
- - `clear_mob_session`: Clears the active mob or pairing session.
31
32
  - `delete_team_member`: Deletes a team member by their key.
33
+ - `list_team_members`: Lists all team members that have been added to Git Mob.
32
34
  - `set_mob_session_coauthors`: Sets the active pairing or mob session by specifying the keys of the team members to include as coauthors.
33
- - `setup_git_mob_globally`: Sets up git-mob globally for the user.
34
- - `setup_git_mob_locally`: Sets up git-mob locally for the current repository.
35
-
36
- Because resources may not be fully supported in GitHub Copilot Agent mode yet, all resources also available as tools:
37
- - `git_mob_help`: Displays general help and usage information for the Git Mob CLI.
38
- - `get_git_mob_version`: The installed version of the Git Mob CLI.
39
- - `get_team_members`: List of all the team members that have been added to Git Mob.
40
- - `get_mob_session_coauthors`: List of all coauthors currently included in the active mob or pairing session.
41
- - `get_mob_session_coauthors` (trailers): List of the git Co-authored-by trailers for the coauthors currently included in the active mob or pairing session.
35
+ - `clear_mob_session`: Clears the active mob or pairing session.
36
+ - `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.
42
38
 
43
39
  ## Usage with Claude Desktop
44
- Add this to your `claude_desktop_config.json`:
45
40
 
41
+ Add this to your `claude_desktop_config.json`:
46
42
 
47
43
  ### NPX
48
44
 
@@ -51,10 +47,7 @@ Add this to your `claude_desktop_config.json`:
51
47
  "mcpServers": {
52
48
  "git-mob": {
53
49
  "command": "npx",
54
- "args": [
55
- "-y",
56
- "git-mob-mcp-server"
57
- ]
50
+ "args": ["-y", "git-mob-mcp-server"]
58
51
  }
59
52
  }
60
53
  }
@@ -76,10 +69,7 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
76
69
  "servers": {
77
70
  "git-mob": {
78
71
  "command": "npx",
79
- "args": [
80
- "-y",
81
- "git-mob-mcp-server",
82
- ]
72
+ "args": ["-y", "git-mob-mcp-server"]
83
73
  }
84
74
  }
85
75
  }
@@ -88,4 +78,4 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
88
78
 
89
79
  ## License
90
80
 
91
- 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.
81
+ 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.
@@ -2,7 +2,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import * as tools from "./tools/index.js";
3
3
  import * as resources from "./resources/index.js";
4
4
  import * as resourceTemplates from "./resourceTemplates/index.js";
5
- import { registerGitMobTool, registerGitMobResource, registerGtMobResourceAsTool, registerGitMobResourceTemplate, } from "./helpers/index.js";
5
+ import { registerGitMobTool, registerGitMobResource, registerGitMobResourceTemplate, } from "./helpers/index.js";
6
6
  export const createGitMobServer = () => {
7
7
  const server = new McpServer({
8
8
  name: "Git Mob",
@@ -15,20 +15,15 @@ export const createGitMobServer = () => {
15
15
  });
16
16
  registerGitMobResourceTemplate(server, resourceTemplates.gitMobHelp);
17
17
  registerGitMobResource(server, resources.gitMobVersion);
18
- registerGitMobResource(server, resources.teamMembers);
19
- registerGitMobResource(server, resources.mobSessionCoauthors);
20
- registerGitMobResource(server, resources.mobSessionCoauthorTrailers);
21
- // Currently, Github Copilot does not support dynamic resources in MCP Server,
22
- // so we register them as tools as well
23
- registerGtMobResourceAsTool(server, resources.gitMobVersion);
24
- registerGtMobResourceAsTool(server, resources.teamMembers);
25
- registerGtMobResourceAsTool(server, resources.mobSessionCoauthors);
26
- registerGtMobResourceAsTool(server, resources.mobSessionCoauthorTrailers);
18
+ registerGitMobTool(server, tools.getGitMobHelp);
27
19
  registerGitMobTool(server, tools.setupGitMobGlobally);
28
20
  registerGitMobTool(server, tools.setupGitMobLocally);
29
21
  registerGitMobTool(server, tools.addTeamMember);
30
22
  registerGitMobTool(server, tools.deleteTeamMember);
23
+ registerGitMobTool(server, tools.listTeamMembers);
31
24
  registerGitMobTool(server, tools.setMobSessionCoauthors);
32
25
  registerGitMobTool(server, tools.clearMobSession);
26
+ registerGitMobTool(server, tools.listMobSessionCoauthors);
27
+ registerGitMobTool(server, tools.listMobSessionCoauthorTrailers);
33
28
  return server;
34
29
  };
@@ -1,5 +1,4 @@
1
1
  export * from "./registerGitMobTool.js";
2
2
  export * from "./registerGitMobResource.js";
3
3
  export * from "./registerGitMobResourceTemplate.js";
4
- export * from "./registerGitMobResourceAsTool.js";
5
4
  export * from "./runCliCommand.js";
@@ -9,7 +9,7 @@ const template = new ResourceTemplate(new UriTemplate("gitmob://help{?command}")
9
9
  },
10
10
  });
11
11
  const metadata = {
12
- description: "Displays general help and usage information for the Git Mob CLI. " +
12
+ description: "General help and usage information for the Git Mob CLI. " +
13
13
  "You can optionally provide a command ('setup', 'coauthor', or 'help') " +
14
14
  "to get detailed help for that specific command.",
15
15
  mimeType: "text/plain",
@@ -1,4 +1 @@
1
1
  export { default as gitMobVersion } from "./gitMobVersion.js";
2
- export { default as teamMembers } from "./teamMembers.js";
3
- export { default as mobSessionCoauthors } from "./mobSessionCoauthors.js";
4
- export { default as mobSessionCoauthorTrailers } from "./mobSessionCoauthorTrailers.js";
@@ -1,6 +1,10 @@
1
+ export { default as getGitMobHelp } from "./getGitMobHelp.js";
1
2
  export { default as setupGitMobGlobally } from "./setupGitMobGlobally.js";
2
3
  export { default as setupGitMobLocally } from "./setupGitMobLocally.js";
3
4
  export { default as addTeamMember } from "./addTeamMember.js";
4
5
  export { default as deleteTeamMember } from "./deleteTeamMember.js";
6
+ export { default as listTeamMembers } from "./listTeamMembers.js";
5
7
  export { default as setMobSessionCoauthors } from "./setMobSessionCoauthors.js";
6
8
  export { default as clearMobSession } from "./clearMobSession.js";
9
+ export { default as listMobSessionCoauthors } from "./listMobSessionCoauthors.js";
10
+ export { default as listMobSessionCoauthorTrailers } from "./listMobSessionCoauthorTrailers.js";
@@ -0,0 +1,26 @@
1
+ import { listMobSessionCoauthorTrailers } from "../clients/gitMobClient.js";
2
+ const name = "list_mob_session_coauthor_trailers";
3
+ const description = "Lists the git Co-authored-by trailers for the coauthors " +
4
+ "currently included in the active mob or pairing session. " +
5
+ "If Git Mob is setup, these Co-authored-by trailers will be automatically " +
6
+ "added to the commit's message when making commits during the session.";
7
+ const inputSchema = {};
8
+ const annotations = {
9
+ title: "List Mob Session Coauthor Trailers",
10
+ readOnlyHint: true,
11
+ destructiveHint: false,
12
+ idempotentHint: true,
13
+ openWorldHint: false,
14
+ };
15
+ const callback = async () => {
16
+ const { ok, value } = await listMobSessionCoauthorTrailers();
17
+ return { isError: !ok, content: [{ type: "text", text: value || "" }] };
18
+ };
19
+ const tool = {
20
+ name,
21
+ description,
22
+ inputSchema,
23
+ annotations,
24
+ callback,
25
+ };
26
+ export default tool;
@@ -0,0 +1,25 @@
1
+ import { listMobSessionCoauthors } from "../clients/gitMobClient.js";
2
+ const name = "list_mob_session_coauthors";
3
+ const description = "Lists all coauthors currently included in the active mob or pairing session. " +
4
+ "If Git Mob is setup, these coauthors will be automatically added as " +
5
+ "Co-authored-by trailers to the commit's message when making commits during the session.";
6
+ const inputSchema = {};
7
+ const annotations = {
8
+ title: "List Mob Session Coauthors",
9
+ readOnlyHint: true,
10
+ destructiveHint: false,
11
+ idempotentHint: true,
12
+ openWorldHint: false,
13
+ };
14
+ const callback = async () => {
15
+ const { ok, value } = await listMobSessionCoauthors();
16
+ return { isError: !ok, content: [{ type: "text", text: value || "" }] };
17
+ };
18
+ const tool = {
19
+ name,
20
+ description,
21
+ inputSchema,
22
+ annotations,
23
+ callback,
24
+ };
25
+ export default tool;
@@ -0,0 +1,26 @@
1
+ import { listCoauthors } from "../clients/gitMobClient.js";
2
+ const name = "list_team_members";
3
+ const description = "Lists all team members that have been added to Git Mob. " +
4
+ "The team members can then be used in pairing / mobbing sessions as coauthors." +
5
+ "Each entry is formatted as: <key> <name> <email>." +
6
+ "Ask the user which team member(s) they want to pair or mob with.";
7
+ const inputSchema = {};
8
+ const annotations = {
9
+ title: "List Team Members",
10
+ readOnlyHint: true,
11
+ destructiveHint: false,
12
+ idempotentHint: true,
13
+ openWorldHint: false,
14
+ };
15
+ const callback = async () => {
16
+ const { ok, value } = await listCoauthors();
17
+ return { isError: !ok, content: [{ type: "text", text: value || "" }] };
18
+ };
19
+ const tool = {
20
+ name,
21
+ description,
22
+ inputSchema,
23
+ annotations,
24
+ callback,
25
+ };
26
+ export default tool;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-mob-mcp-server",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "MCP Server for git-mob CLI app",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -15,12 +15,13 @@
15
15
  "eslint": "eslint .",
16
16
  "eslint:fix": "eslint --fix",
17
17
  "format": "prettier --write \"**/*.{js,mjs,cjs,ts}\"",
18
+ "inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
18
19
  "lint": "npm-run-all typecheck eslint",
19
20
  "lint:fix": "npm-run-all format typecheck eslint:fix",
20
- "start": "node --experimental-strip-types src/index.ts",
21
+ "start": "npm-run-all --parallel watch inspect",
21
22
  "test": "jest",
22
23
  "typecheck": "tsc --noEmit",
23
- "watch": "node --experimental-strip-types --watch src/index.ts"
24
+ "watch": "tsc --watch"
24
25
  },
25
26
  "publishConfig": {
26
27
  "access": "public",
@@ -1,29 +0,0 @@
1
- import { URL } from "node:url";
2
- export const registerGtMobResourceAsTool = (server, resource) => {
3
- const { name, uri, metadata, readCallback } = resource;
4
- const toolName = `get_${name}`;
5
- const annotations = {
6
- title: toolName,
7
- readOnlyHint: true,
8
- destructiveHint: false,
9
- idempotentHint: true,
10
- openWorldHint: false,
11
- };
12
- const toolCallback = async (_args, extra) => {
13
- const resourceResult = await readCallback(new URL(uri), extra);
14
- const toolResult = {
15
- content: resourceResult.contents
16
- .filter((content) => typeof content.text === "string")
17
- .map((content) => ({
18
- type: "text",
19
- text: content.text,
20
- })),
21
- };
22
- return toolResult;
23
- };
24
- server.registerTool(toolName, {
25
- description: String(metadata.description),
26
- inputSchema: {},
27
- annotations,
28
- }, toolCallback);
29
- };
@@ -1,39 +0,0 @@
1
- import {} from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { listMobSessionCoauthorTrailers } from "../clients/gitMobClient.js";
3
- const name = "mob_session_coauthor_trailers";
4
- const uri = "gitmob://mob-session-coauthor-trailers";
5
- const metadata = {
6
- description: "List of the git Co-authored-by trailers for the coauthors " +
7
- "currently included in the active mob or pairing session. " +
8
- "If Git Mob is setup, these Co-authored-by trailers will be automatically " +
9
- "added to the commit's message when making commits during the session.",
10
- mimeType: "text/plain",
11
- };
12
- const readCallback = async (uri) => {
13
- const { ok, value } = await listMobSessionCoauthorTrailers();
14
- if (!ok) {
15
- return {
16
- isError: true,
17
- contents: [
18
- {
19
- uri: uri.href,
20
- text: value,
21
- },
22
- ],
23
- };
24
- }
25
- const lines = value.split("\n").filter((line) => line.trim() !== "");
26
- return {
27
- contents: lines.map((line) => ({
28
- uri: uri.href,
29
- text: line,
30
- })),
31
- };
32
- };
33
- const resource = {
34
- name,
35
- uri,
36
- metadata,
37
- readCallback,
38
- };
39
- export default resource;
@@ -1,38 +0,0 @@
1
- import {} from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { listMobSessionCoauthors } from "../clients/gitMobClient.js";
3
- const name = "mob_session_coauthors";
4
- const uri = "gitmob://mob-session-coauthors";
5
- const metadata = {
6
- description: "List of all coauthors currently included in the active mob or pairing session. " +
7
- "If Git Mob is setup, these coauthors will be automatically added as " +
8
- "Co-authored-by trailers to the commit's message when making commits during the session.",
9
- mimeType: "text/plain",
10
- };
11
- const readCallback = async (uri) => {
12
- const { ok, value } = await listMobSessionCoauthors();
13
- if (!ok) {
14
- return {
15
- isError: true,
16
- contents: [
17
- {
18
- uri: uri.href,
19
- text: value,
20
- },
21
- ],
22
- };
23
- }
24
- const lines = value.split("\n").filter((line) => line.trim() !== "");
25
- return {
26
- contents: lines.map((line) => ({
27
- uri: uri.href,
28
- text: line,
29
- })),
30
- };
31
- };
32
- const resource = {
33
- name,
34
- uri,
35
- metadata,
36
- readCallback,
37
- };
38
- export default resource;
@@ -1,39 +0,0 @@
1
- import {} from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { listCoauthors } from "../clients/gitMobClient.js";
3
- const name = "team_members";
4
- const uri = "gitmob://team-members";
5
- const metadata = {
6
- description: "List of all the team members that have been added to Git Mob. " +
7
- "The team members can then be used in pairing / mobbing sessions as coauthors." +
8
- "Each entry is formatted as: <key> <name> <email>." +
9
- "Ask the user which team member(s) they want to pair or mob with.",
10
- mimeType: "text/plain",
11
- };
12
- const readCallback = async (uri) => {
13
- const { ok, value } = await listCoauthors();
14
- if (!ok) {
15
- return {
16
- isError: true,
17
- contents: [
18
- {
19
- uri: uri.href,
20
- text: value,
21
- },
22
- ],
23
- };
24
- }
25
- const lines = (value || "").split("\n").filter((line) => line.trim() !== "");
26
- return {
27
- contents: lines.map((line) => ({
28
- uri: uri.href,
29
- text: line,
30
- })),
31
- };
32
- };
33
- const resource = {
34
- name,
35
- uri,
36
- metadata,
37
- readCallback,
38
- };
39
- export default resource;