@ananay-nag/mcp-decorators 2.0.0 → 2.0.1
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 +7 -7
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ export class MyMCPServer extends Server {
|
|
|
99
99
|
```typescript
|
|
100
100
|
import { UseServer } from "@ananay-nag/mcp-decorators";
|
|
101
101
|
|
|
102
|
-
@UseServer({ name: "my-mcp-server", version: "2.0.
|
|
102
|
+
@UseServer({ name: "my-mcp-server", version: "2.0.1" })
|
|
103
103
|
export class DbHandlers {
|
|
104
104
|
server: any; // Injected server instance
|
|
105
105
|
}
|
|
@@ -283,7 +283,7 @@ export class MyMCPServer extends Server {
|
|
|
283
283
|
import { UseServer, Tool, Resource, ResourceTemplate } from "@ananay-nag/mcp-decorators";
|
|
284
284
|
import { z } from "zod";
|
|
285
285
|
|
|
286
|
-
@UseServer({ name: "my-database-mcp", version: "2.0.
|
|
286
|
+
@UseServer({ name: "my-database-mcp", version: "2.0.1" })
|
|
287
287
|
export class DbHandlers {
|
|
288
288
|
server: any; // Injected instance
|
|
289
289
|
|
|
@@ -332,7 +332,7 @@ import { DbHandlers } from "./dbHandlers.js";
|
|
|
332
332
|
async function main() {
|
|
333
333
|
// 1. Create registered server instance
|
|
334
334
|
const server = new MyMCPServer(
|
|
335
|
-
{ name: "my-database-mcp", version: "2.0.
|
|
335
|
+
{ name: "my-database-mcp", version: "2.0.1" },
|
|
336
336
|
{ capabilities: {} }
|
|
337
337
|
);
|
|
338
338
|
|
|
@@ -447,7 +447,7 @@ export class MyMCPClient extends Client {}
|
|
|
447
447
|
```typescript
|
|
448
448
|
import { UseClient, CallTool, ListTools, ReadResource, NotificationHandler } from "@ananay-nag/mcp-decorators";
|
|
449
449
|
|
|
450
|
-
@UseClient({ name: "my-mcp-client", version: "2.0.
|
|
450
|
+
@UseClient({ name: "my-mcp-client", version: "2.0.1" })
|
|
451
451
|
export class ClientController {
|
|
452
452
|
client: any; // Injected instance
|
|
453
453
|
|
|
@@ -481,7 +481,7 @@ import { ClientController } from "./service.js";
|
|
|
481
481
|
|
|
482
482
|
async function runClient() {
|
|
483
483
|
const client = new MyMCPClient(
|
|
484
|
-
{ name: "my-mcp-client", version: "2.0.
|
|
484
|
+
{ name: "my-mcp-client", version: "2.0.1" },
|
|
485
485
|
{ capabilities: {} }
|
|
486
486
|
);
|
|
487
487
|
|
|
@@ -561,7 +561,7 @@ Fetch a registered server instance programmatically.
|
|
|
561
561
|
```typescript
|
|
562
562
|
import { getServer } from "@ananay-nag/mcp-decorators";
|
|
563
563
|
|
|
564
|
-
const server = getServer({ name: "my-database-mcp", version: "2.0.
|
|
564
|
+
const server = getServer({ name: "my-database-mcp", version: "2.0.1" });
|
|
565
565
|
```
|
|
566
566
|
|
|
567
567
|
#### 6. `getClient(options)`
|
|
@@ -569,7 +569,7 @@ Fetch a registered client instance programmatically.
|
|
|
569
569
|
```typescript
|
|
570
570
|
import { getClient } from "@ananay-nag/mcp-decorators";
|
|
571
571
|
|
|
572
|
-
const client = getClient({ name: "my-mcp-client", version: "2.0.
|
|
572
|
+
const client = getClient({ name: "my-mcp-client", version: "2.0.1" });
|
|
573
573
|
```
|
|
574
574
|
|
|
575
575
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ananay-nag/mcp-decorators",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Model Context Protocol implementation for TypeScript with decorators",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
-
"banner.svg"
|
|
24
|
+
"banner.svg",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
25
27
|
],
|
|
26
28
|
"scripts": {
|
|
27
29
|
"build:esm": "mkdir -p dist/esm && echo '{\"type\": \"module\"}' > dist/esm/package.json && tsc -p tsconfig.prod.json",
|