@openmrp/sdk-mcp 0.19.3 → 0.19.5
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/LICENSE +1 -1
- package/README.md +7 -7
- package/code-tool-worker.js +4 -4
- package/code-tool-worker.mjs +5 -5
- package/code-tool.js +2 -2
- package/code-tool.mjs +2 -2
- package/package.json +4 -4
- package/server.js +2 -2
- package/server.mjs +4 -4
- package/src/code-tool-worker.ts +5 -5
- package/src/code-tool.ts +2 -2
- package/src/server.ts +7 -7
- package/src/types.ts +2 -2
- package/types.d.mts +2 -2
- package/types.d.ts +2 -2
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2026
|
|
189
|
+
Copyright 2026 Openmrp
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Openmrp TypeScript MCP Server
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ You can run the MCP Server directly via `npx`:
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
export OPENMRP_API_KEY="My Bearer Token"
|
|
11
|
-
export OPENMRP_OPENMRP_ACCOUNT_ID="My
|
|
11
|
+
export OPENMRP_OPENMRP_ACCOUNT_ID="My Openmrp Account ID"
|
|
12
12
|
export OPENMRP_ENVIRONMENT="production"
|
|
13
13
|
npx -y @openmrp/sdk-mcp@latest
|
|
14
14
|
```
|
|
@@ -28,7 +28,7 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
28
28
|
"args": ["-y", "@openmrp/sdk-mcp"],
|
|
29
29
|
"env": {
|
|
30
30
|
"OPENMRP_API_KEY": "My Bearer Token",
|
|
31
|
-
"OPENMRP_OPENMRP_ACCOUNT_ID": "My
|
|
31
|
+
"OPENMRP_OPENMRP_ACCOUNT_ID": "My Openmrp Account ID",
|
|
32
32
|
"OPENMRP_ENVIRONMENT": "production"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -41,14 +41,14 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
41
41
|
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
|
|
42
42
|
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
|
|
43
43
|
|
|
44
|
-
[](https://cursor.com/en-US/install-mcp?name=%40openmrp%2Fsdk-mcp&config=
|
|
44
|
+
[](https://cursor.com/en-US/install-mcp?name=%40openmrp%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBvcGVubXJwL3Nkay1tY3AiXSwiZW52Ijp7Ik9QRU5NUlBfQVBJX0tFWSI6Ik15IEJlYXJlciBUb2tlbiIsIk9QRU5NUlBfT1BFTk1SUF9BQ0NPVU5UX0lEIjoiTXkgT3Blbm1ycCBBY2NvdW50IElEIn19)
|
|
45
45
|
|
|
46
46
|
### VS Code
|
|
47
47
|
|
|
48
48
|
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
|
|
49
49
|
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
|
|
50
50
|
|
|
51
|
-
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40openmrp%2Fsdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40openmrp%2Fsdk-mcp%22%5D%2C%22env%22%3A%7B%22OPENMRP_API_KEY%22%3A%22My%20Bearer%20Token%22%2C%22OPENMRP_OPENMRP_ACCOUNT_ID%22%3A%22My%
|
|
51
|
+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40openmrp%2Fsdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40openmrp%2Fsdk-mcp%22%5D%2C%22env%22%3A%7B%22OPENMRP_API_KEY%22%3A%22My%20Bearer%20Token%22%2C%22OPENMRP_OPENMRP_ACCOUNT_ID%22%3A%22My%20Openmrp%20Account%20ID%22%7D%7D)
|
|
52
52
|
|
|
53
53
|
### Claude Code
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ If you use Claude Code, you can install the MCP server by running the command be
|
|
|
56
56
|
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
|
|
57
57
|
|
|
58
58
|
```
|
|
59
|
-
claude mcp add openmrp_sdk_mcp_api --env OPENMRP_API_KEY="My Bearer Token" OPENMRP_OPENMRP_ACCOUNT_ID="My
|
|
59
|
+
claude mcp add openmrp_sdk_mcp_api --env OPENMRP_API_KEY="My Bearer Token" OPENMRP_OPENMRP_ACCOUNT_ID="My Openmrp Account ID" -- npx -y @openmrp/sdk-mcp
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Code Mode
|
|
@@ -84,7 +84,7 @@ Authorization can be provided via the `Authorization` header using the Bearer sc
|
|
|
84
84
|
|
|
85
85
|
Additionally, authorization can be provided via the following headers:
|
|
86
86
|
| Header | Equivalent client option | Security scheme |
|
|
87
|
-
|
|
|
87
|
+
| ------------------- | ------------------------ | --------------- |
|
|
88
88
|
| `x-openmrp-api-key` | `bearerToken` | BearerAuth |
|
|
89
89
|
|
|
90
90
|
A configuration JSON for this server might look like this, assuming the server is hosted at `http://localhost:3000`:
|
package/code-tool-worker.js
CHANGED
|
@@ -81,10 +81,10 @@ function getRunFunctionSource(code) {
|
|
|
81
81
|
function getTSDiagnostics(code) {
|
|
82
82
|
const functionSource = getRunFunctionSource(code);
|
|
83
83
|
const codeWithImport = [
|
|
84
|
-
'import {
|
|
84
|
+
'import { Openmrp } from "@openmrp/sdk";',
|
|
85
85
|
functionSource.type === 'declaration' ?
|
|
86
|
-
`async function run(${functionSource.client}:
|
|
87
|
-
: `const run: (${functionSource.client}:
|
|
86
|
+
`async function run(${functionSource.client}: Openmrp)`
|
|
87
|
+
: `const run: (${functionSource.client}: Openmrp) => Promise<unknown> =`,
|
|
88
88
|
functionSource.code,
|
|
89
89
|
].join('\n');
|
|
90
90
|
const sourcePath = node_path_1.default.resolve('code.ts');
|
|
@@ -594,7 +594,7 @@ const fetch = async (req) => {
|
|
|
594
594
|
err_lines: [],
|
|
595
595
|
}, { status: 400, statusText: 'Code execution error' });
|
|
596
596
|
}
|
|
597
|
-
const client = new sdk_1.
|
|
597
|
+
const client = new sdk_1.Openmrp({
|
|
598
598
|
...opts,
|
|
599
599
|
});
|
|
600
600
|
const log_lines = [];
|
package/code-tool-worker.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import util from 'node:util';
|
|
4
4
|
import Fuse from 'fuse.js';
|
|
5
5
|
import ts from 'typescript';
|
|
6
|
-
import {
|
|
6
|
+
import { Openmrp } from '@openmrp/sdk';
|
|
7
7
|
async function tseval(code) {
|
|
8
8
|
return import('data:application/typescript;charset=utf-8;base64,' + Buffer.from(code).toString('base64'));
|
|
9
9
|
}
|
|
@@ -43,10 +43,10 @@ function getRunFunctionSource(code) {
|
|
|
43
43
|
function getTSDiagnostics(code) {
|
|
44
44
|
const functionSource = getRunFunctionSource(code);
|
|
45
45
|
const codeWithImport = [
|
|
46
|
-
'import {
|
|
46
|
+
'import { Openmrp } from "@openmrp/sdk";',
|
|
47
47
|
functionSource.type === 'declaration' ?
|
|
48
|
-
`async function run(${functionSource.client}:
|
|
49
|
-
: `const run: (${functionSource.client}:
|
|
48
|
+
`async function run(${functionSource.client}: Openmrp)`
|
|
49
|
+
: `const run: (${functionSource.client}: Openmrp) => Promise<unknown> =`,
|
|
50
50
|
functionSource.code,
|
|
51
51
|
].join('\n');
|
|
52
52
|
const sourcePath = path.resolve('code.ts');
|
|
@@ -556,7 +556,7 @@ const fetch = async (req) => {
|
|
|
556
556
|
err_lines: [],
|
|
557
557
|
}, { status: 400, statusText: 'Code execution error' });
|
|
558
558
|
}
|
|
559
|
-
const client = new
|
|
559
|
+
const client = new Openmrp({
|
|
560
560
|
...opts,
|
|
561
561
|
});
|
|
562
562
|
const log_lines = [];
|
package/code-tool.js
CHANGED
|
@@ -37,7 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.codeTool = codeTool;
|
|
38
38
|
const types_1 = require("./types.js");
|
|
39
39
|
const logger_1 = require("./logger.js");
|
|
40
|
-
const prompt = `Runs JavaScript code to interact with the
|
|
40
|
+
const prompt = `Runs JavaScript code to interact with the Openmrp API.
|
|
41
41
|
|
|
42
42
|
You are a skilled TypeScript programmer writing code to interface with the service.
|
|
43
43
|
Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.
|
|
@@ -198,7 +198,7 @@ const localDenoHandler = async ({ reqContext, args, }) => {
|
|
|
198
198
|
const opts = {
|
|
199
199
|
...(client.baseURL != null ? { baseURL: client.baseURL } : undefined),
|
|
200
200
|
...(client.bearerToken != null ? { bearerToken: client.bearerToken } : undefined),
|
|
201
|
-
...(client.
|
|
201
|
+
...(client.openmrpAccountID != null ? { openmrpAccountID: client.openmrpAccountID } : undefined),
|
|
202
202
|
defaultHeaders: {
|
|
203
203
|
'X-Stainless-MCP': 'true',
|
|
204
204
|
},
|
package/code-tool.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { asErrorResult } from "./types.mjs";
|
|
3
3
|
import { getLogger } from "./logger.mjs";
|
|
4
|
-
const prompt = `Runs JavaScript code to interact with the
|
|
4
|
+
const prompt = `Runs JavaScript code to interact with the Openmrp API.
|
|
5
5
|
|
|
6
6
|
You are a skilled TypeScript programmer writing code to interface with the service.
|
|
7
7
|
Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.
|
|
@@ -162,7 +162,7 @@ const localDenoHandler = async ({ reqContext, args, }) => {
|
|
|
162
162
|
const opts = {
|
|
163
163
|
...(client.baseURL != null ? { baseURL: client.baseURL } : undefined),
|
|
164
164
|
...(client.bearerToken != null ? { bearerToken: client.bearerToken } : undefined),
|
|
165
|
-
...(client.
|
|
165
|
+
...(client.openmrpAccountID != null ? { openmrpAccountID: client.openmrpAccountID } : undefined),
|
|
166
166
|
defaultHeaders: {
|
|
167
167
|
'X-Stainless-MCP': 'true',
|
|
168
168
|
},
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrp/sdk-mcp",
|
|
3
|
-
"version": "0.19.
|
|
4
|
-
"description": "The official MCP Server for the
|
|
5
|
-
"author": "
|
|
3
|
+
"version": "0.19.5",
|
|
4
|
+
"description": "The official MCP Server for the Openmrp API",
|
|
5
|
+
"author": "Openmrp <support@openmrp.ai>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "commonjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"fix": "eslint --fix ."
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@openmrp/sdk": "^0.19.
|
|
30
|
+
"@openmrp/sdk": "^0.19.5",
|
|
31
31
|
"ajv": "^8.18.0",
|
|
32
32
|
"@cloudflare/cabidela": "^0.2.4",
|
|
33
33
|
"@hono/node-server": "^1.19.10",
|
package/server.js
CHANGED
|
@@ -17,7 +17,7 @@ const methods_1 = require("./methods.js");
|
|
|
17
17
|
const util_1 = require("./util.js");
|
|
18
18
|
const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new mcp_js_1.McpServer({
|
|
19
19
|
name: 'openmrp_sdk_api',
|
|
20
|
-
version: '0.19.
|
|
20
|
+
version: '0.19.4',
|
|
21
21
|
}, {
|
|
22
22
|
instructions: await (0, instructions_1.getInstructions)({ stainlessApiKey, customInstructionsPath }),
|
|
23
23
|
capabilities: { tools: {}, logging: {} },
|
|
@@ -51,7 +51,7 @@ async function initMcpServer(params) {
|
|
|
51
51
|
try {
|
|
52
52
|
_client = new sdk_1.default({
|
|
53
53
|
...{
|
|
54
|
-
|
|
54
|
+
openmrpAccountID: (0, util_1.readEnv)('OPENMRP_OPENMRP_ACCOUNT_ID'),
|
|
55
55
|
environment: ((0, util_1.readEnv)('OPENMRP_ENVIRONMENT') || undefined),
|
|
56
56
|
},
|
|
57
57
|
logger,
|
package/server.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { CallToolRequestSchema, ListToolsRequestSchema, SetLevelRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import
|
|
4
|
+
import Openmrp from '@openmrp/sdk';
|
|
5
5
|
import { codeTool } from "./code-tool.mjs";
|
|
6
6
|
import { getInstructions } from "./instructions.mjs";
|
|
7
7
|
import { blockedMethodsForCodeTool } from "./methods.mjs";
|
|
8
8
|
import { readEnv } from "./util.mjs";
|
|
9
9
|
export const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new McpServer({
|
|
10
10
|
name: 'openmrp_sdk_api',
|
|
11
|
-
version: '0.19.
|
|
11
|
+
version: '0.19.4',
|
|
12
12
|
}, {
|
|
13
13
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
14
14
|
capabilities: { tools: {}, logging: {} },
|
|
@@ -39,9 +39,9 @@ export async function initMcpServer(params) {
|
|
|
39
39
|
throw _clientError;
|
|
40
40
|
if (!_client) {
|
|
41
41
|
try {
|
|
42
|
-
_client = new
|
|
42
|
+
_client = new Openmrp({
|
|
43
43
|
...{
|
|
44
|
-
|
|
44
|
+
openmrpAccountID: readEnv('OPENMRP_OPENMRP_ACCOUNT_ID'),
|
|
45
45
|
environment: (readEnv('OPENMRP_ENVIRONMENT') || undefined),
|
|
46
46
|
},
|
|
47
47
|
logger,
|
package/src/code-tool-worker.ts
CHANGED
|
@@ -5,7 +5,7 @@ import util from 'node:util';
|
|
|
5
5
|
import Fuse from 'fuse.js';
|
|
6
6
|
import ts from 'typescript';
|
|
7
7
|
import { WorkerOutput } from './code-tool-types';
|
|
8
|
-
import {
|
|
8
|
+
import { Openmrp, ClientOptions } from '@openmrp/sdk';
|
|
9
9
|
|
|
10
10
|
async function tseval(code: string) {
|
|
11
11
|
return import('data:application/typescript;charset=utf-8;base64,' + Buffer.from(code).toString('base64'));
|
|
@@ -57,10 +57,10 @@ function getRunFunctionSource(code: string): {
|
|
|
57
57
|
function getTSDiagnostics(code: string): string[] {
|
|
58
58
|
const functionSource = getRunFunctionSource(code)!;
|
|
59
59
|
const codeWithImport = [
|
|
60
|
-
'import {
|
|
60
|
+
'import { Openmrp } from "@openmrp/sdk";',
|
|
61
61
|
functionSource.type === 'declaration' ?
|
|
62
|
-
`async function run(${functionSource.client}:
|
|
63
|
-
: `const run: (${functionSource.client}:
|
|
62
|
+
`async function run(${functionSource.client}: Openmrp)`
|
|
63
|
+
: `const run: (${functionSource.client}: Openmrp) => Promise<unknown> =`,
|
|
64
64
|
functionSource.code,
|
|
65
65
|
].join('\n');
|
|
66
66
|
const sourcePath = path.resolve('code.ts');
|
|
@@ -605,7 +605,7 @@ const fetch = async (req: Request): Promise<Response> => {
|
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
607
|
|
|
608
|
-
const client = new
|
|
608
|
+
const client = new Openmrp({
|
|
609
609
|
...opts,
|
|
610
610
|
});
|
|
611
611
|
|
package/src/code-tool.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SdkMethod } from './methods';
|
|
|
8
8
|
import { McpCodeExecutionMode } from './options';
|
|
9
9
|
import { ClientOptions } from '@openmrp/sdk';
|
|
10
10
|
|
|
11
|
-
const prompt = `Runs JavaScript code to interact with the
|
|
11
|
+
const prompt = `Runs JavaScript code to interact with the Openmrp API.
|
|
12
12
|
|
|
13
13
|
You are a skilled TypeScript programmer writing code to interface with the service.
|
|
14
14
|
Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.
|
|
@@ -209,7 +209,7 @@ const localDenoHandler = async ({
|
|
|
209
209
|
const opts = {
|
|
210
210
|
...(client.baseURL != null ? { baseURL: client.baseURL } : undefined),
|
|
211
211
|
...(client.bearerToken != null ? { bearerToken: client.bearerToken } : undefined),
|
|
212
|
-
...(client.
|
|
212
|
+
...(client.openmrpAccountID != null ? { openmrpAccountID: client.openmrpAccountID } : undefined),
|
|
213
213
|
defaultHeaders: {
|
|
214
214
|
'X-Stainless-MCP': 'true',
|
|
215
215
|
},
|
package/src/server.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
SetLevelRequestSchema,
|
|
9
9
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
10
10
|
import { ClientOptions } from '@openmrp/sdk';
|
|
11
|
-
import
|
|
11
|
+
import Openmrp from '@openmrp/sdk';
|
|
12
12
|
import { codeTool } from './code-tool';
|
|
13
13
|
import { getInstructions } from './instructions';
|
|
14
14
|
import { McpOptions } from './options';
|
|
@@ -26,7 +26,7 @@ export const newMcpServer = async ({
|
|
|
26
26
|
new McpServer(
|
|
27
27
|
{
|
|
28
28
|
name: 'openmrp_sdk_api',
|
|
29
|
-
version: '0.19.
|
|
29
|
+
version: '0.19.4',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
@@ -64,17 +64,17 @@ export async function initMcpServer(params: {
|
|
|
64
64
|
error: logAtLevel('error'),
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
let _client:
|
|
67
|
+
let _client: Openmrp | undefined;
|
|
68
68
|
let _clientError: Error | undefined;
|
|
69
69
|
let _logLevel: 'debug' | 'info' | 'warn' | 'error' | 'off' | undefined;
|
|
70
70
|
|
|
71
|
-
const getClient = ():
|
|
71
|
+
const getClient = (): Openmrp => {
|
|
72
72
|
if (_clientError) throw _clientError;
|
|
73
73
|
if (!_client) {
|
|
74
74
|
try {
|
|
75
|
-
_client = new
|
|
75
|
+
_client = new Openmrp({
|
|
76
76
|
...{
|
|
77
|
-
|
|
77
|
+
openmrpAccountID: readEnv('OPENMRP_OPENMRP_ACCOUNT_ID'),
|
|
78
78
|
environment: (readEnv('OPENMRP_ENVIRONMENT') || undefined) as any,
|
|
79
79
|
},
|
|
80
80
|
logger,
|
|
@@ -111,7 +111,7 @@ export async function initMcpServer(params: {
|
|
|
111
111
|
throw new Error(`Unknown tool: ${name}`);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
let client:
|
|
114
|
+
let client: Openmrp;
|
|
115
115
|
try {
|
|
116
116
|
client = getClient();
|
|
117
117
|
} catch (error) {
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import Openmrp from '@openmrp/sdk';
|
|
4
4
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
5
5
|
|
|
6
6
|
type TextContentBlock = {
|
|
@@ -43,7 +43,7 @@ export type ToolCallResult = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export type McpRequestContext = {
|
|
46
|
-
client:
|
|
46
|
+
client: Openmrp;
|
|
47
47
|
stainlessApiKey?: string | undefined;
|
|
48
48
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
49
49
|
mcpSessionId?: string | undefined;
|
package/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Openmrp from '@openmrp/sdk';
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
type TextContentBlock = {
|
|
4
4
|
type: 'text';
|
|
@@ -32,7 +32,7 @@ export type ToolCallResult = {
|
|
|
32
32
|
isError?: boolean;
|
|
33
33
|
};
|
|
34
34
|
export type McpRequestContext = {
|
|
35
|
-
client:
|
|
35
|
+
client: Openmrp;
|
|
36
36
|
stainlessApiKey?: string | undefined;
|
|
37
37
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
38
38
|
mcpSessionId?: string | undefined;
|
package/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Openmrp from '@openmrp/sdk';
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
type TextContentBlock = {
|
|
4
4
|
type: 'text';
|
|
@@ -32,7 +32,7 @@ export type ToolCallResult = {
|
|
|
32
32
|
isError?: boolean;
|
|
33
33
|
};
|
|
34
34
|
export type McpRequestContext = {
|
|
35
|
-
client:
|
|
35
|
+
client: Openmrp;
|
|
36
36
|
stainlessApiKey?: string | undefined;
|
|
37
37
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
38
38
|
mcpSessionId?: string | undefined;
|