@moonbanking/mcp-server 0.5.6

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.
@@ -0,0 +1,137 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ inputs:
9
+ dry_run:
10
+ description: 'Run in dry-run mode (test without publishing)'
11
+ required: false
12
+ type: boolean
13
+ default: false
14
+
15
+ jobs:
16
+ publish:
17
+ name: Build and Publish to npm
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: read
21
+ id-token: write # Required for npm provenance
22
+ steps:
23
+ - name: Checkout code
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Setup Node.js
27
+ uses: actions/setup-node@v4
28
+ with:
29
+ node-version: '20'
30
+ registry-url: 'https://registry.npmjs.org'
31
+
32
+ - name: Get package version
33
+ id: package_version
34
+ run: |
35
+ VERSION=$(node -p "require('./package.json').version")
36
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
37
+ echo "๐Ÿ“ฆ Package version: $VERSION"
38
+
39
+ - name: Check if version already published
40
+ id: check_version
41
+ run: |
42
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
43
+ if npm view "$PACKAGE_NAME@${{ steps.package_version.outputs.version }}" version 2>/dev/null; then
44
+ echo "exists=true" >> $GITHUB_OUTPUT
45
+ echo "โš ๏ธ Version ${{ steps.package_version.outputs.version }} already published"
46
+ else
47
+ echo "exists=false" >> $GITHUB_OUTPUT
48
+ echo "โœ… Version ${{ steps.package_version.outputs.version }} not yet published"
49
+ fi
50
+
51
+ - name: Install dependencies
52
+ if: steps.check_version.outputs.exists == 'false'
53
+ run: npm install
54
+
55
+ - name: Build package
56
+ if: steps.check_version.outputs.exists == 'false'
57
+ run: npm run build
58
+
59
+ - name: Verify build output
60
+ if: steps.check_version.outputs.exists == 'false'
61
+ run: |
62
+ echo "๐Ÿ“ Checking dist/ directory:"
63
+ ls -la dist/
64
+ echo ""
65
+ echo "๐Ÿ“„ Main file exists:"
66
+ test -f dist/index.js && echo "โœ… dist/index.js found" || echo "โŒ dist/index.js missing"
67
+ test -f dist/index.d.ts && echo "โœ… dist/index.d.ts found" || echo "โŒ dist/index.d.ts missing"
68
+
69
+ - name: Publish to npm (dry-run)
70
+ if: |
71
+ steps.check_version.outputs.exists == 'false' &&
72
+ github.event_name == 'workflow_dispatch' &&
73
+ github.event.inputs.dry_run == 'true'
74
+ run: |
75
+ echo "๐Ÿงช Running in dry-run mode"
76
+ npm publish --dry-run --access public
77
+ env:
78
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79
+
80
+ - name: Publish to npm
81
+ if: |
82
+ steps.check_version.outputs.exists == 'false' &&
83
+ (github.event_name == 'push' || github.event.inputs.dry_run == 'false')
84
+ run: npm publish --provenance --access public
85
+ env:
86
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
87
+
88
+ - name: Create GitHub Release
89
+ if: |
90
+ steps.check_version.outputs.exists == 'false' &&
91
+ (github.event_name == 'push' || github.event.inputs.dry_run == 'false')
92
+ uses: actions/create-release@v1
93
+ env:
94
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95
+ with:
96
+ tag_name: v${{ steps.package_version.outputs.version }}
97
+ release_name: v${{ steps.package_version.outputs.version }}
98
+ body: |
99
+ ## @moonbanking/mcp-server v${{ steps.package_version.outputs.version }}
100
+
101
+ Published to npm: https://www.npmjs.com/package/@moonbanking/mcp-server/v/${{ steps.package_version.outputs.version }}
102
+
103
+ ### Installation
104
+ ```bash
105
+ npm install @moonbanking/mcp-server@${{ steps.package_version.outputs.version }}
106
+ ```
107
+
108
+ ### Usage
109
+ ```bash
110
+ npx @moonbanking/mcp
111
+ ```
112
+ draft: false
113
+ prerelease: ${{ contains(steps.package_version.outputs.version, '-') }}
114
+
115
+ - name: Summary
116
+ if: steps.check_version.outputs.exists == 'false'
117
+ run: |
118
+ echo "## ๐ŸŽ‰ Published Successfully!" >> $GITHUB_STEP_SUMMARY
119
+ echo "" >> $GITHUB_STEP_SUMMARY
120
+ echo "**Package:** @moonbanking/mcp-server" >> $GITHUB_STEP_SUMMARY
121
+ echo "**Version:** ${{ steps.package_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
122
+ echo "**npm URL:** https://www.npmjs.com/package/@moonbanking/mcp-server" >> $GITHUB_STEP_SUMMARY
123
+ echo "" >> $GITHUB_STEP_SUMMARY
124
+ echo "### Install" >> $GITHUB_STEP_SUMMARY
125
+ echo '```bash' >> $GITHUB_STEP_SUMMARY
126
+ echo "npm install @moonbanking/mcp-server@${{ steps.package_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
127
+ echo '```' >> $GITHUB_STEP_SUMMARY
128
+
129
+ - name: Skip publishing (already exists)
130
+ if: steps.check_version.outputs.exists == 'true'
131
+ run: |
132
+ echo "## โ„น๏ธ Version Already Published" >> $GITHUB_STEP_SUMMARY
133
+ echo "" >> $GITHUB_STEP_SUMMARY
134
+ echo "Version ${{ steps.package_version.outputs.version }} is already published to npm." >> $GITHUB_STEP_SUMMARY
135
+ echo "Skipping publish step." >> $GITHUB_STEP_SUMMARY
136
+ echo "" >> $GITHUB_STEP_SUMMARY
137
+ echo "**npm URL:** https://www.npmjs.com/package/@moonbanking/mcp-server" >> $GITHUB_STEP_SUMMARY
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @moonbanking/mcp-server
2
+
3
+ # Welcome to the Moon Banking API!
4
+
5
+ Enjoy the documentation and happy coding. Share this spec with your LLM of choice to speed up your development, or take a look at our MCP server and various SDKs.
6
+
7
+ ### More information
8
+
9
+ For more information about the Moon Banking API, please visit the [Moon Banking Documentation](https://docs.moonbanking.com).
10
+
11
+ This MCP server provides tools to interact with the Moon Banking API API based on OpenAPI specification version 2025-07-11.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @moonbanking/mcp-server
17
+ ```
18
+
19
+ Or use with npx:
20
+
21
+ ```bash
22
+ npx @moonbanking/mcp-server
23
+ ```
24
+
25
+ ## Configuration
26
+
27
+ ### Required Environment Variables
28
+
29
+ - `MOON_BANKING_API_KEY`: Your API key for authentication
30
+
31
+ ### Optional Environment Variables
32
+
33
+ - `MOON_BANKING_INTERNAL_BASE_URL`: Custom base URL (defaults to https://api.moonbanking.com/v1)
34
+
35
+ ## Usage
36
+
37
+ ### With MCP Client
38
+
39
+ Add to your MCP client configuration:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "mcp-server": {
45
+ "command": "npx",
46
+ "args": ["-y", "@moonbanking/mcp-server"],
47
+ "env": {
48
+ "MOON_BANKING_API_KEY": "your-api-key-here",
49
+ "MOON_BANKING_INTERNAL_BASE_URL": "https://api.moonbanking.com/v1"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ### Filter Specific Tools
57
+
58
+ You can limit which tools are exposed by using the `--tool` flag:
59
+
60
+ ```bash
61
+ npx @moonbanking/mcp-server --tool=tool1 --tool=tool2
62
+ ```
63
+
64
+ ## Available Tools
65
+
66
+ - `bank-get`: This endpoint allows you to retrieve a paginated list of all banks. By default, a maximum of ten banks are shown per page. You can search banks by name, filter by country and description (including null/not_null status or semantic content search using vector embeddings), sort them by various fields, and include related data like scores and country information. When searching description content, results are ordered by semantic similarity.
67
+ - `bank-getById`: This endpoint allows you to retrieve a specific bank by providing the bank ID. You can include related data like scores and country information in the response.
68
+ - `bankVote-get`: This endpoint allows you to retrieve a paginated list of bank votes. You can filter by bank ID, category, country, vote type (upvote or downvote), and other parameters.
69
+ - `country-get`: This endpoint allows you to retrieve a paginated list of all countries. By default, a maximum of ten countries are shown per page. You can search countries by name or 2-letter code, sort them by various fields, and include related data like scores.
70
+ - `country-getByCountryCode`: This endpoint allows you to retrieve a specific country by providing the 2-letter ISO country code. You can include related data like scores in the response.
71
+ - `story-get`: This endpoint allows you to retrieve a paginated list of all stories. By default, a maximum of ten stories are shown per page. You can search stories by text content, filter by bank ID, sort them by various fields, and include related data like bank and country information.
72
+ - `story-getById`: This endpoint allows you to retrieve a specific story by providing the story ID. You can include related data like bank and country information in the response.
73
+ - `world-getOverview`: This endpoint allows you to retrieve global overview data that aggregates banks votes, stories and other data across all banks in all countries. You can include related data like scores in the response.
74
+
75
+ ## License
76
+
77
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}