mcp-sharepoint-us 2.0.7__tar.gz → 2.0.9__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.

Potentially problematic release.


This version of mcp-sharepoint-us might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-sharepoint-us
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: SharePoint MCP Server with Modern Azure AD Authentication
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/mdev26/mcp-sharepoint-us
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mcp-sharepoint-us"
7
- version = "2.0.7"
7
+ version = "2.0.9"
8
8
  description = "SharePoint MCP Server with Modern Azure AD Authentication"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -102,14 +102,18 @@ class SharePointAuthenticator:
102
102
 
103
103
  logger.info(f"Using SharePoint root scope: {sharepoint_root}/.default")
104
104
 
105
- def acquire_token() -> str:
105
+ def acquire_token() -> dict:
106
106
  """
107
107
  Token callback used by office365 ClientContext.
108
108
  Retries transient network errors like ConnectionResetError(104).
109
+ Returns a dict with tokenType and accessToken as expected by the library.
109
110
  """
110
111
  now = int(time.time())
111
112
  if self._access_token and now < (self._access_token_exp - 60):
112
- return self._access_token
113
+ return {
114
+ "tokenType": "Bearer",
115
+ "accessToken": self._access_token
116
+ }
113
117
 
114
118
  last_err = None
115
119
  for attempt in range(1, 6): # 5 attempts
@@ -133,7 +137,10 @@ class SharePointAuthenticator:
133
137
  self._access_token_exp = int(time.time()) + expires_in
134
138
 
135
139
  logger.info(f"Successfully acquired token for {self.site_url}")
136
- return token
140
+ return {
141
+ "tokenType": "Bearer",
142
+ "accessToken": token
143
+ }
137
144
 
138
145
  except Exception as e:
139
146
  last_err = e
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-sharepoint-us
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: SharePoint MCP Server with Modern Azure AD Authentication
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/mdev26/mcp-sharepoint-us