@ric_/forgejo-mcp 0.1.4 → 0.1.5

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
@@ -137,6 +137,12 @@ The Docker image:
137
137
  - Read-only filesystem
138
138
  - No new privileges security option
139
139
 
140
+ ## Auto Setup
141
+
142
+ When an MCP client (such as Claude Code, Claude Desktop, or Cursor) connects to this server, it automatically receives instructions describing all available tool categories and usage conventions. This means the AI assistant understands how to use the server without any additional prompting — it knows which tools exist, that most require `owner` and `repo` parameters, how pagination works, and that file content should be base64-encoded.
143
+
144
+ No configuration is needed to enable this; it works out of the box via the MCP `initialize` handshake.
145
+
140
146
  ## Available Tools
141
147
 
142
148
  ### Repository Management (24 tools)
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAuB7D"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA4BjD,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAwB7D"}
package/dist/server.js CHANGED
@@ -6,6 +6,25 @@ import { registerPullRequestTools } from "./tools/pullrequests.js";
6
6
  import { registerOrganizationTools } from "./tools/organizations.js";
7
7
  import { registerUserTools } from "./tools/users.js";
8
8
  import { registerAdminTools } from "./tools/admin.js";
9
+ const SERVER_INSTRUCTIONS = `This MCP server connects to a Forgejo (or Gitea) instance and provides tools to interact with its API.
10
+
11
+ ## Tool categories
12
+
13
+ - **Repository**: search_repos, get_repo, create_repo, create_org_repo, delete_repo, fork_repo, edit_repo, transfer_repo, list_branches, get_branch, create_branch, delete_branch, list_repo_commits, get_file_contents, create_file, update_file, delete_file, list_releases, create_release, list_tags, list_repo_topics, update_repo_topics, list_forks, list_collaborators, add_collaborator
14
+ - **Issues**: list_issues, get_issue, create_issue, edit_issue, list_issue_comments, create_issue_comment, edit_issue_comment, delete_issue_comment, list_labels, get_label, create_label, edit_label, delete_label, add_issue_labels, remove_issue_label, list_milestones, get_milestone, create_milestone, edit_milestone, delete_milestone
15
+ - **Pull Requests**: list_pull_requests, get_pull_request, create_pull_request, edit_pull_request, merge_pull_request, list_pr_commits, list_pr_files, get_pr_diff, list_pr_reviews, create_pr_review, request_pr_review, update_pr_branch
16
+ - **Organizations**: list_orgs, get_org, create_org, edit_org, delete_org, list_org_repos, list_org_members, list_org_teams, get_team, create_team, add_team_member, remove_team_member, list_org_labels, list_org_hooks
17
+ - **Users**: get_authenticated_user, get_user, list_user_repos, list_user_orgs, search_users, list_followers, list_following, list_user_starred, list_my_starred, star_repo, unstar_repo, list_my_notifications, mark_notifications_read
18
+ - **Admin**: admin_list_users, admin_create_user, admin_delete_user, admin_edit_user, admin_list_cron_jobs, admin_run_cron_job, admin_list_hooks, get_server_version, render_markdown, render_markup, list_gitignore_templates, get_gitignore_template, list_license_templates, get_license_template, list_label_templates, get_label_template, get_nodeinfo, list_action_runners_jobs, get_runner_registration_token
19
+
20
+ ## Conventions
21
+
22
+ - Most tools require \`owner\` and \`repo\` parameters to identify a repository.
23
+ - List endpoints support pagination with \`page\` (starting at 1) and \`limit\` (1–50) parameters.
24
+ - Tool names use snake_case with a domain prefix for admin tools (e.g. \`admin_list_users\`).
25
+ - File content parameters (create_file, update_file) expect base64-encoded content.
26
+ - The server returns JSON responses from the Forgejo API, or error messages with HTTP status codes on failure.
27
+ `;
9
28
  export function createServer(config) {
10
29
  const server = new McpServer({
11
30
  name: "forgejo-mcp",
@@ -14,6 +33,7 @@ export function createServer(config) {
14
33
  capabilities: {
15
34
  logging: {},
16
35
  },
36
+ instructions: SERVER_INSTRUCTIONS,
17
37
  });
18
38
  const client = new ForgejoClient(config);
19
39
  registerRepositoryTools(server, client);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,UAAU,YAAY,CAAC,MAAqB;IAChD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,OAAO;KACjB,EACD;QACE,YAAY,EAAE;YACZ,OAAO,EAAE,EAAE;SACZ;KACF,CACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAEzC,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEnC,OAAO,MAAM,CAAC;AAChB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name": "@ric_/forgejo-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "A Model Context Protocol (MCP) server for Forgejo and Gitea instances. Provides 103 tools across repos, issues, PRs, orgs, users, and admin APIs. Works with Claude, Cursor, and any MCP-compatible client. Supports stdio and HTTP transports. Built with Claude Code.",
5
5
  "type": "module",
6
6
  "license": "MIT",