@kya-os/mcp-i 0.1.0-alpha.2.2 → 0.1.0-alpha.2.3
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/README.md +271 -47
- package/dist/index.d.ts +63 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +298 -55
- package/dist/index.js.map +1 -1
- package/dist/registry/cursor.d.ts +25 -0
- package/dist/registry/cursor.d.ts.map +1 -0
- package/dist/registry/cursor.js +108 -0
- package/dist/registry/cursor.js.map +1 -0
- package/dist/registry/glama.d.ts +25 -0
- package/dist/registry/glama.d.ts.map +1 -0
- package/dist/registry/glama.js +111 -0
- package/dist/registry/glama.js.map +1 -0
- package/dist/registry/index.d.ts +43 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +96 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/knowthat.d.ts +28 -0
- package/dist/registry/knowthat.d.ts.map +1 -0
- package/dist/registry/knowthat.js +113 -0
- package/dist/registry/knowthat.js.map +1 -0
- package/dist/registry/smithery.d.ts +29 -0
- package/dist/registry/smithery.d.ts.map +1 -0
- package/dist/registry/smithery.js +119 -0
- package/dist/registry/smithery.js.map +1 -0
- package/dist/types.d.ts +91 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +22 -4
- package/dist/auto-enhance.d.ts +0 -41
- package/dist/auto-enhance.d.ts.map +0 -1
- package/dist/auto-enhance.js +0 -193
- package/dist/auto-enhance.js.map +0 -1
- package/dist/auto-init.d.ts +0 -12
- package/dist/auto-init.d.ts.map +0 -1
- package/dist/auto-init.js +0 -166
- package/dist/auto-init.js.map +0 -1
- package/dist/patch.d.ts +0 -22
- package/dist/patch.d.ts.map +0 -1
- package/dist/patch.js +0 -164
- package/dist/patch.js.map +0 -1
- package/dist/transparent.d.ts +0 -40
- package/dist/transparent.d.ts.map +0 -1
- package/dist/transparent.js +0 -167
- package/dist/transparent.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
# @kya-os/mcp-i
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Give your MCP server a decentralized identity (DID) in 2 lines of code. Build reputation, enable discovery, and future-proof your agent for the emerging identity ecosystem.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@kya-os/mcp-i)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://modelcontextprotocol-identity.io)
|
|
8
|
+
|
|
9
|
+
## Why Your MCP Server Needs This
|
|
10
|
+
|
|
11
|
+
**For MCP Server Developers:**
|
|
12
|
+
|
|
13
|
+
- 🆔 **Get a DID** - Your server gets a permanent, cryptographic identity
|
|
14
|
+
- 📈 **Build Reputation** - Every interaction is signed and verifiable
|
|
15
|
+
- 🔍 **Automatic Discovery** - Listed on registries as they adopt MCP-I
|
|
16
|
+
- 🔮 **Future-Proof** - Ready for the decentralized agent ecosystem
|
|
17
|
+
|
|
18
|
+
**For Directory Maintainers:**
|
|
19
|
+
|
|
20
|
+
- 🔌 **Easy Integration** - Become an MCP-I registry with our SDK
|
|
21
|
+
- ✅ **Verified Agents** - Only list agents with cryptographic proof
|
|
22
|
+
- 🌐 **Join the Standard** - Be part of the emerging identity layer
|
|
4
23
|
|
|
5
24
|
## The Vision
|
|
6
25
|
|
|
7
|
-
|
|
26
|
+
Your AI agent needs identity to:
|
|
27
|
+
|
|
28
|
+
- **Prove who it is** to other services (authentication)
|
|
29
|
+
- **Be discovered** by users and other agents (visibility)
|
|
30
|
+
- **Build reputation** through verified interactions (trust)
|
|
31
|
+
- **Access APIs** that require identity verification (capability)
|
|
32
|
+
|
|
33
|
+
## 🚨 IMPORTANT: API Call Behavior
|
|
34
|
+
|
|
35
|
+
**This package is designed to be spam-free:**
|
|
36
|
+
|
|
37
|
+
- **First run only**: API calls happen ONLY on first initialization
|
|
38
|
+
- **Persistent identity**: After first run, loads from disk with ZERO API calls
|
|
39
|
+
- **No spam on restarts**: Restart your server 1000 times = still zero API calls
|
|
40
|
+
- **Rate limited**: Built-in protection against accidental registry spam
|
|
41
|
+
|
|
42
|
+
[Read the full API behavior guide →](./API_BEHAVIOR.md)
|
|
8
43
|
|
|
9
44
|
## Installation
|
|
10
45
|
|
|
@@ -12,86 +47,275 @@ Make MCP-I adoption a no-brainer for the hundreds of thousands of MCP servers. Z
|
|
|
12
47
|
npm install @kya-os/mcp-i
|
|
13
48
|
```
|
|
14
49
|
|
|
15
|
-
##
|
|
50
|
+
## Quick Start
|
|
16
51
|
|
|
17
|
-
###
|
|
52
|
+
### 1. Zero Configuration (Recommended)
|
|
18
53
|
|
|
19
54
|
```typescript
|
|
20
|
-
import "@kya-os/mcp-i/auto";
|
|
55
|
+
import "@kya-os/mcp-i/auto";
|
|
56
|
+
// That's it! Your server now has cryptographic identity
|
|
21
57
|
```
|
|
22
58
|
|
|
23
|
-
###
|
|
59
|
+
### 2. With Configuration
|
|
24
60
|
|
|
25
61
|
```typescript
|
|
26
62
|
import { enableMCPIdentity } from "@kya-os/mcp-i";
|
|
27
63
|
|
|
28
64
|
await enableMCPIdentity({
|
|
29
|
-
name: "Calendar
|
|
30
|
-
description: "
|
|
31
|
-
repository: "https://github.com/
|
|
65
|
+
name: "Calendar Assistant",
|
|
66
|
+
description: "AI agent for professional calendar management",
|
|
67
|
+
repository: "https://github.com/your-org/calendar-assistant",
|
|
32
68
|
});
|
|
33
69
|
```
|
|
34
70
|
|
|
35
|
-
##
|
|
71
|
+
## Current State & Roadmap
|
|
72
|
+
|
|
73
|
+
**Today:**
|
|
36
74
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
- ✅ Your MCP server gets a DID (decentralized identifier)
|
|
76
|
+
- ✅ Every response is cryptographically signed
|
|
77
|
+
- ✅ Registered on KnowThat.ai registry
|
|
78
|
+
- ✅ Full MCP-I Level 2 conformance
|
|
79
|
+
|
|
80
|
+
**Coming Soon:**
|
|
81
|
+
|
|
82
|
+
- 🔜 Additional registry support as directories adopt MCP-I
|
|
83
|
+
- 🔜 Cross-registry reputation aggregation
|
|
84
|
+
- 🔜 Enhanced discovery features
|
|
85
|
+
- 🔜 Agent-to-agent secure communication
|
|
86
|
+
|
|
87
|
+
## What Happens Under the Hood
|
|
88
|
+
|
|
89
|
+
When you import this package:
|
|
90
|
+
|
|
91
|
+
1. **First Run Only**:
|
|
92
|
+
|
|
93
|
+
- Generates Ed25519 cryptographic keypair
|
|
94
|
+
- Registers with KnowThat.ai to obtain a DID
|
|
95
|
+
- Saves identity to `.mcp-identity.json`
|
|
96
|
+
- Total time: ~2 seconds
|
|
97
|
+
|
|
98
|
+
2. **Every Subsequent Run**:
|
|
99
|
+
|
|
100
|
+
- Loads existing identity from disk
|
|
101
|
+
- Zero API calls, instant startup
|
|
102
|
+
- Maintains the same DID forever
|
|
103
|
+
|
|
104
|
+
3. **During Operation**:
|
|
105
|
+
- Every response includes `_mcp_identity` field with cryptographic signature
|
|
106
|
+
- Handles MCP-I challenge-response authentication automatically
|
|
107
|
+
- Advertises identity capabilities to clients
|
|
42
108
|
|
|
43
109
|
## Example Response
|
|
44
110
|
|
|
111
|
+
After enabling MCP-I, all your server responses automatically include cryptographic signatures:
|
|
112
|
+
|
|
45
113
|
```json
|
|
46
114
|
{
|
|
47
|
-
"content": [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
115
|
+
"content": [
|
|
116
|
+
{
|
|
117
|
+
"type": "text",
|
|
118
|
+
"text": "Meeting scheduled for tomorrow at 2 PM"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
51
121
|
"_mcp_identity": {
|
|
52
|
-
"did": "did:web:knowthat.ai:agents:calendar-
|
|
122
|
+
"did": "did:web:knowthat.ai:agents:calendar-assistant",
|
|
53
123
|
"signature": "0x3045...",
|
|
54
|
-
"timestamp": "2025-01-
|
|
124
|
+
"timestamp": "2025-01-06T10:00:00Z",
|
|
55
125
|
"conformanceLevel": 2
|
|
56
126
|
}
|
|
57
127
|
}
|
|
58
128
|
```
|
|
59
129
|
|
|
60
|
-
##
|
|
130
|
+
## Advanced Configuration
|
|
61
131
|
|
|
62
|
-
|
|
63
|
-
- 🔝 **Priority Discovery** in search results
|
|
64
|
-
- 🔐 **Access to Identity-Aware APIs** with higher rate limits
|
|
65
|
-
- 📊 **Analytics & Reputation** tracking
|
|
66
|
-
- 🛡️ **Protection Against Impersonation**
|
|
132
|
+
### Registry Support (Future-Ready)
|
|
67
133
|
|
|
68
|
-
|
|
134
|
+
As more directories adopt MCP-I, your agent will automatically be discoverable across the ecosystem:
|
|
69
135
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
136
|
+
```typescript
|
|
137
|
+
await enableMCPIdentity({
|
|
138
|
+
name: "My Agent",
|
|
139
|
+
registries: "verified", // default
|
|
140
|
+
// Currently registers with KnowThat.ai
|
|
141
|
+
// Additional registries will be supported as they adopt MCP-I
|
|
142
|
+
});
|
|
143
|
+
```
|
|
75
144
|
|
|
76
|
-
|
|
145
|
+
**Note for Directory Maintainers:** Want to add your directory as a supported registry? [Contact us](https://github.com/orgs/modelcontextprotocol-identity/discussions/new?category=mcp-i-directories) to discuss integration.
|
|
77
146
|
|
|
78
|
-
|
|
147
|
+
### Custom DID Host
|
|
148
|
+
|
|
149
|
+
For enterprises who want to host their own DID:
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
await enableMCPIdentity({
|
|
153
|
+
name: "Enterprise Agent",
|
|
154
|
+
didHost: "company.com", // Creates did:web:company.com:agents:...
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Note: The Agent's did must discoverable via company.com/.well-known/did.json
|
|
159
|
+
|
|
160
|
+
### Edit Your Agent Profile
|
|
161
|
+
|
|
162
|
+
Only you can edit your agent's profile, thanks to cryptographic proof:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
const identity = await enableMCPIdentity();
|
|
166
|
+
|
|
167
|
+
// Get a signed edit URL
|
|
168
|
+
const editUrl = await identity.requestEditAccess();
|
|
169
|
+
console.log("Edit your agent at:", editUrl);
|
|
170
|
+
// https://knowthat.ai/agents/edit?did=...×tamp=...&signature=...
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Key Benefits
|
|
174
|
+
|
|
175
|
+
**Immediate Benefits:**
|
|
176
|
+
|
|
177
|
+
- 🛡️ **Cryptographic Identity**: Every response is signed with Ed25519
|
|
178
|
+
- 🆔 **Permanent DID**: Your agent gets a decentralized identifier that you control
|
|
179
|
+
- 🔐 **Impersonation Protection**: Nobody can pretend to be your agent
|
|
180
|
+
- ✅ **Verification Ready**: Cryptographic proof of authenticity
|
|
181
|
+
|
|
182
|
+
**Future Benefits (as ecosystem grows):**
|
|
183
|
+
|
|
184
|
+
- 🔍 **Multi-Registry Discovery**: Automatically listed as directories adopt MCP-I
|
|
185
|
+
- 📈 **Reputation Building**: Verifiable interaction history across platforms
|
|
186
|
+
- 🚀 **Priority Access**: Identity-aware APIs will offer higher rate limits
|
|
187
|
+
- 🏆 **Trust Badges**: Stand out as an early adopter of decentralized identity
|
|
188
|
+
|
|
189
|
+
## How MCP-I Works
|
|
190
|
+
|
|
191
|
+
```mermaid
|
|
192
|
+
sequenceDiagram
|
|
193
|
+
participant User
|
|
194
|
+
participant Client as AI Client
|
|
195
|
+
participant Agent as Your MCP Server
|
|
196
|
+
participant API as Protected API
|
|
197
|
+
|
|
198
|
+
User->>Client: "Book a meeting"
|
|
199
|
+
Client->>Agent: MCP request
|
|
200
|
+
Note over Agent: Signs response with private key
|
|
201
|
+
Agent->>Client: Response + _mcp_identity
|
|
202
|
+
Client->>API: Forward request with identity
|
|
203
|
+
API->>API: Verify signature
|
|
204
|
+
API->>Client: Authorized response
|
|
205
|
+
Client->>User: "Meeting booked!"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Files Created
|
|
209
|
+
|
|
210
|
+
After initialization, you'll see these files in your project root:
|
|
79
211
|
|
|
80
|
-
```bash
|
|
81
|
-
AGENT_DID="did:web:knowthat.ai:agents:your-agent"
|
|
82
|
-
AGENT_PUBLIC_KEY="base64-encoded-public-key"
|
|
83
|
-
AGENT_PRIVATE_KEY="base64-encoded-private-key"
|
|
84
|
-
AGENT_ID="uuid"
|
|
85
|
-
AGENT_SLUG="your-agent-slug"
|
|
86
212
|
```
|
|
213
|
+
.mcp-identity.json # Your agent's identity (⚠️ Contains private key!)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The file contains:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"did": "did:web:knowthat.ai:agents:your-agent",
|
|
221
|
+
"publicKey": "base64-encoded-public-key",
|
|
222
|
+
"privateKey": "base64-encoded-private-key", // Keep this secret!
|
|
223
|
+
"agentId": "uuid",
|
|
224
|
+
"agentSlug": "your-agent-slug",
|
|
225
|
+
"registeredAt": "2025-01-06T10:00:00Z",
|
|
226
|
+
"didHost": "knowthat.ai",
|
|
227
|
+
"registry": {
|
|
228
|
+
"name": "knowthat.ai",
|
|
229
|
+
"status": "active",
|
|
230
|
+
"url": "https://knowthat.ai/agents/your-agent-slug"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Security Best Practices
|
|
236
|
+
|
|
237
|
+
- 🔐 **Private keys never leave your server** - stored locally only
|
|
238
|
+
- ✍️ **Ed25519 signatures** - cryptographically secure
|
|
239
|
+
- 🛡️ **Replay protection** - timestamps and nonces prevent attacks
|
|
240
|
+
- 🔑 **Add `.mcp-identity.json` to .gitignore** - contains private key!
|
|
241
|
+
|
|
242
|
+
## Troubleshooting
|
|
243
|
+
|
|
244
|
+
### "Rate limit exceeded"
|
|
245
|
+
|
|
246
|
+
- Wait 1 hour before retrying
|
|
247
|
+
- Each IP can register 10 agents/hour on KnowThat.ai
|
|
248
|
+
|
|
249
|
+
### Agent not showing as verified
|
|
250
|
+
|
|
251
|
+
- Verification can take up to 5 minutes
|
|
252
|
+
- Check https://knowthat.ai/agents/YOUR-AGENT-SLUG
|
|
253
|
+
|
|
254
|
+
### Lost your identity file?
|
|
255
|
+
|
|
256
|
+
- Unfortunately, DIDs cannot be recovered
|
|
257
|
+
- You'll need to create a new identity
|
|
258
|
+
- Previous registrations cannot be updated
|
|
87
259
|
|
|
88
|
-
##
|
|
260
|
+
## API Reference
|
|
261
|
+
|
|
262
|
+
### `enableMCPIdentity(options?)`
|
|
263
|
+
|
|
264
|
+
Main function to enable identity for your MCP server.
|
|
265
|
+
|
|
266
|
+
**Options:**
|
|
267
|
+
|
|
268
|
+
- `name` (string): Your agent's display name
|
|
269
|
+
- `description` (string): What your agent does
|
|
270
|
+
- `repository` (string): GitHub repo URL
|
|
271
|
+
- `didHost` (string): Custom DID host (default: "knowthat.ai")
|
|
272
|
+
|
|
273
|
+
**Returns:** `Promise<MCPIdentity>`
|
|
274
|
+
|
|
275
|
+
### `MCPIdentity` class
|
|
276
|
+
|
|
277
|
+
**Methods:**
|
|
278
|
+
|
|
279
|
+
- `sign(message)`: Sign a message with your private key
|
|
280
|
+
- `verify(message, signature)`: Verify a signature
|
|
281
|
+
- `respondToChallenge(challenge)`: Handle MCP-I authentication
|
|
282
|
+
- `signResponse(response)`: Add identity to any response
|
|
283
|
+
- `requestEditAccess()`: Get edit URL for your agent profile
|
|
284
|
+
- `getRegistryStatus()`: Check registration status
|
|
285
|
+
|
|
286
|
+
## FAQ
|
|
287
|
+
|
|
288
|
+
**Q: Is this package affiliated with Anthropic?**
|
|
289
|
+
A: No, this is a community package implementing the MCP-I specification.
|
|
290
|
+
|
|
291
|
+
**Q: Can I use this without MCP?**
|
|
292
|
+
A: Yes! The `MCPIdentity` class can be used standalone for any identity needs.
|
|
293
|
+
|
|
294
|
+
**Q: What happens if KnowThat.ai is down?**
|
|
295
|
+
A: After initial registration, your agent works offline. The DID is self-contained.
|
|
296
|
+
|
|
297
|
+
**Q: Can I change my agent's name later?**
|
|
298
|
+
A: Yes, use `requestEditAccess()` to get an edit URL with cryptographic proof.
|
|
299
|
+
|
|
300
|
+
**Q: Why only KnowThat.ai registry right now?**
|
|
301
|
+
A: We're building the ecosystem! As directories adopt MCP-I, your agent will automatically be discoverable across all of them.
|
|
302
|
+
|
|
303
|
+
**Q: I run a directory. How can I support MCP-I?**
|
|
304
|
+
A: [Contact us](https://github.com/kya-os/mcp-i/issues) to discuss integration. We're actively seeking directory partners.
|
|
305
|
+
|
|
306
|
+
**Q: Is this production-ready?**
|
|
307
|
+
A: Yes, but currently in beta. The API may change before 1.0.
|
|
308
|
+
|
|
309
|
+
## Join the Identity Revolution
|
|
310
|
+
|
|
311
|
+
**MCP Server Developers:** Give your server an identity today. Be discoverable, build reputation, and future-proof your agent for the emerging ecosystem.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
npm install @kya-os/mcp-i
|
|
315
|
+
```
|
|
89
316
|
|
|
90
|
-
|
|
91
|
-
- All responses are cryptographically signed with Ed25519
|
|
92
|
-
- Challenge-response prevents replay attacks
|
|
93
|
-
- Nonce tracking prevents reuse
|
|
317
|
+
**Directory Maintainers:** Want to be part of the decentralized identity ecosystem? MCP-I enables you to list only verified agents with cryptographic proof of identity. [Let's talk integration →](https://github.com/orgs/modelcontextprotocol-identity/discussions/new?category=mcp-i-directories)
|
|
94
318
|
|
|
95
319
|
## License
|
|
96
320
|
|
|
97
|
-
MIT
|
|
321
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -12,9 +12,18 @@
|
|
|
12
12
|
* import { enableMCPIdentity } from "@kya-os/mcp-i";
|
|
13
13
|
* await enableMCPIdentity({ name: "My Amazing Agent" });
|
|
14
14
|
* ```
|
|
15
|
+
*
|
|
16
|
+
* Future multi-registry support:
|
|
17
|
+
* ```typescript
|
|
18
|
+
* await enableMCPIdentity({
|
|
19
|
+
* name: "My Agent",
|
|
20
|
+
* // Additional registries will be supported as directories adopt MCP-I
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
15
23
|
*/
|
|
16
|
-
import { MCPIdentityOptions, Challenge, ChallengeResponse, MCPICapabilities, SignedResponse } from './types';
|
|
24
|
+
import { MCPIdentityOptions, Challenge, ChallengeResponse, MCPICapabilities, SignedResponse, RegistryStatus, RegistryName } from './types';
|
|
17
25
|
export * from './types';
|
|
26
|
+
export { RegistryFactory, REGISTRY_TIERS, resolveRegistries } from './registry';
|
|
18
27
|
export declare class MCPIdentity {
|
|
19
28
|
readonly did: string;
|
|
20
29
|
readonly publicKey: string;
|
|
@@ -23,11 +32,43 @@ export declare class MCPIdentity {
|
|
|
23
32
|
private enableNonceTracking;
|
|
24
33
|
private usedNonces;
|
|
25
34
|
private nonceCleanupInterval?;
|
|
35
|
+
readonly didHost: string;
|
|
36
|
+
private registries;
|
|
37
|
+
private registryAdapters;
|
|
26
38
|
private constructor();
|
|
27
39
|
/**
|
|
28
40
|
* Initialize MCP Identity - the main entry point
|
|
41
|
+
*
|
|
42
|
+
* IMPORTANT: This only makes API calls in these cases:
|
|
43
|
+
* 1. First time ever (no identity exists) - registers with all specified registries
|
|
44
|
+
* 2. Adding new registries to existing identity - only calls the new registries
|
|
45
|
+
*
|
|
46
|
+
* After initial registration, all subsequent calls load from disk with NO API calls.
|
|
29
47
|
*/
|
|
30
48
|
static init(options?: MCPIdentityOptions): Promise<MCPIdentity>;
|
|
49
|
+
/**
|
|
50
|
+
* Sync identity to additional registries
|
|
51
|
+
*
|
|
52
|
+
* RATE LIMITED: Each registry can only be synced once per minute to prevent spam.
|
|
53
|
+
* Skips registries that are already active.
|
|
54
|
+
*/
|
|
55
|
+
syncToRegistries(registryNames: RegistryName[]): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Add a new registry
|
|
58
|
+
*/
|
|
59
|
+
addRegistry(registryName: RegistryName): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Add multiple registries
|
|
62
|
+
*/
|
|
63
|
+
addRegistries(registryNames: RegistryName[]): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Get current registry status
|
|
66
|
+
*/
|
|
67
|
+
getRegistryStatus(): RegistryStatus[];
|
|
68
|
+
/**
|
|
69
|
+
* Check if registered with a specific registry
|
|
70
|
+
*/
|
|
71
|
+
isRegisteredWith(registryName: RegistryName): boolean;
|
|
31
72
|
/**
|
|
32
73
|
* Sign a message with the agent's private key using Ed25519
|
|
33
74
|
*/
|
|
@@ -52,6 +93,11 @@ export declare class MCPIdentity {
|
|
|
52
93
|
* Generate a new nonce for challenges
|
|
53
94
|
*/
|
|
54
95
|
static generateNonce(): string;
|
|
96
|
+
/**
|
|
97
|
+
* Request edit access to agent profile
|
|
98
|
+
* Returns a signed URL for editing the agent on the registry
|
|
99
|
+
*/
|
|
100
|
+
requestEditAccess(registryName?: string): Promise<string>;
|
|
55
101
|
/**
|
|
56
102
|
* Clean up old nonces periodically to prevent memory leaks
|
|
57
103
|
*/
|
|
@@ -60,6 +106,22 @@ export declare class MCPIdentity {
|
|
|
60
106
|
* Clean up resources
|
|
61
107
|
*/
|
|
62
108
|
destroy(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Helper to extract agent name from DID
|
|
111
|
+
*/
|
|
112
|
+
private extractAgentName;
|
|
113
|
+
/**
|
|
114
|
+
* Helper to extract agent ID
|
|
115
|
+
*/
|
|
116
|
+
private extractAgentId;
|
|
117
|
+
/**
|
|
118
|
+
* Helper to extract agent slug
|
|
119
|
+
*/
|
|
120
|
+
private extractAgentSlug;
|
|
121
|
+
/**
|
|
122
|
+
* Persist updated registry status
|
|
123
|
+
*/
|
|
124
|
+
private persistRegistryStatus;
|
|
63
125
|
}
|
|
64
126
|
/**
|
|
65
127
|
* Enable MCP Identity for any MCP server
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index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