Update src/mcp_servers/examples/gmail/send_email.py
Browse files
src/mcp_servers/examples/gmail/send_email.py
CHANGED
|
@@ -44,6 +44,7 @@ UV_PATH = "/Users/sebastianwefers/.local/bin/uv" # <= full path to uv (importan
|
|
| 44 |
MODEL = ChatOpenAI(model="gpt-4o", temperature=0)
|
| 45 |
|
| 46 |
settings = GMailSettings()
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
async def main():
|
|
@@ -55,8 +56,8 @@ async def main():
|
|
| 55 |
"args": [
|
| 56 |
"--directory", str(settings.gmail_mcp_dir),
|
| 57 |
"run", "gmail",
|
| 58 |
-
"--creds-file-path", str(
|
| 59 |
-
"--token-path", str(
|
| 60 |
],
|
| 61 |
"transport": "stdio",
|
| 62 |
}
|
|
@@ -93,4 +94,4 @@ async def main():
|
|
| 93 |
print("~~~ END RESULT ~~~")
|
| 94 |
|
| 95 |
if __name__ == "__main__":
|
| 96 |
-
asyncio.run(main())
|
|
|
|
| 44 |
MODEL = ChatOpenAI(model="gpt-4o", temperature=0)
|
| 45 |
|
| 46 |
settings = GMailSettings()
|
| 47 |
+
CREDS_PATH, TOKEN_PATH = settings.materialize_files()
|
| 48 |
|
| 49 |
|
| 50 |
async def main():
|
|
|
|
| 56 |
"args": [
|
| 57 |
"--directory", str(settings.gmail_mcp_dir),
|
| 58 |
"run", "gmail",
|
| 59 |
+
"--creds-file-path", str(CREDS_PATH),
|
| 60 |
+
"--token-path", str(TOKEN_PATH),
|
| 61 |
],
|
| 62 |
"transport": "stdio",
|
| 63 |
}
|
|
|
|
| 94 |
print("~~~ END RESULT ~~~")
|
| 95 |
|
| 96 |
if __name__ == "__main__":
|
| 97 |
+
asyncio.run(main())
|