@nestjs-mcp/server 0.1.0-alpha.4
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/.copilotignore +38 -0
- package/.devcontainer/Dockerfile.dev +28 -0
- package/.devcontainer/devcontainer.json +56 -0
- package/.devcontainer/docker-compose.yml +15 -0
- package/.dockerignore +37 -0
- package/.github/codeql-config.yml +4 -0
- package/.github/copilot-instructions.md +138 -0
- package/.github/prompts/memory.prompt.md +120 -0
- package/.github/workflows/auto-tag-release.yml +84 -0
- package/.github/workflows/codeql-analysis.yml +56 -0
- package/.github/workflows/npm-publish.yml +58 -0
- package/.github/workflows/pr-branch-validation.yml +78 -0
- package/.github/workflows/run-tests.yml +41 -0
- package/.github/workflows/sync-main-to-develop.yml +53 -0
- package/.handbook/GIT_GUIDELINES.md +250 -0
- package/.handbook/PACKAGE_VERSIONING.md +140 -0
- package/.handbook/STACK.md +75 -0
- package/.prettierrc +4 -0
- package/.vscode/extensions.json +44 -0
- package/.vscode/settings.json +40 -0
- package/CONTRIBUTING.md +261 -0
- package/LICENSE +21 -0
- package/README.md +490 -0
- package/dist/examples/async-import/app.module.d.ts +2 -0
- package/dist/examples/async-import/app.module.js +33 -0
- package/dist/examples/async-import/app.module.js.map +1 -0
- package/dist/examples/async-import/main.d.ts +1 -0
- package/dist/examples/async-import/main.js +17 -0
- package/dist/examples/async-import/main.js.map +1 -0
- package/dist/examples/guards/app.module.d.ts +6 -0
- package/dist/examples/guards/app.module.js +48 -0
- package/dist/examples/guards/app.module.js.map +1 -0
- package/dist/examples/guards/guards.resolver.d.ts +13 -0
- package/dist/examples/guards/guards.resolver.js +61 -0
- package/dist/examples/guards/guards.resolver.js.map +1 -0
- package/dist/examples/guards/main.d.ts +1 -0
- package/dist/examples/guards/main.js +11 -0
- package/dist/examples/guards/main.js.map +1 -0
- package/dist/examples/mixed/app.module.d.ts +2 -0
- package/dist/examples/mixed/app.module.js +31 -0
- package/dist/examples/mixed/app.module.js.map +1 -0
- package/dist/examples/mixed/main.d.ts +1 -0
- package/dist/examples/mixed/main.js +11 -0
- package/dist/examples/mixed/main.js.map +1 -0
- package/dist/examples/mixed/mixed.resolver.d.ts +6 -0
- package/dist/examples/mixed/mixed.resolver.js +78 -0
- package/dist/examples/mixed/mixed.resolver.js.map +1 -0
- package/dist/examples/prompts/app.module.d.ts +2 -0
- package/dist/examples/prompts/app.module.js +31 -0
- package/dist/examples/prompts/app.module.js.map +1 -0
- package/dist/examples/prompts/main.d.ts +1 -0
- package/dist/examples/prompts/main.js +11 -0
- package/dist/examples/prompts/main.js.map +1 -0
- package/dist/examples/prompts/prompts.resolver.d.ts +14 -0
- package/dist/examples/prompts/prompts.resolver.js +165 -0
- package/dist/examples/prompts/prompts.resolver.js.map +1 -0
- package/dist/examples/resources/app.module.d.ts +2 -0
- package/dist/examples/resources/app.module.js +31 -0
- package/dist/examples/resources/app.module.js.map +1 -0
- package/dist/examples/resources/main.d.ts +1 -0
- package/dist/examples/resources/main.js +11 -0
- package/dist/examples/resources/main.js.map +1 -0
- package/dist/examples/resources/resources.resolver.d.ts +12 -0
- package/dist/examples/resources/resources.resolver.js +114 -0
- package/dist/examples/resources/resources.resolver.js.map +1 -0
- package/dist/examples/tools/app.module.d.ts +2 -0
- package/dist/examples/tools/app.module.js +31 -0
- package/dist/examples/tools/app.module.js.map +1 -0
- package/dist/examples/tools/main.d.ts +1 -0
- package/dist/examples/tools/main.js +11 -0
- package/dist/examples/tools/main.js.map +1 -0
- package/dist/examples/tools/tools.resolver.d.ts +23 -0
- package/dist/examples/tools/tools.resolver.js +175 -0
- package/dist/examples/tools/tools.resolver.js.map +1 -0
- package/dist/src/controllers/sse/index.d.ts +2 -0
- package/dist/src/controllers/sse/index.js +19 -0
- package/dist/src/controllers/sse/index.js.map +1 -0
- package/dist/src/controllers/sse/sse.controller.d.ts +8 -0
- package/dist/src/controllers/sse/sse.controller.js +51 -0
- package/dist/src/controllers/sse/sse.controller.js.map +1 -0
- package/dist/src/controllers/sse/sse.service.d.ts +16 -0
- package/dist/src/controllers/sse/sse.service.js +78 -0
- package/dist/src/controllers/sse/sse.service.js.map +1 -0
- package/dist/src/controllers/streamable/index.d.ts +2 -0
- package/dist/src/controllers/streamable/index.js +19 -0
- package/dist/src/controllers/streamable/index.js.map +1 -0
- package/dist/src/controllers/streamable/streamable.controller.d.ts +9 -0
- package/dist/src/controllers/streamable/streamable.controller.js +62 -0
- package/dist/src/controllers/streamable/streamable.controller.js.map +1 -0
- package/dist/src/controllers/streamable/streamable.service.d.ts +24 -0
- package/dist/src/controllers/streamable/streamable.service.js +117 -0
- package/dist/src/controllers/streamable/streamable.service.js.map +1 -0
- package/dist/src/decorators/capabilities.constants.d.ts +4 -0
- package/dist/src/decorators/capabilities.constants.js +8 -0
- package/dist/src/decorators/capabilities.constants.js.map +1 -0
- package/dist/src/decorators/capabilities.decorators.d.ts +8 -0
- package/dist/src/decorators/capabilities.decorators.js +49 -0
- package/dist/src/decorators/capabilities.decorators.js.map +1 -0
- package/dist/src/decorators/index.d.ts +2 -0
- package/dist/src/decorators/index.js +19 -0
- package/dist/src/decorators/index.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +21 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/capabilities.interface.d.ts +52 -0
- package/dist/src/interfaces/capabilities.interface.js +3 -0
- package/dist/src/interfaces/capabilities.interface.js.map +1 -0
- package/dist/src/interfaces/guards.interface.d.ts +4 -0
- package/dist/src/interfaces/guards.interface.js +3 -0
- package/dist/src/interfaces/guards.interface.js.map +1 -0
- package/dist/src/interfaces/index.d.ts +2 -0
- package/dist/src/interfaces/index.js +19 -0
- package/dist/src/interfaces/index.js.map +1 -0
- package/dist/src/interfaces/mcp-server-options.interface.d.ts +42 -0
- package/dist/src/interfaces/mcp-server-options.interface.js +3 -0
- package/dist/src/interfaces/mcp-server-options.interface.js.map +1 -0
- package/dist/src/mcp.module.d.ts +13 -0
- package/dist/src/mcp.module.js +176 -0
- package/dist/src/mcp.module.js.map +1 -0
- package/dist/src/registry/discovery.service.d.ts +16 -0
- package/dist/src/registry/discovery.service.js +85 -0
- package/dist/src/registry/discovery.service.js.map +1 -0
- package/dist/src/registry/index.d.ts +2 -0
- package/dist/src/registry/index.js +19 -0
- package/dist/src/registry/index.js.map +1 -0
- package/dist/src/registry/logger.service.d.ts +16 -0
- package/dist/src/registry/logger.service.js +97 -0
- package/dist/src/registry/logger.service.js.map +1 -0
- package/dist/src/registry/registry.service.d.ts +14 -0
- package/dist/src/registry/registry.service.js +165 -0
- package/dist/src/registry/registry.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/eslint.config.mjs +40 -0
- package/examples/README.md +56 -0
- package/examples/async-import/app.module.ts +22 -0
- package/examples/async-import/main.ts +15 -0
- package/examples/guards/app.module.ts +44 -0
- package/examples/guards/guards.resolver.ts +52 -0
- package/examples/guards/main.ts +11 -0
- package/examples/mixed/app.module.ts +20 -0
- package/examples/mixed/main.ts +11 -0
- package/examples/mixed/mixed.resolver.ts +56 -0
- package/examples/prompts/app.module.ts +20 -0
- package/examples/prompts/main.ts +11 -0
- package/examples/prompts/prompts.resolver.ts +184 -0
- package/examples/resources/app.module.ts +19 -0
- package/examples/resources/main.ts +11 -0
- package/examples/resources/resources.resolver.ts +123 -0
- package/examples/tools/app.module.ts +20 -0
- package/examples/tools/main.ts +11 -0
- package/examples/tools/tools.resolver.ts +205 -0
- package/nest-cli.json +8 -0
- package/package.json +106 -0
- package/scripts/npm-publish.js +301 -0
- package/src/controllers/sse/index.ts +2 -0
- package/src/controllers/sse/sse.controller.ts +19 -0
- package/src/controllers/sse/sse.service.ts +90 -0
- package/src/controllers/streamable/index.ts +2 -0
- package/src/controllers/streamable/streamable.controller.ts +24 -0
- package/src/controllers/streamable/streamable.service.ts +168 -0
- package/src/decorators/capabilities.constants.ts +7 -0
- package/src/decorators/capabilities.decorators.ts +150 -0
- package/src/decorators/index.ts +2 -0
- package/src/index.ts +11 -0
- package/src/interfaces/capabilities.interface.ts +95 -0
- package/src/interfaces/guards.interface.ts +13 -0
- package/src/interfaces/index.ts +2 -0
- package/src/interfaces/mcp-server-options.interface.ts +105 -0
- package/src/mcp.module.ts +233 -0
- package/src/mcp.service.spec.ts +28 -0
- package/src/registry/discovery.service.ts +116 -0
- package/src/registry/index.ts +2 -0
- package/src/registry/logger.service.ts +143 -0
- package/src/registry/registry.service.ts +281 -0
- package/test/base.e2e-spec.ts +74 -0
- package/test/jest-e2e.json +9 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
// TypeScript & NestJS
|
|
4
|
+
"vscode.typescript-language-features",
|
|
5
|
+
"christian-kohler.path-intellisense",
|
|
6
|
+
"yoavbls.pretty-ts-errors",
|
|
7
|
+
"meganrogge.template-string-converter",
|
|
8
|
+
|
|
9
|
+
// ESLint & Prettier
|
|
10
|
+
"dbaeumer.vscode-eslint",
|
|
11
|
+
"esbenp.prettier-vscode",
|
|
12
|
+
|
|
13
|
+
// Testing
|
|
14
|
+
"orta.vscode-jest",
|
|
15
|
+
"firsttris.vscode-jest-runner",
|
|
16
|
+
|
|
17
|
+
// Docker
|
|
18
|
+
"ms-azuretools.vscode-docker",
|
|
19
|
+
|
|
20
|
+
// Database
|
|
21
|
+
"mtxr.sqltools",
|
|
22
|
+
"mtxr.sqltools-driver-pg",
|
|
23
|
+
|
|
24
|
+
// Git
|
|
25
|
+
"eamodio.gitlens",
|
|
26
|
+
"github.vscode-github-actions",
|
|
27
|
+
"mhutchie.git-graph",
|
|
28
|
+
|
|
29
|
+
// Environment & Configuration
|
|
30
|
+
"mikestead.dotenv",
|
|
31
|
+
"redhat.vscode-yaml",
|
|
32
|
+
"editorconfig.editorconfig",
|
|
33
|
+
|
|
34
|
+
// Documentation
|
|
35
|
+
"yzhang.markdown-all-in-one",
|
|
36
|
+
"bierner.markdown-mermaid",
|
|
37
|
+
|
|
38
|
+
// Utilities
|
|
39
|
+
"visualstudioexptteam.vscodeintellicode",
|
|
40
|
+
"wayou.vscode-todo-highlight",
|
|
41
|
+
"gruntfuggly.todo-tree",
|
|
42
|
+
"pkief.material-icon-theme"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.formatOnSave": true,
|
|
3
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll.eslint": "explicit",
|
|
6
|
+
"source.organizeImports": "explicit"
|
|
7
|
+
},
|
|
8
|
+
"editor.detectIndentation": false,
|
|
9
|
+
"editor.insertSpaces": true,
|
|
10
|
+
"editor.tabSize": 2,
|
|
11
|
+
|
|
12
|
+
// File associations
|
|
13
|
+
"files.associations": {
|
|
14
|
+
"*.env*": "dotenv"
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
// Explorer settings
|
|
18
|
+
"explorer.compactFolders": false,
|
|
19
|
+
"explorer.sortOrder": "default",
|
|
20
|
+
|
|
21
|
+
// Terminal settings
|
|
22
|
+
"terminal.integrated.defaultProfile.osx": "zsh",
|
|
23
|
+
|
|
24
|
+
// Git settings
|
|
25
|
+
"git.enableSmartCommit": true,
|
|
26
|
+
"git.confirmSync": false,
|
|
27
|
+
"git.autofetch": true,
|
|
28
|
+
|
|
29
|
+
// Search settings
|
|
30
|
+
"search.exclude": {
|
|
31
|
+
"**/node_modules": true,
|
|
32
|
+
"**/dist": true,
|
|
33
|
+
"**/coverage": true,
|
|
34
|
+
"**/.git": true,
|
|
35
|
+
"**/tmp": true
|
|
36
|
+
},
|
|
37
|
+
"[dockerfile]": {
|
|
38
|
+
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
|
|
39
|
+
}
|
|
40
|
+
}
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to NestJS MCP Server!
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Developer Environment & Project Structure
|
|
8
|
+
|
|
9
|
+
### 📁 Project Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
.
|
|
13
|
+
├── src/ # Core library source code
|
|
14
|
+
│ ├── mcp.module.ts # Main NestJS module for MCP integration
|
|
15
|
+
│ ├── mcp.service.ts # MCP server service wrapper
|
|
16
|
+
│ ├── mcp.controller.ts # HTTP/SSE controller for MCP endpoints
|
|
17
|
+
│ └── registry/ # Discovery, logger, and registry utilities
|
|
18
|
+
├── examples/ # Example MCP servers (resources, tools, prompts, mixed)
|
|
19
|
+
│ └── ... # Each with its own app.module.ts and service
|
|
20
|
+
├── test/ # Unit and integration tests
|
|
21
|
+
├── .devcontainer/ # Devcontainer configs for VS Code & Codespaces
|
|
22
|
+
├── package.json # Project scripts and dependencies
|
|
23
|
+
├── tsconfig.json # TypeScript configuration
|
|
24
|
+
├── eslint.config.mjs # ESLint configuration
|
|
25
|
+
└── README.md # Project documentation
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### 🚀 Setup
|
|
31
|
+
|
|
32
|
+
#### In the Cloud: Codespaces
|
|
33
|
+
|
|
34
|
+
1. Click the **Open in GitHub Codespaces** badge or button in the repo.
|
|
35
|
+
2. Wait for the environment to initialize (Node.js, PNPM, NestJS CLI, etc. are pre-installed).
|
|
36
|
+
3. Start developing immediately in your browser or VS Code.
|
|
37
|
+
|
|
38
|
+
#### Locally: DevContainers
|
|
39
|
+
|
|
40
|
+
1. Clone the repository:
|
|
41
|
+
```sh
|
|
42
|
+
git clone https://github.com/adrian-d-hidalgo/nestjs-mcp-server.git
|
|
43
|
+
cd nestjs-mcp-server
|
|
44
|
+
```
|
|
45
|
+
2. Install [Docker](https://www.docker.com/) and [VS Code](https://code.visualstudio.com/).
|
|
46
|
+
3. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
|
|
47
|
+
4. Open the project folder in VS Code.
|
|
48
|
+
5. Open the Command Palette:
|
|
49
|
+
- On **Windows/Linux**: `Ctrl+Shift+P`
|
|
50
|
+
- On **macOS**: `Cmd+Shift+P`
|
|
51
|
+
- Search for and select: `Dev Containers: Open Folder in Container`
|
|
52
|
+
6. Wait for the container to build and initialize.
|
|
53
|
+
7. Develop with all tools pre-installed and configured.
|
|
54
|
+
|
|
55
|
+
##### Working with Git & GitHub CLI in DevContainers
|
|
56
|
+
|
|
57
|
+
- The DevContainer includes an up-to-date version of Git and the GitHub CLI (`gh`).
|
|
58
|
+
- Use all standard Git commands (`git status`, `git commit`, `git push`, etc.) in the integrated terminal.
|
|
59
|
+
- Use the GitHub CLI for advanced GitHub operations:
|
|
60
|
+
- Authenticate: `gh auth login`
|
|
61
|
+
- Create issues/PRs: `gh issue create`, `gh pr create`
|
|
62
|
+
- List PRs: `gh pr list`
|
|
63
|
+
- All Git operations are performed inside the container, ensuring a consistent environment.
|
|
64
|
+
|
|
65
|
+
#### Manual Setup (pnpm)
|
|
66
|
+
|
|
67
|
+
1. Install [Node.js](https://nodejs.org/) v22+ and [PNPM](https://pnpm.io/).
|
|
68
|
+
2. Clone the repository:
|
|
69
|
+
```sh
|
|
70
|
+
git clone https://github.com/adrian-d-hidalgo/nestjs-mcp-server.git
|
|
71
|
+
cd nestjs-mcp-server
|
|
72
|
+
```
|
|
73
|
+
3. Install dependencies:
|
|
74
|
+
```sh
|
|
75
|
+
pnpm install
|
|
76
|
+
# or
|
|
77
|
+
npm install
|
|
78
|
+
```
|
|
79
|
+
4. Run an example server:
|
|
80
|
+
```sh
|
|
81
|
+
pnpm start:resources
|
|
82
|
+
# or
|
|
83
|
+
pnpm start:tools
|
|
84
|
+
# or
|
|
85
|
+
pnpm start:prompts
|
|
86
|
+
```
|
|
87
|
+
5. The server will be available at [http://localhost:3000](http://localhost:3000).
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Running Examples
|
|
92
|
+
|
|
93
|
+
You can run the provided example servers to test and explore the MCP Server module integration:
|
|
94
|
+
|
|
95
|
+
- **Start the server:**
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
pnpm start:resources
|
|
99
|
+
# or
|
|
100
|
+
pnpm start:tools
|
|
101
|
+
# or
|
|
102
|
+
pnpm start:prompts
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The server will be available at [http://localhost:3000](http://localhost:3000).
|
|
106
|
+
|
|
107
|
+
- **Inspector Playground:**
|
|
108
|
+
Launch the MCP Inspector playground to interactively test and debug your MCP server examples:
|
|
109
|
+
```sh
|
|
110
|
+
pnpm start:inspector
|
|
111
|
+
```
|
|
112
|
+
This opens a UI tool (from `@modelcontextprotocol/inspector`) for exploring, invoking, and validating your MCP endpoints and server behavior in real time.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Reporting Issues
|
|
117
|
+
|
|
118
|
+
- Use the [GitHub issue tracker](https://github.com/adrian-d-hidalgo/nestjs-mcp-server/issues).
|
|
119
|
+
- Search existing issues before creating a new one.
|
|
120
|
+
- Provide clear reproduction steps, environment details, and error messages if applicable.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## How to Contribute
|
|
125
|
+
|
|
126
|
+
- **Open an Issue First:** Before submitting a pull request (PR), please [open an issue](https://github.com/adrian-d-hidalgo/nestjs-mcp-server/issues) to discuss your proposed change, bug, or feature. This helps us coordinate efforts and avoid duplicate work.
|
|
127
|
+
- Fork the repository and create your branch from `main`.
|
|
128
|
+
- Ensure compatibility with `@modelcontextprotocol/sdk` and follow project coding standards.
|
|
129
|
+
- Add or update tests as appropriate.
|
|
130
|
+
- Run `pnpm lint` and `pnpm test` before submitting.
|
|
131
|
+
- Submit a pull request with a clear description of your changes, referencing the related issue.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Signed Commits Requirement
|
|
136
|
+
|
|
137
|
+
All pull requests must use signed commits. Unsigned commits will not be accepted.
|
|
138
|
+
|
|
139
|
+
### Why Signed Commits?
|
|
140
|
+
|
|
141
|
+
Signed commits ensure that the author of each commit is authentic, helping to prevent impersonation and maintain the integrity of the codebase. This is required for all contributions.
|
|
142
|
+
|
|
143
|
+
### How to enable SSH commit signing
|
|
144
|
+
|
|
145
|
+
1. **Generate an SSH key if you do not have one:**
|
|
146
|
+
```sh
|
|
147
|
+
ssh-keygen -t ed25519 -C "your_email@example.com"
|
|
148
|
+
```
|
|
149
|
+
2. **Add your SSH key as a Signing Key in GitHub:**
|
|
150
|
+
- Go to **GitHub → Settings → SSH and GPG keys**
|
|
151
|
+
- Click **New SSH key**
|
|
152
|
+
- In the **Title** field, enter a descriptive name (e.g., "Personal Laptop")
|
|
153
|
+
- In the **Key type** dropdown, select **Signing Key** (not Authentication Key)
|
|
154
|
+
- In the **Key** field, paste your SSH public key (the contents of your `.pub` file)
|
|
155
|
+
- Click **Add SSH key**
|
|
156
|
+
- _Note: If you already added this key as an Authentication Key, you can add it again as a Signing Key, or use a different key for signing._
|
|
157
|
+
3. **Configure Git to sign commits with your SSH key:**
|
|
158
|
+
```sh
|
|
159
|
+
git config --global gpg.format ssh
|
|
160
|
+
git config --global user.signingkey ~/.ssh/id_ed25519.pub # Path to your SSH public key
|
|
161
|
+
git config --global commit.gpgsign true
|
|
162
|
+
```
|
|
163
|
+
4. **Make a commit and push.** GitHub should show your commit as "Verified".
|
|
164
|
+
|
|
165
|
+
For more details, see: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits-with-ssh-keys
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## How to Sign Commits
|
|
170
|
+
|
|
171
|
+
To sign a commit manually, use the `-S` flag:
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
git commit -S -m "your commit message here"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
To sign all commits automatically, you can configure Git to always sign commits. This can be set globally (for all repositories) or locally (for the current repository only):
|
|
178
|
+
|
|
179
|
+
- **Globally:**
|
|
180
|
+
```sh
|
|
181
|
+
git config --global commit.gpgsign true
|
|
182
|
+
```
|
|
183
|
+
- **Locally (recommended for this project):**
|
|
184
|
+
```sh
|
|
185
|
+
git config --local commit.gpgsign true
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
With this configuration, all future commits will be signed by default.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Troubleshooting: SSH Commit Signature Verification
|
|
193
|
+
|
|
194
|
+
If you encounter this error when verifying SSH-signed commits:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
error: gpg.ssh.allowedSignersFile needs to be configured and exist for SSH signature verification
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Git requires a file listing allowed signers (public keys) to verify SSH commit signatures.
|
|
201
|
+
|
|
202
|
+
### Solution
|
|
203
|
+
|
|
204
|
+
1. Create the allowed signers file:
|
|
205
|
+
```sh
|
|
206
|
+
mkdir -p ~/.config/git
|
|
207
|
+
touch ~/.config/git/allowed_signers
|
|
208
|
+
```
|
|
209
|
+
2. Add your public SSH key to the file:
|
|
210
|
+
```sh
|
|
211
|
+
echo "your_email@example.com $(cat ~/.ssh/id_ed25519.pub)" >> ~/.config/git/allowed_signers
|
|
212
|
+
```
|
|
213
|
+
> Replace the email and key path if needed.
|
|
214
|
+
3. Configure Git to use this file:
|
|
215
|
+
```sh
|
|
216
|
+
git config --global gpg.ssh.allowedSignersFile ~/.config/git/allowed_signers
|
|
217
|
+
```
|
|
218
|
+
4. Verify signature verification works:
|
|
219
|
+
```sh
|
|
220
|
+
git log --show-signature
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Now Git will be able to verify SSH-signed commits using the allowed signers file.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Pull Request Guidelines
|
|
228
|
+
|
|
229
|
+
- Follow the existing code style and linting rules
|
|
230
|
+
- Include tests for new functionality
|
|
231
|
+
- Update documentation as needed
|
|
232
|
+
- Keep changes focused and atomic
|
|
233
|
+
- Provide a clear description of changes
|
|
234
|
+
- For more details, see the [handbook](.handbook/) (if available)
|
|
235
|
+
|
|
236
|
+
## Development Workflow
|
|
237
|
+
|
|
238
|
+
- All feature branches should be created from `main`.
|
|
239
|
+
- Pull requests should target the `develop` branch.
|
|
240
|
+
- The `develop` branch contains the latest (potentially unstable) changes.
|
|
241
|
+
- The `main` branch contains the latest stable release.
|
|
242
|
+
- For detailed information on our Git workflow and commit guidelines, please refer to `.handbook/git-guidelines.md`.
|
|
243
|
+
|
|
244
|
+
## Testing
|
|
245
|
+
|
|
246
|
+
- Ensure all tests pass before submitting your PR.
|
|
247
|
+
- Add new tests for new functionality.
|
|
248
|
+
- Update existing tests as needed for modified code.
|
|
249
|
+
|
|
250
|
+
## Reporting Issues
|
|
251
|
+
|
|
252
|
+
- Use [GitHub Issues](https://github.com/adrian-d-hidalgo/nestjs-mcp-server/issues) to report bugs or request features.
|
|
253
|
+
- Please provide as much detail as possible, including steps to reproduce and environment information.
|
|
254
|
+
|
|
255
|
+
## Code of Conduct
|
|
256
|
+
|
|
257
|
+
This project adheres to the [Contributor Covenant](https://www.contributor-covenant.org/). By participating, you are expected to uphold this code.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
We appreciate your help in making this project better!
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Adrián Darío Hidalgo Flores
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|