@softeria/ms-365-mcp-server 0.4.2 → 0.4.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 +0 -3
- package/bin/modules/simplified-openapi.mjs +7 -0
- package/dist/auth.js +1 -0
- package/dist/endpoints.json +9 -1
- package/dist/generated/client.js +7339 -7295
- package/package.json +3 -2
- package/src/endpoints.json +9 -1
- package/src/generated/README.md +6 -1
- package/.github/workflows/build.yml +0 -34
- package/.github/workflows/npm-publish.yml +0 -32
- package/.prettierrc +0 -7
- package/src/auth-tools.ts +0 -89
- package/src/auth.ts +0 -267
- package/src/cli.ts +0 -42
- package/src/generated/client.ts +0 -24916
- package/src/graph-client.ts +0 -328
- package/src/graph-tools.ts +0 -182
- package/src/index.ts +0 -46
- package/src/logger.ts +0 -43
- package/src/server.ts +0 -49
- package/src/version.ts +0 -9
- package/test/auth-tools.test.ts +0 -97
- package/test/cli.test.ts +0 -45
- package/test/graph-api.test.ts +0 -89
- package/test/read-only.test.ts +0 -96
- package/test/test-hack.ts +0 -17
- package/tsconfig.json +0 -16
- package/vitest.config.js +0 -8
package/README.md
CHANGED
|
@@ -21,9 +21,6 @@ A Model Context Protocol (MCP) server for interacting with Microsoft 365 service
|
|
|
21
21
|
- To Do tasks and task lists
|
|
22
22
|
- Planner plans and tasks
|
|
23
23
|
- Outlook contacts
|
|
24
|
-
- User management
|
|
25
|
-
- Dynamic tools powered by Microsoft Graph OpenAPI spec
|
|
26
|
-
- Built on the Model Context Protocol
|
|
27
24
|
|
|
28
25
|
## Quick Start Example
|
|
29
26
|
|
|
@@ -6,6 +6,13 @@ export function createAndSaveSimplifiedOpenAPI(endpointsFile, openapiFile, opena
|
|
|
6
6
|
|
|
7
7
|
const spec = fs.readFileSync(openapiFile, 'utf8');
|
|
8
8
|
const openApiSpec = yaml.load(spec);
|
|
9
|
+
|
|
10
|
+
for (const endpoint of endpoints) {
|
|
11
|
+
if (!openApiSpec.paths[endpoint.pathPattern]) {
|
|
12
|
+
throw new Error(`Path "${endpoint.pathPattern}" not found in OpenAPI spec.`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
for (const [key, value] of Object.entries(openApiSpec.paths)) {
|
|
10
17
|
const e = endpoints.filter((ep) => ep.pathPattern === key);
|
|
11
18
|
if (e.length === 0) {
|
package/dist/auth.js
CHANGED
|
@@ -124,6 +124,7 @@ class AuthManager {
|
|
|
124
124
|
};
|
|
125
125
|
try {
|
|
126
126
|
logger.info('Requesting device code...');
|
|
127
|
+
logger.info(`Scopes are: ${this.scopes.join(', ')}`);
|
|
127
128
|
const response = await this.msalApp.acquireTokenByDeviceCode(deviceCodeRequest);
|
|
128
129
|
logger.info('Device code login successful');
|
|
129
130
|
this.accessToken = response?.accessToken || null;
|
package/dist/endpoints.json
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
"pathPattern": "/drives",
|
|
107
|
+
"pathPattern": "/me/drives",
|
|
108
108
|
"method": "get",
|
|
109
109
|
"toolName": "list-drives",
|
|
110
110
|
"scopes": [
|
|
@@ -196,6 +196,14 @@
|
|
|
196
196
|
"Files.Read"
|
|
197
197
|
]
|
|
198
198
|
},
|
|
199
|
+
{
|
|
200
|
+
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}/children",
|
|
201
|
+
"method": "post",
|
|
202
|
+
"toolName": "create-folder",
|
|
203
|
+
"scopes": [
|
|
204
|
+
"Files.ReadWrite"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
199
207
|
{
|
|
200
208
|
"pathPattern": "/me/onenote/notebooks",
|
|
201
209
|
"method": "get",
|