fipsign-mcp 0.1.0__tar.gz
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.
- fipsign_mcp-0.1.0/LICENSE +21 -0
- fipsign_mcp-0.1.0/PKG-INFO +262 -0
- fipsign_mcp-0.1.0/README.md +234 -0
- fipsign_mcp-0.1.0/pyproject.toml +48 -0
- fipsign_mcp-0.1.0/setup.cfg +4 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp/__init__.py +11 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp/py.typed +0 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp/server.py +712 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/PKG-INFO +262 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/SOURCES.txt +12 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/dependency_links.txt +1 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/entry_points.txt +2 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/requires.txt +3 -0
- fipsign_mcp-0.1.0/src/fipsign_mcp.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FIPSign
|
|
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.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fipsign-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server for FIPSign — post-quantum signing via ML-DSA-65 (NIST FIPS 204)
|
|
5
|
+
Author-email: FIPSign <sdk@fipsign.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://fipsign.dev
|
|
8
|
+
Project-URL: Dashboard, https://app.fipsign.dev
|
|
9
|
+
Project-URL: Repository, https://github.com/fipsign/fipsign-mcp-python
|
|
10
|
+
Keywords: mcp,model-context-protocol,fipsign,post-quantum,ml-dsa,signing,cryptography,nist,fips-204
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Security :: Cryptography
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: mcp>=1.0.0
|
|
25
|
+
Requires-Dist: cryptography>=48.0.0
|
|
26
|
+
Requires-Dist: httpx>=0.24
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# fipsign-mcp
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/fipsign-mcp/)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
[](https://csrc.nist.gov/pubs/fips/204/final)
|
|
34
|
+
|
|
35
|
+
MCP server for [FIPSign](https://fipsign.dev) — post-quantum digital signing via **ML-DSA-65** (NIST FIPS 204).
|
|
36
|
+
|
|
37
|
+
Gives Claude Desktop, Claude Code, and any MCP-compatible AI agent full access to the FIPSign API without writing code: sign payloads, verify tokens, issue and revoke post-quantum certificates, manage webhooks, and monitor usage.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | Description | Token cost |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `fipsign_health` | Check service status | free |
|
|
46
|
+
| `fipsign_public_key` | Get the server's ML-DSA-65 public key | free |
|
|
47
|
+
| `fipsign_sign` | Sign any payload | 1 token |
|
|
48
|
+
| `fipsign_verify` | Verify a signed token | 1 token |
|
|
49
|
+
| `fipsign_revoke` | Permanently revoke a token | 1 token |
|
|
50
|
+
| `fipsign_usage` | Get token balance and usage history | free |
|
|
51
|
+
| `fipsign_generate_key_pair` | Generate an ML-DSA-65 key pair locally | free |
|
|
52
|
+
| `fipsign_ca_issue` | Issue a post-quantum certificate | 1 token |
|
|
53
|
+
| `fipsign_ca_revoke_cert` | Revoke a certificate | 1 token |
|
|
54
|
+
| `fipsign_ca_get_cert` | Get certificate status by ID | free |
|
|
55
|
+
| `fipsign_ca_get_crl` | Get the Certificate Revocation List | free |
|
|
56
|
+
| `fipsign_webhooks_register` | Register a webhook endpoint | free |
|
|
57
|
+
| `fipsign_webhooks_get` | Get current webhook config | free |
|
|
58
|
+
| `fipsign_webhooks_delete` | Delete webhook configuration | free |
|
|
59
|
+
| `fipsign_webhooks_test` | Send a test event to your webhook | free |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Prerequisites
|
|
64
|
+
|
|
65
|
+
1. Python 3.10 or later
|
|
66
|
+
2. A FIPSign account and API key — [create one free at app.fipsign.dev](https://app.fipsign.dev)
|
|
67
|
+
3. For CA tools: a CA created inside your project from the dashboard
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Local testing before publishing
|
|
72
|
+
|
|
73
|
+
### Level 1 — MCP Inspector (no Claude Desktop required)
|
|
74
|
+
|
|
75
|
+
The Inspector opens a browser UI where you can call each tool manually and inspect responses without Claude Desktop.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone https://github.com/fipsign/fipsign-mcp-python
|
|
79
|
+
cd fipsign-mcp-python
|
|
80
|
+
pip install -e .
|
|
81
|
+
export FIPSIGN_API_KEY=pqa_your_real_key
|
|
82
|
+
npx @modelcontextprotocol/inspector python -m fipsign_mcp.server
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Open the URL shown in the terminal (typically `http://localhost:5173`). Select a tool, fill in the parameters, and run it.
|
|
86
|
+
|
|
87
|
+
### Level 2 — Claude Desktop with local code (without publishing to PyPI)
|
|
88
|
+
|
|
89
|
+
Install in editable mode, then point Claude Desktop at the module:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Add to your `claude_desktop_config.json` (see path below):
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"fipsign": {
|
|
101
|
+
"command": "python",
|
|
102
|
+
"args": ["-m", "fipsign_mcp.server"],
|
|
103
|
+
"env": {
|
|
104
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Level 3 — Claude Desktop with published package (production)
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"mcpServers": {
|
|
116
|
+
"fipsign": {
|
|
117
|
+
"command": "uvx",
|
|
118
|
+
"args": ["fipsign-mcp"],
|
|
119
|
+
"env": {
|
|
120
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Or with pip-installed package:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"mcpServers": {
|
|
132
|
+
"fipsign": {
|
|
133
|
+
"command": "fipsign-mcp",
|
|
134
|
+
"env": {
|
|
135
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Installation for Claude Desktop
|
|
145
|
+
|
|
146
|
+
`claude_desktop_config.json` is located at:
|
|
147
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
148
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
149
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
150
|
+
|
|
151
|
+
Add the `fipsign` entry inside `mcpServers` (create the file if it doesn't exist):
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"fipsign": {
|
|
157
|
+
"command": "uvx",
|
|
158
|
+
"args": ["fipsign-mcp"],
|
|
159
|
+
"env": {
|
|
160
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Restart Claude Desktop after editing the config.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Installation for Claude Code
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
claude mcp add fipsign -- env FIPSIGN_API_KEY=pqa_your_real_key uvx fipsign-mcp
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Or manually in your project's `.claude/mcp.json`:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"mcpServers": {
|
|
182
|
+
"fipsign": {
|
|
183
|
+
"command": "uvx",
|
|
184
|
+
"args": ["fipsign-mcp"],
|
|
185
|
+
"env": {
|
|
186
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Environment variables
|
|
196
|
+
|
|
197
|
+
| Variable | Required | Default | Description |
|
|
198
|
+
|---|---|---|---|
|
|
199
|
+
| `FIPSIGN_API_KEY` | Yes (for most tools) | — | Your FIPSign API key. Format: `pqa_` + 64 lowercase hex chars. Get one at app.fipsign.dev. |
|
|
200
|
+
| `FIPSIGN_BASE_URL` | No | `https://api.fipsign.dev` | Override API base URL (useful for self-hosted instances or local dev). |
|
|
201
|
+
|
|
202
|
+
`fipsign_health`, `fipsign_public_key`, and `fipsign_generate_key_pair` work without an API key.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Key pair generation — Python vs JS SDK note
|
|
207
|
+
|
|
208
|
+
`fipsign_generate_key_pair` returns the `secretKey` as the **32-byte ML-DSA-65 seed** (base64), not the 4032-byte expanded key returned by the JS SDK's `generateKeyPair()`. The `publicKey` (1952 bytes) is identical in both SDKs and fully compatible with `fipsign_ca_issue`.
|
|
209
|
+
|
|
210
|
+
This difference only matters if you need to sign data locally on a Python device using the returned `secretKey`:
|
|
211
|
+
|
|
212
|
+
```python
|
|
213
|
+
from cryptography.hazmat.primitives.asymmetric.mldsa import MLDSA65PrivateKey
|
|
214
|
+
import base64
|
|
215
|
+
|
|
216
|
+
private_key = MLDSA65PrivateKey.from_seed_bytes(base64.b64decode(secret_key))
|
|
217
|
+
signature = private_key.sign(message)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Usage examples
|
|
223
|
+
|
|
224
|
+
Once configured, you can ask Claude:
|
|
225
|
+
|
|
226
|
+
**Signing:**
|
|
227
|
+
- *"Sign a token for user_123 with role admin that expires in 1 hour"*
|
|
228
|
+
- *"Verify this token: { payload: '...', signature: '...', algorithm: 'ML-DSA-65', issuedAt: 123 }"*
|
|
229
|
+
- *"Revoke this token because the user logged out"*
|
|
230
|
+
|
|
231
|
+
**Certificates:**
|
|
232
|
+
- *"Generate a key pair for a new IoT device"*
|
|
233
|
+
- *"Issue a certificate for device-serial-00123 using the public key I just generated, valid for 1 year"*
|
|
234
|
+
- *"Check the revocation status of cert_abc123"*
|
|
235
|
+
- *"Get the full CRL for our CA"*
|
|
236
|
+
- *"Revoke certificate cert_abc123 — device was reported stolen"*
|
|
237
|
+
|
|
238
|
+
**Monitoring:**
|
|
239
|
+
- *"How many tokens do I have left this month?"*
|
|
240
|
+
- *"Register a webhook at https://myapp.com/hooks/fipsign for limit.warning and limit.reached events"*
|
|
241
|
+
- *"Send a test event to my webhook"*
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Publishing to PyPI
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
pip install build twine
|
|
249
|
+
python -m build
|
|
250
|
+
twine upload dist/*
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Links
|
|
256
|
+
|
|
257
|
+
- Dashboard: [app.fipsign.dev](https://app.fipsign.dev)
|
|
258
|
+
- API status: [status.fipsign.dev](https://status.fipsign.dev)
|
|
259
|
+
- JS SDK: [npmjs.com/package/fipsign-sdk](https://www.npmjs.com/package/fipsign-sdk)
|
|
260
|
+
- Python SDK: [pypi.org/project/fipsign-sdk](https://pypi.org/project/fipsign-sdk/)
|
|
261
|
+
- TypeScript MCP: [npmjs.com/package/@fipsign/mcp](https://www.npmjs.com/package/@fipsign/mcp)
|
|
262
|
+
- NIST FIPS 204: [csrc.nist.gov/pubs/fips/204/final](https://csrc.nist.gov/pubs/fips/204/final)
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# fipsign-mcp
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/fipsign-mcp/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://csrc.nist.gov/pubs/fips/204/final)
|
|
6
|
+
|
|
7
|
+
MCP server for [FIPSign](https://fipsign.dev) — post-quantum digital signing via **ML-DSA-65** (NIST FIPS 204).
|
|
8
|
+
|
|
9
|
+
Gives Claude Desktop, Claude Code, and any MCP-compatible AI agent full access to the FIPSign API without writing code: sign payloads, verify tokens, issue and revoke post-quantum certificates, manage webhooks, and monitor usage.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | Description | Token cost |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `fipsign_health` | Check service status | free |
|
|
18
|
+
| `fipsign_public_key` | Get the server's ML-DSA-65 public key | free |
|
|
19
|
+
| `fipsign_sign` | Sign any payload | 1 token |
|
|
20
|
+
| `fipsign_verify` | Verify a signed token | 1 token |
|
|
21
|
+
| `fipsign_revoke` | Permanently revoke a token | 1 token |
|
|
22
|
+
| `fipsign_usage` | Get token balance and usage history | free |
|
|
23
|
+
| `fipsign_generate_key_pair` | Generate an ML-DSA-65 key pair locally | free |
|
|
24
|
+
| `fipsign_ca_issue` | Issue a post-quantum certificate | 1 token |
|
|
25
|
+
| `fipsign_ca_revoke_cert` | Revoke a certificate | 1 token |
|
|
26
|
+
| `fipsign_ca_get_cert` | Get certificate status by ID | free |
|
|
27
|
+
| `fipsign_ca_get_crl` | Get the Certificate Revocation List | free |
|
|
28
|
+
| `fipsign_webhooks_register` | Register a webhook endpoint | free |
|
|
29
|
+
| `fipsign_webhooks_get` | Get current webhook config | free |
|
|
30
|
+
| `fipsign_webhooks_delete` | Delete webhook configuration | free |
|
|
31
|
+
| `fipsign_webhooks_test` | Send a test event to your webhook | free |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
1. Python 3.10 or later
|
|
38
|
+
2. A FIPSign account and API key — [create one free at app.fipsign.dev](https://app.fipsign.dev)
|
|
39
|
+
3. For CA tools: a CA created inside your project from the dashboard
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Local testing before publishing
|
|
44
|
+
|
|
45
|
+
### Level 1 — MCP Inspector (no Claude Desktop required)
|
|
46
|
+
|
|
47
|
+
The Inspector opens a browser UI where you can call each tool manually and inspect responses without Claude Desktop.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/fipsign/fipsign-mcp-python
|
|
51
|
+
cd fipsign-mcp-python
|
|
52
|
+
pip install -e .
|
|
53
|
+
export FIPSIGN_API_KEY=pqa_your_real_key
|
|
54
|
+
npx @modelcontextprotocol/inspector python -m fipsign_mcp.server
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Open the URL shown in the terminal (typically `http://localhost:5173`). Select a tool, fill in the parameters, and run it.
|
|
58
|
+
|
|
59
|
+
### Level 2 — Claude Desktop with local code (without publishing to PyPI)
|
|
60
|
+
|
|
61
|
+
Install in editable mode, then point Claude Desktop at the module:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install -e .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Add to your `claude_desktop_config.json` (see path below):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"fipsign": {
|
|
73
|
+
"command": "python",
|
|
74
|
+
"args": ["-m", "fipsign_mcp.server"],
|
|
75
|
+
"env": {
|
|
76
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Level 3 — Claude Desktop with published package (production)
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcpServers": {
|
|
88
|
+
"fipsign": {
|
|
89
|
+
"command": "uvx",
|
|
90
|
+
"args": ["fipsign-mcp"],
|
|
91
|
+
"env": {
|
|
92
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Or with pip-installed package:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"fipsign": {
|
|
105
|
+
"command": "fipsign-mcp",
|
|
106
|
+
"env": {
|
|
107
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Installation for Claude Desktop
|
|
117
|
+
|
|
118
|
+
`claude_desktop_config.json` is located at:
|
|
119
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
120
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
121
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
122
|
+
|
|
123
|
+
Add the `fipsign` entry inside `mcpServers` (create the file if it doesn't exist):
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"mcpServers": {
|
|
128
|
+
"fipsign": {
|
|
129
|
+
"command": "uvx",
|
|
130
|
+
"args": ["fipsign-mcp"],
|
|
131
|
+
"env": {
|
|
132
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Restart Claude Desktop after editing the config.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Installation for Claude Code
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
claude mcp add fipsign -- env FIPSIGN_API_KEY=pqa_your_real_key uvx fipsign-mcp
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Or manually in your project's `.claude/mcp.json`:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"mcpServers": {
|
|
154
|
+
"fipsign": {
|
|
155
|
+
"command": "uvx",
|
|
156
|
+
"args": ["fipsign-mcp"],
|
|
157
|
+
"env": {
|
|
158
|
+
"FIPSIGN_API_KEY": "pqa_your_real_key"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Environment variables
|
|
168
|
+
|
|
169
|
+
| Variable | Required | Default | Description |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| `FIPSIGN_API_KEY` | Yes (for most tools) | — | Your FIPSign API key. Format: `pqa_` + 64 lowercase hex chars. Get one at app.fipsign.dev. |
|
|
172
|
+
| `FIPSIGN_BASE_URL` | No | `https://api.fipsign.dev` | Override API base URL (useful for self-hosted instances or local dev). |
|
|
173
|
+
|
|
174
|
+
`fipsign_health`, `fipsign_public_key`, and `fipsign_generate_key_pair` work without an API key.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Key pair generation — Python vs JS SDK note
|
|
179
|
+
|
|
180
|
+
`fipsign_generate_key_pair` returns the `secretKey` as the **32-byte ML-DSA-65 seed** (base64), not the 4032-byte expanded key returned by the JS SDK's `generateKeyPair()`. The `publicKey` (1952 bytes) is identical in both SDKs and fully compatible with `fipsign_ca_issue`.
|
|
181
|
+
|
|
182
|
+
This difference only matters if you need to sign data locally on a Python device using the returned `secretKey`:
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
from cryptography.hazmat.primitives.asymmetric.mldsa import MLDSA65PrivateKey
|
|
186
|
+
import base64
|
|
187
|
+
|
|
188
|
+
private_key = MLDSA65PrivateKey.from_seed_bytes(base64.b64decode(secret_key))
|
|
189
|
+
signature = private_key.sign(message)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Usage examples
|
|
195
|
+
|
|
196
|
+
Once configured, you can ask Claude:
|
|
197
|
+
|
|
198
|
+
**Signing:**
|
|
199
|
+
- *"Sign a token for user_123 with role admin that expires in 1 hour"*
|
|
200
|
+
- *"Verify this token: { payload: '...', signature: '...', algorithm: 'ML-DSA-65', issuedAt: 123 }"*
|
|
201
|
+
- *"Revoke this token because the user logged out"*
|
|
202
|
+
|
|
203
|
+
**Certificates:**
|
|
204
|
+
- *"Generate a key pair for a new IoT device"*
|
|
205
|
+
- *"Issue a certificate for device-serial-00123 using the public key I just generated, valid for 1 year"*
|
|
206
|
+
- *"Check the revocation status of cert_abc123"*
|
|
207
|
+
- *"Get the full CRL for our CA"*
|
|
208
|
+
- *"Revoke certificate cert_abc123 — device was reported stolen"*
|
|
209
|
+
|
|
210
|
+
**Monitoring:**
|
|
211
|
+
- *"How many tokens do I have left this month?"*
|
|
212
|
+
- *"Register a webhook at https://myapp.com/hooks/fipsign for limit.warning and limit.reached events"*
|
|
213
|
+
- *"Send a test event to my webhook"*
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Publishing to PyPI
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
pip install build twine
|
|
221
|
+
python -m build
|
|
222
|
+
twine upload dist/*
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Links
|
|
228
|
+
|
|
229
|
+
- Dashboard: [app.fipsign.dev](https://app.fipsign.dev)
|
|
230
|
+
- API status: [status.fipsign.dev](https://status.fipsign.dev)
|
|
231
|
+
- JS SDK: [npmjs.com/package/fipsign-sdk](https://www.npmjs.com/package/fipsign-sdk)
|
|
232
|
+
- Python SDK: [pypi.org/project/fipsign-sdk](https://pypi.org/project/fipsign-sdk/)
|
|
233
|
+
- TypeScript MCP: [npmjs.com/package/@fipsign/mcp](https://www.npmjs.com/package/@fipsign/mcp)
|
|
234
|
+
- NIST FIPS 204: [csrc.nist.gov/pubs/fips/204/final](https://csrc.nist.gov/pubs/fips/204/final)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fipsign-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server for FIPSign — post-quantum signing via ML-DSA-65 (NIST FIPS 204)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "FIPSign", email = "sdk@fipsign.dev" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"mcp", "model-context-protocol", "fipsign",
|
|
15
|
+
"post-quantum", "ml-dsa", "signing", "cryptography", "nist", "fips-204",
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: Security :: Cryptography",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
"Typing :: Typed",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"mcp>=1.0.0",
|
|
31
|
+
"cryptography>=48.0.0",
|
|
32
|
+
"httpx>=0.24",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
fipsign-mcp = "fipsign_mcp.server:main"
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Homepage = "https://fipsign.dev"
|
|
40
|
+
Dashboard = "https://app.fipsign.dev"
|
|
41
|
+
Repository = "https://github.com/fipsign/fipsign-mcp-python"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.packages.find]
|
|
44
|
+
where = ["src"]
|
|
45
|
+
include = ["fipsign_mcp*"]
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.package-data]
|
|
48
|
+
fipsign_mcp = ["py.typed"]
|
|
File without changes
|