shouldideploy-today-mcp-server 0.3.0
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/LICENSE +21 -0
- package/README.md +48 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +14 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leonardo Camargo
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
shouldideploy-today-mcp-server
|
|
2
|
+
================================
|
|
3
|
+
|
|
4
|
+
Simple MCP server that calls the public [`shouldideploy.today`](https://shouldideploy.today/) API to answer whether it is a good idea to deploy today.
|
|
5
|
+
|
|
6
|
+
### Requirements
|
|
7
|
+
|
|
8
|
+
- **Node.js** 18+ (20+ recommended)
|
|
9
|
+
- **npm** 9+
|
|
10
|
+
|
|
11
|
+
### Installation
|
|
12
|
+
|
|
13
|
+
In the project directory:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### How to run the MCP server
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The server uses **stdio** as the transport (MCP default). Typically you do not call it directly; instead, you register it in an MCP client (such as Cursor, Claude Desktop, etc.).
|
|
26
|
+
|
|
27
|
+
### Available tool
|
|
28
|
+
|
|
29
|
+
- **Name**: `shouldideploy_today`
|
|
30
|
+
- **Description**: Calls the `shouldideploy.today` API to check if it is a good idea to deploy today.
|
|
31
|
+
- **Input (JSON)**:
|
|
32
|
+
- `tz` *(string, optional)*: IANA timezone, for example `America/Sao_Paulo` or `UTC`. Default: `UTC`.
|
|
33
|
+
- `lang` *(string, optional)*: response language, for example `en`. Default: `en`.
|
|
34
|
+
- **Output**: plain text returned by the API, for example something like “Yes, you should deploy today” or “No, you should not deploy today”.
|
|
35
|
+
|
|
36
|
+
### How it works
|
|
37
|
+
|
|
38
|
+
- The server is implemented in `index.ts` using `@modelcontextprotocol/sdk`:
|
|
39
|
+
- Creates an `McpServer` named `shouldideploy-today-mcp-server`.
|
|
40
|
+
- Exposes the `shouldideploy_today` tool.
|
|
41
|
+
- Builds the API URL using `URL` and `searchParams`:
|
|
42
|
+
- Base: `https://shouldideploy.today/api`
|
|
43
|
+
- Query params: `tz` and `lang`
|
|
44
|
+
- Performs an HTTP `fetch`, reads the body as text and returns it as the MCP response.
|
|
45
|
+
|
|
46
|
+
### License
|
|
47
|
+
|
|
48
|
+
This project is distributed under the MIT license. See `LICENSE` for more details.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type APIParams = {
|
|
2
|
+
tz?: string;
|
|
3
|
+
lang?: string;
|
|
4
|
+
};
|
|
5
|
+
export type APIResponse = {
|
|
6
|
+
timezone: string;
|
|
7
|
+
date: string;
|
|
8
|
+
shouldideploy: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function makeRequest({ tz, lang }: APIParams): Promise<APIResponse | null>;
|
|
12
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,wBAAsB,WAAW,CAAC,EAAE,EAAU,EAAE,IAAW,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAiBrG"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export async function makeRequest({ tz = 'UTC', lang = 'en' }) {
|
|
2
|
+
const url = new URL("https://shouldideploy.today/api");
|
|
3
|
+
url.searchParams.set("tz", tz);
|
|
4
|
+
url.searchParams.set("lang", lang);
|
|
5
|
+
try {
|
|
6
|
+
const response = await fetch(url.toString());
|
|
7
|
+
if (response.ok)
|
|
8
|
+
return await response.json();
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
catch (err) {
|
|
12
|
+
throw new Error(err.message);
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { makeRequest } from './client.js';
|
|
6
|
+
const server = new McpServer({
|
|
7
|
+
name: 'shouldideploy-today-mcp-server',
|
|
8
|
+
version: '1.0.0',
|
|
9
|
+
});
|
|
10
|
+
server.registerTool('shouldideploy_today', {
|
|
11
|
+
description: 'Returns a FINAL, short and funny message to the user about whether they should deploy right now. The model MUST respond ONLY with the returned text, with no extra words or formatting.',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
tz: z.string().optional().describe('IANA timezone (e.g., America/Sao_Paulo, UTC). If omitted, UTC is used.'),
|
|
14
|
+
lang: z.string().optional().describe('Response language (e.g., en, el). If omitted, en is used.'),
|
|
15
|
+
}
|
|
16
|
+
}, async (params) => {
|
|
17
|
+
const result = await makeRequest(params);
|
|
18
|
+
if (!result) {
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: 'Failed to retrieve alerts data',
|
|
24
|
+
isError: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const text = formatResult(result);
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{ type: 'text', text }
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
function formatResult(apiResponse) {
|
|
37
|
+
return apiResponse.message;
|
|
38
|
+
}
|
|
39
|
+
async function main() {
|
|
40
|
+
const transport = new StdioServerTransport();
|
|
41
|
+
await server.connect(transport);
|
|
42
|
+
console.error('Should I Deploy Today MCP Server running on stdio');
|
|
43
|
+
}
|
|
44
|
+
main().catch((err) => {
|
|
45
|
+
console.error('Error starting MCP server:', err);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shouldideploy-today-mcp-server",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Simple MCP server that calls the shouldideploy.today API to tell you whether you should deploy today.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"shouldideploy-today-mcp-server": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mcp-server",
|
|
10
|
+
"shouldideploytoday"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/leonardorcamargo/shouldideploy-today-mcp-server#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/leonardorcamargo/shouldideploy-today-mcp-server/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/leonardorcamargo/shouldideploy-today-mcp-server.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Leonardo Camargo",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "dist/index.js",
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc && chmod 755 dist/index.js",
|
|
30
|
+
"start": "npm run build && node dist/index.js",
|
|
31
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
32
|
+
"prepublishOnly": "npm test && npm run build"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
42
|
+
"zod": "^3.25.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/jest": "^30.0.0",
|
|
46
|
+
"@types/node": "^24.10.9",
|
|
47
|
+
"jest": "^30.2.0",
|
|
48
|
+
"ts-jest": "^29.4.6",
|
|
49
|
+
"typescript": "^5.7.2"
|
|
50
|
+
}
|
|
51
|
+
}
|