@fre4x/github 1.0.32 → 1.0.40

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,58 +1,69 @@
1
- # @fre4x/github
2
-
3
- MCP server for the GitHub API. This server enables searching for repositories, code, issues, and pull requests, getting specific repository details, and creating issues.
4
-
5
- ## Tools
6
-
7
- | Tool | Description |
8
- |---|---|
9
- | `github_search_repositories` | Search for GitHub repositories. Supports limit and offset. |
10
- | `github_search_code` | Search for code within GitHub repositories. Supports limit and offset. |
11
- | `github_search_issues_and_prs` | Search for issues and pull requests. Supports limit and offset. |
12
- | `github_get_repository` | Get details for a specific repository (owner and repo name required). |
13
- | `github_list_issues` | List issues in a specific repository. Supports state, limit and offset. |
14
- | `github_create_issue` | Create an issue in a repository. |
15
- | `github_get_pull_request` | Get details for a specific pull request. |
16
- | `github_list_pull_requests` | List pull requests in a specific repository. Supports state, limit and offset. |
17
-
18
- ## Mock Mode
19
-
20
- A fully functional mock mode is available for offline testing and evaluation. It operates identically to the real API but returns static fixture data.
21
-
22
- ```bash
23
- MOCK=true npx @fre4x/github
24
- ```
25
-
26
- ## Configuration
27
-
28
- To use this with Claude Desktop, add the following to your `claude_desktop_config.json`:
29
-
30
- ```json
31
- {
32
- "mcpServers": {
33
- "github": {
34
- "command": "npx",
35
- "args": ["-y", "@fre4x/github"],
36
- "env": {
37
- "GITHUB_PAT": "your_personal_access_token_here"
38
- }
39
- }
40
- }
41
- }
42
- ```
43
-
44
- Or run in mock mode:
45
-
46
- ```json
47
- {
48
- "mcpServers": {
49
- "github": {
50
- "command": "npx",
51
- "args": ["-y", "@fre4x/github"],
52
- "env": {
53
- "MOCK": "true"
54
- }
55
- }
56
- }
57
- }
58
- ```
1
+ # @fre4x/github
2
+
3
+ MCP server for the GitHub API. This server enables searching for repositories, code, issues, and pull requests, getting specific repository details, and creating issues.
4
+
5
+ ## Tools
6
+
7
+ | Tool | Description |
8
+ |---|---|
9
+ | `github_search_repositories` | Search for GitHub repositories. Supports limit and offset. |
10
+ | `github_search_code` | Search for code within GitHub repositories. Supports limit and offset. |
11
+ | `github_search_issues_and_prs` | Search for issues and pull requests. Supports limit and offset. |
12
+ | `github_get_repository` | Get details for a specific repository (owner and repo name required). |
13
+ | `github_list_issues` | List issues in a specific repository. Supports state, limit and offset. |
14
+ | `github_create_issue` | Create an issue in a repository. |
15
+ | `github_get_pull_request` | Get details for a specific pull request. |
16
+ | `github_list_pull_requests` | List pull requests in a specific repository. Supports state, limit and offset. |
17
+
18
+ ## Mock Mode
19
+
20
+ A fully functional mock mode is available for offline testing and evaluation. It operates identically to the real API but returns static fixture data.
21
+
22
+ ```bash
23
+ MOCK=true npx @fre4x/github
24
+ ```
25
+
26
+ ## Configuration
27
+
28
+ To use this with Claude Desktop, add the following to your `claude_desktop_config.json`:
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "github": {
34
+ "command": "npx",
35
+ "args": ["-y", "@fre4x/github"],
36
+ "env": {
37
+ "GITHUB_TOKEN": "your_personal_access_token_here"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ > **Note:** Both `GITHUB_TOKEN` and `GITHUB_PAT` are accepted. Token is optional — unauthenticated requests work but are rate-limited to 60 req/hour.
45
+
46
+ Or run in mock mode:
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "github": {
52
+ "command": "npx",
53
+ "args": ["-y", "@fre4x/github"],
54
+ "env": {
55
+ "MOCK": "true"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## Development
63
+
64
+ ```bash
65
+ npm install
66
+ npm run dev # tsx, no build
67
+ npm run build # esbuild → dist/
68
+ npm test # vitest unit tests
69
+ ```
package/dist/api.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import type { SearchRepositoriesParams, SearchRepositoriesResponse, SearchCodeParams, SearchCodeResponse, SearchIssuesAndPrsParams, SearchIssuesAndPrsResponse, GetRepositoryParams, GetRepositoryResponse, ListIssuesParams, ListIssuesResponse, CreateIssueParams, CreateIssueResponse, GetPullRequestParams, GetPullRequestResponse, ListPullRequestsParams, ListPullRequestsResponse } from './types.js';
2
+ export declare function searchRepositories(params: SearchRepositoriesParams): Promise<SearchRepositoriesResponse>;
3
+ export declare function searchCode(params: SearchCodeParams): Promise<SearchCodeResponse>;
4
+ export declare function searchIssuesAndPrs(params: SearchIssuesAndPrsParams): Promise<SearchIssuesAndPrsResponse>;
5
+ export declare function getRepository(params: GetRepositoryParams): Promise<GetRepositoryResponse>;
6
+ export declare function listIssues(params: ListIssuesParams): Promise<ListIssuesResponse>;
7
+ export declare function createIssue(params: CreateIssueParams): Promise<CreateIssueResponse>;
8
+ export declare function getPullRequest(params: GetPullRequestParams): Promise<GetPullRequestResponse>;
9
+ export declare function listPullRequests(params: ListPullRequestsParams): Promise<ListPullRequestsResponse>;
10
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EAC3B,MAAM,YAAY,CAAC;AAUpB,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,wBAAwB,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAuCrC;AAED,wBAAsB,UAAU,CAC5B,MAAM,EAAE,gBAAgB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAuC7B;AAED,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,wBAAwB,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAwCrC;AAED,wBAAsB,aAAa,CAC/B,MAAM,EAAE,mBAAmB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAgChC;AAED,wBAAsB,UAAU,CAC5B,MAAM,EAAE,gBAAgB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA0C7B;AAED,wBAAsB,WAAW,CAC7B,MAAM,EAAE,iBAAiB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA2B9B;AAED,wBAAsB,cAAc,CAChC,MAAM,EAAE,oBAAoB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAgCjC;AAED,wBAAsB,gBAAgB,CAClC,MAAM,EAAE,sBAAsB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CA0CnC"}
package/dist/api.js ADDED
@@ -0,0 +1,280 @@
1
+ import { Octokit } from '@octokit/rest';
2
+ import { IS_MOCK, MOCK_FIXTURES } from './mock.js';
3
+ import { createApiError, createNotFoundError } from '@fre4x/mcp-shared';
4
+ const getOctokit = () => {
5
+ return new Octokit({
6
+ auth: process.env.GITHUB_PAT || process.env.GITHUB_TOKEN,
7
+ });
8
+ };
9
+ export async function searchRepositories(params) {
10
+ if (IS_MOCK())
11
+ return MOCK_FIXTURES.searchRepositories;
12
+ const limit = Math.max(1, params.limit ?? 10);
13
+ const offset = Math.max(0, params.offset ?? 0);
14
+ const per_page = 100;
15
+ const page = Math.floor(offset / per_page) + 1;
16
+ const offsetInPage = offset % per_page;
17
+ try {
18
+ const octokit = getOctokit();
19
+ const response = await octokit.rest.search.repos({
20
+ q: params.query,
21
+ per_page,
22
+ page,
23
+ });
24
+ const items = response.data.items
25
+ .slice(offsetInPage, offsetInPage + limit)
26
+ .map((item) => ({
27
+ full_name: item.full_name,
28
+ description: item.description,
29
+ stargazers_count: item.stargazers_count,
30
+ html_url: item.html_url,
31
+ }));
32
+ return {
33
+ items,
34
+ total: response.data.total_count,
35
+ };
36
+ }
37
+ catch (error) {
38
+ const message = error instanceof Error ? error.message : 'GitHub API error';
39
+ const status = typeof error === 'object' && error !== null && 'status' in error
40
+ ? Number(error.status)
41
+ : undefined;
42
+ throw createApiError(message, status);
43
+ }
44
+ }
45
+ export async function searchCode(params) {
46
+ if (IS_MOCK())
47
+ return MOCK_FIXTURES.searchCode;
48
+ const limit = Math.max(1, params.limit ?? 10);
49
+ const offset = Math.max(0, params.offset ?? 0);
50
+ const per_page = 100;
51
+ const page = Math.floor(offset / per_page) + 1;
52
+ const offsetInPage = offset % per_page;
53
+ try {
54
+ const octokit = getOctokit();
55
+ const response = await octokit.rest.search.code({
56
+ q: params.query,
57
+ per_page,
58
+ page,
59
+ });
60
+ const items = response.data.items
61
+ .slice(offsetInPage, offsetInPage + limit)
62
+ .map((item) => ({
63
+ name: item.name,
64
+ path: item.path,
65
+ repository: { full_name: item.repository.full_name },
66
+ html_url: item.html_url,
67
+ }));
68
+ return {
69
+ items,
70
+ total: response.data.total_count,
71
+ };
72
+ }
73
+ catch (error) {
74
+ const message = error instanceof Error ? error.message : 'GitHub API error';
75
+ const status = typeof error === 'object' && error !== null && 'status' in error
76
+ ? Number(error.status)
77
+ : undefined;
78
+ throw createApiError(message, status);
79
+ }
80
+ }
81
+ export async function searchIssuesAndPrs(params) {
82
+ if (IS_MOCK())
83
+ return MOCK_FIXTURES.searchIssuesAndPrs;
84
+ const limit = Math.max(1, params.limit ?? 10);
85
+ const offset = Math.max(0, params.offset ?? 0);
86
+ const per_page = 100;
87
+ const page = Math.floor(offset / per_page) + 1;
88
+ const offsetInPage = offset % per_page;
89
+ try {
90
+ const octokit = getOctokit();
91
+ const response = await octokit.rest.search.issuesAndPullRequests({
92
+ q: params.query,
93
+ per_page,
94
+ page,
95
+ });
96
+ const items = response.data.items
97
+ .slice(offsetInPage, offsetInPage + limit)
98
+ .map((item) => ({
99
+ title: item.title,
100
+ number: item.number,
101
+ state: item.state,
102
+ html_url: item.html_url,
103
+ repository_url: item.repository_url,
104
+ }));
105
+ return {
106
+ items,
107
+ total: response.data.total_count,
108
+ };
109
+ }
110
+ catch (error) {
111
+ const message = error instanceof Error ? error.message : 'GitHub API error';
112
+ const status = typeof error === 'object' && error !== null && 'status' in error
113
+ ? Number(error.status)
114
+ : undefined;
115
+ throw createApiError(message, status);
116
+ }
117
+ }
118
+ export async function getRepository(params) {
119
+ if (IS_MOCK())
120
+ return MOCK_FIXTURES.getRepository;
121
+ try {
122
+ const octokit = getOctokit();
123
+ const response = await octokit.rest.repos.get({
124
+ owner: params.owner,
125
+ repo: params.repo,
126
+ });
127
+ return {
128
+ full_name: response.data.full_name,
129
+ description: response.data.description,
130
+ stargazers_count: response.data.stargazers_count,
131
+ subscribers_count: response.data.subscribers_count,
132
+ forks_count: response.data.forks_count,
133
+ html_url: response.data.html_url,
134
+ default_branch: response.data.default_branch,
135
+ };
136
+ }
137
+ catch (error) {
138
+ const status = typeof error === 'object' && error !== null && 'status' in error
139
+ ? Number(error.status)
140
+ : undefined;
141
+ if (status === 404)
142
+ throw createNotFoundError(`Repository ${params.owner}/${params.repo} not found`);
143
+ const message = error instanceof Error ? error.message : 'GitHub API error';
144
+ throw createApiError(message, status);
145
+ }
146
+ }
147
+ export async function listIssues(params) {
148
+ if (IS_MOCK())
149
+ return MOCK_FIXTURES.listIssues;
150
+ const limit = Math.max(1, params.limit ?? 10);
151
+ const offset = Math.max(0, params.offset ?? 0);
152
+ const per_page = 100;
153
+ const page = Math.floor(offset / per_page) + 1;
154
+ const offsetInPage = offset % per_page;
155
+ try {
156
+ const octokit = getOctokit();
157
+ const response = await octokit.rest.issues.listForRepo({
158
+ owner: params.owner,
159
+ repo: params.repo,
160
+ state: params.state || 'all',
161
+ per_page,
162
+ page,
163
+ });
164
+ const items = response.data
165
+ .slice(offsetInPage, offsetInPage + limit)
166
+ .map((item) => ({
167
+ title: item.title,
168
+ number: item.number,
169
+ state: item.state,
170
+ html_url: item.html_url,
171
+ body: item.body,
172
+ }));
173
+ return {
174
+ items,
175
+ total: items.length, // Still using slice length as total for now
176
+ };
177
+ }
178
+ catch (error) {
179
+ const message = error instanceof Error ? error.message : 'GitHub API error';
180
+ const status = typeof error === 'object' && error !== null && 'status' in error
181
+ ? Number(error.status)
182
+ : undefined;
183
+ throw createApiError(message, status);
184
+ }
185
+ }
186
+ export async function createIssue(params) {
187
+ if (IS_MOCK())
188
+ return MOCK_FIXTURES.createIssue;
189
+ try {
190
+ const octokit = getOctokit();
191
+ const response = await octokit.rest.issues.create({
192
+ owner: params.owner,
193
+ repo: params.repo,
194
+ title: params.title,
195
+ body: params.body,
196
+ });
197
+ return {
198
+ title: response.data.title,
199
+ number: response.data.number,
200
+ state: response.data.state,
201
+ html_url: response.data.html_url,
202
+ };
203
+ }
204
+ catch (error) {
205
+ const message = error instanceof Error ? error.message : 'GitHub API error';
206
+ const status = typeof error === 'object' && error !== null && 'status' in error
207
+ ? Number(error.status)
208
+ : undefined;
209
+ throw createApiError(message, status);
210
+ }
211
+ }
212
+ export async function getPullRequest(params) {
213
+ if (IS_MOCK())
214
+ return MOCK_FIXTURES.getPullRequest;
215
+ try {
216
+ const octokit = getOctokit();
217
+ const response = await octokit.rest.pulls.get({
218
+ owner: params.owner,
219
+ repo: params.repo,
220
+ pull_number: params.pull_number,
221
+ });
222
+ return {
223
+ title: response.data.title,
224
+ number: response.data.number,
225
+ state: response.data.state,
226
+ html_url: response.data.html_url,
227
+ body: response.data.body,
228
+ merged: response.data.merged,
229
+ };
230
+ }
231
+ catch (error) {
232
+ const status = typeof error === 'object' && error !== null && 'status' in error
233
+ ? Number(error.status)
234
+ : undefined;
235
+ if (status === 404)
236
+ throw createNotFoundError(`Pull request ${params.pull_number} not found`);
237
+ const message = error instanceof Error ? error.message : 'GitHub API error';
238
+ throw createApiError(message, status);
239
+ }
240
+ }
241
+ export async function listPullRequests(params) {
242
+ if (IS_MOCK())
243
+ return MOCK_FIXTURES.listPullRequests;
244
+ const limit = Math.max(1, params.limit ?? 10);
245
+ const offset = Math.max(0, params.offset ?? 0);
246
+ const per_page = 100;
247
+ const page = Math.floor(offset / per_page) + 1;
248
+ const offsetInPage = offset % per_page;
249
+ try {
250
+ const octokit = getOctokit();
251
+ const response = await octokit.rest.pulls.list({
252
+ owner: params.owner,
253
+ repo: params.repo,
254
+ state: params.state || 'all',
255
+ per_page,
256
+ page,
257
+ });
258
+ const items = response.data
259
+ .slice(offsetInPage, offsetInPage + limit)
260
+ .map((item) => ({
261
+ title: item.title,
262
+ number: item.number,
263
+ state: item.state,
264
+ html_url: item.html_url,
265
+ body: item.body,
266
+ }));
267
+ return {
268
+ items,
269
+ total: items.length, // Still using slice length as total for now
270
+ };
271
+ }
272
+ catch (error) {
273
+ const message = error instanceof Error ? error.message : 'GitHub API error';
274
+ const status = typeof error === 'object' && error !== null && 'status' in error
275
+ ? Number(error.status)
276
+ : undefined;
277
+ throw createApiError(message, status);
278
+ }
279
+ }
280
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAmBxC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,UAAU,GAAG,GAAG,EAAE;IACpB,OAAO,IAAI,OAAO,CAAC;QACf,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY;KAC3D,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,MAAgC;IAEhC,IAAI,OAAO,EAAE;QAAE,OAAO,aAAa,CAAC,kBAAkB,CAAC;IAEvD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM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AAQ,IAAI,KAAK;YAC5D,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YACtB,CAAC,CAAC,SAAS,CAAC;QACpB,MAAM,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;AACL,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ declare const server: Server<{
3
+ method: string;
4
+ params?: {
5
+ [x: string]: unknown;
6
+ _meta?: {
7
+ [x: string]: unknown;
8
+ progressToken?: string | number | undefined;
9
+ "io.modelcontextprotocol/related-task"?: {
10
+ taskId: string;
11
+ } | undefined;
12
+ } | undefined;
13
+ } | undefined;
14
+ }, {
15
+ method: string;
16
+ params?: {
17
+ [x: string]: unknown;
18
+ _meta?: {
19
+ [x: string]: unknown;
20
+ progressToken?: string | number | undefined;
21
+ "io.modelcontextprotocol/related-task"?: {
22
+ taskId: string;
23
+ } | undefined;
24
+ } | undefined;
25
+ } | undefined;
26
+ }, {
27
+ [x: string]: unknown;
28
+ _meta?: {
29
+ [x: string]: unknown;
30
+ progressToken?: string | number | undefined;
31
+ "io.modelcontextprotocol/related-task"?: {
32
+ taskId: string;
33
+ } | undefined;
34
+ } | undefined;
35
+ }>;
36
+ export { server };
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA8BnE,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUX,CAAC;AA4XF,OAAO,EAAE,MAAM,EAAE,CAAC"}