Skip to content

Commit 6310155

Browse files
committed
Added architecture check to build
1 parent 8b19991 commit 6310155

2 files changed

Lines changed: 63 additions & 42 deletions

File tree

.github/workflows/build.yml

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,32 @@ jobs:
3131
artifact_name: whoismcp-server-macos-arm64
3232

3333
runs-on: ${{ matrix.os }}
34-
34+
3535
steps:
3636
- uses: actions/checkout@v4
37-
37+
3838
- name: Set up Python
3939
uses: actions/setup-python@v5
4040
with:
4141
python-version: '3.11'
42-
42+
4343
- name: Install uv
4444
uses: astral-sh/setup-uv@v5
4545
with:
4646
enable-cache: true
47-
47+
4848
- name: Install dependencies
4949
run: |
5050
uv pip install --system hatch pyinstaller
51-
51+
5252
- name: Install package dependencies
5353
run: |
5454
uv pip install --system -e .
55-
55+
5656
- name: Build with PyInstaller
5757
run: |
5858
pyinstaller whoismcp.spec
59-
59+
6060
- name: Rename binary
6161
shell: bash
6262
run: |
@@ -65,7 +65,28 @@ jobs:
6565
else
6666
mv dist/whoismcp-server dist/${{ matrix.artifact_name }}
6767
fi
68-
68+
69+
- name: Verify architecture
70+
if: startsWith(matrix.os, 'macos')
71+
shell: bash
72+
run: |
73+
echo "Verifying architecture for ${{ matrix.name }}..."
74+
if [ "${{ matrix.name }}" == "macos-x86_64" ]; then
75+
EXPECTED_ARCH="x86_64"
76+
elif [ "${{ matrix.name }}" == "macos-arm64" ]; then
77+
EXPECTED_ARCH="arm64"
78+
fi
79+
80+
ACTUAL_ARCH=$(lipo -archs dist/${{ matrix.artifact_name }} | tr -d ' ')
81+
echo "Expected: $EXPECTED_ARCH"
82+
echo "Actual: $ACTUAL_ARCH"
83+
84+
if [[ "$ACTUAL_ARCH" != "$EXPECTED_ARCH" ]]; then
85+
echo "ERROR: Architecture mismatch! Expected $EXPECTED_ARCH but built $ACTUAL_ARCH"
86+
exit 1
87+
fi
88+
echo "✓ Architecture verified correctly"
89+
6990
- name: Test binary
7091
shell: bash
7192
run: |
@@ -74,7 +95,7 @@ jobs:
7495
else
7596
dist/${{ matrix.artifact_name }} --help
7697
fi
77-
98+
7899
- name: Upload artifact
79100
uses: actions/upload-artifact@v4
80101
with:
@@ -86,18 +107,18 @@ jobs:
86107
needs: build
87108
runs-on: ubuntu-latest
88109
if: startsWith(github.ref, 'refs/tags/')
89-
110+
90111
permissions:
91112
contents: write
92-
113+
93114
steps:
94115
- uses: actions/checkout@v4
95-
116+
96117
- name: Download all artifacts
97118
uses: actions/download-artifact@v4
98119
with:
99120
path: dist/
100-
121+
101122
- name: Create Release
102123
uses: softprops/action-gh-release@v1
103124
with:
@@ -106,44 +127,44 @@ jobs:
106127
prerelease: false
107128
body: |
108129
# WhoisMCP Server Release
109-
130+
110131
## Installation
111-
132+
112133
### 🍎 macOS Users - Choose the Right Version!
113-
134+
114135
**Check your Mac type first:**
115136
```bash
116137
uname -m
117138
```
118-
139+
119140
- **Apple Silicon (M1/M2/M3)**: Download `whoismcp-server-macos-arm64`
120141
- **Intel Macs**: Download `whoismcp-server-macos-x86_64`
121-
142+
122143
⚠️ **Getting "bad CPU type" error?** You downloaded the wrong architecture!
123-
144+
124145
### 🪟 Windows Users
125-
146+
126147
Download `whoismcp-server-windows-x86_64.exe`
127-
148+
128149
### 🐧 Linux Users
129-
150+
130151
Download `whoismcp-server-linux-x86_64`
131-
152+
132153
## Setup Instructions
133-
154+
134155
1. Download the appropriate binary for your platform
135156
2. Make it executable (on macOS/Linux): `chmod +x whoismcp-server-*`
136157
3. Place it in a convenient location (e.g., `/usr/local/bin` or `~/bin`)
137-
158+
138159
## MCP Configuration
139-
160+
140161
Add the WhoisMCP server to your Claude Desktop configuration file:
141-
162+
142163
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
143164
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
144-
165+
145166
Edit the configuration file and add the following to the `mcpServers` object:
146-
167+
147168
```json
148169
{
149170
"mcpServers": {
@@ -156,16 +177,16 @@ jobs:
156177
}
157178
}
158179
```
159-
180+
160181
**Important**:
161182
- Replace `/path/to/whoismcp-server` with the actual path to your downloaded binary
162183
- If you have other MCP servers already configured, add the `"whoismcp"` entry after them (don't forget the comma before it)
163184
- On Windows, use forward slashes or escaped backslashes: `"C:/path/to/whoismcp-server.exe"` or `"C:\\path\\to\\whoismcp-server.exe"`
164-
185+
165186
## Environment Variables (Optional)
166-
187+
167188
You can customize the server behavior by adding environment variables to the `env` object:
168-
189+
169190
```json
170191
"whoismcp": {
171192
"command": "/path/to/whoismcp-server",
@@ -178,38 +199,38 @@ jobs:
178199
}
179200
}
180201
```
181-
202+
182203
Available environment variables:
183204
- `WHOIS_TIMEOUT`: Whois query timeout in seconds (default: 30)
184205
- `RDAP_TIMEOUT`: RDAP query timeout in seconds (default: 30)
185206
- `CACHE_TTL`: Cache time-to-live in seconds (default: 3600)
186207
- `CACHE_MAX_SIZE`: Maximum cache entries (default: 1000)
187208
- `LOG_LEVEL`: Logging level - DEBUG, INFO, WARNING, ERROR (default: INFO)
188-
209+
189210
## Verification
190-
211+
191212
After updating the configuration:
192213
1. Restart Claude Desktop
193214
2. Look for "whoismcp" in the MCP servers list
194215
3. Test with queries like:
195216
- "Look up the domain example.com"
196217
- "Get RDAP info for google.com"
197218
- "Check whois for IP 8.8.8.8"
198-
219+
199220
## Supported Platforms
200-
221+
201222
- **Linux**: x86_64
202223
- **macOS**: x86_64 (Intel) and arm64 (Apple Silicon)
203224
- **Windows**: x86_64
204-
225+
205226
## Troubleshooting
206-
227+
207228
If the server doesn't appear in Claude:
208229
1. Check that the binary path is correct in the config
209230
2. Ensure the binary has execute permissions (macOS/Linux)
210231
3. Check Claude's logs for any error messages
211232
4. Try running the binary directly to test: `./whoismcp-server --help`
212-
233+
213234
See the [README](https://github.com/${{ github.repository }}) for full documentation.
214235
env:
215236
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/whoismcp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using both traditional Whois and modern RDAP protocols.
66
"""
77

8-
__version__ = "0.3.6"
8+
__version__ = "0.3.7"
99
__author__ = "Whois MCP Server"
1010
__email__ = "server@example.com"
1111

0 commit comments

Comments
 (0)