What i am trying to do:
I have setup Oauth 2.0.
And, I am getting an atlassian_access_token. : eyJraWQiOiJhdXRoLm.... teFTvct2NJ8XaMW9
I am using this token to connect to mcp_server.
1. I am getting valid cloud ID using the access token generated through OAuth flow.
API CALL:
[
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"url": "https://xxx-xxxxxxxxxxxxx.atlassian.net",
"name": "xxx-xxxxxxxxxxxxx",
"scopes": [
"read:confluence-content.all",
"read:confluence-space.summary",
"search:confluence"
],
"avatarUrl": "https://site-admin-avatar....."
}
]
3. This is my decoded token:
Decoded Header:
{
"kid": "auth.atlassian.com-ACCESS-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"alg": "RS256"
}
Decoded Payload:
{
"jti": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"sub": "xxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"nbf": xxxxxxxxxx,
"iss": "https://auth.atlassian.com",
"iat": 1779070499,
"exp": 1779074099,
"aud": "xxxxxxxxxxxxxxxxxxxx.....",
"https://atlassian.com/authProfile": "oauth.ecosystem.oauthIntegration",
"https://id.atlassian.com/atl_token_type": "ACCESS",
"https://id.atlassian.com/orgId": "a53d6b63-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/orgId": "a53d6b63-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/firstParty": false,
"https://id.atlassian.com/ujt": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/verified": true,
"https://atlassian.com/oauthClientId": "xxxxxxxxxxxx........",
"https://id.atlassian.com/session_id": "xxxxxxxx.....",
"verified": "true",
"https://atlassian.com/systemAccountId": "xxxxxxxxxx........",
"https://id.atlassian.com/processRegion": "us-west-2",
"https://atlassian.com/emailDomain": "xxxxx.com",
"https://atlassian.com/3lo": true,
"client_id": "xxxxxxxxxxx...",
"https://atlassian.com/accountType": "atlassian",
"https://id.atlassian.com/refresh_chain_id": "xxxxxxxxxxxx",
"https://id.atlassian.com/verified": true,
"scope": "offline_access read:confluence-content.all read:confluence-space.summary read:jira-user read:jira-work search:confluence write:jira-work",
"https://atlassian.com/systemAccountEmailDomain": "connect.atlassian.com",
"https://id.atlassian.com/rti": "xxxxxxxxxxxx",
"https://atlassian.com/systemAccountEmail": "xxxxxxxxx@connect.atlassian.com"
}
I invoked this tool directly:
@Dilip Venkatesh Can you please look into this? I have provided detailed report for the diagnosis. Kindly go through all three.
Full traceback:
>>> Exception type: ToolException
>>> Exception message: {"error":true,"message":"We are having trouble completing this action. Please try again shortly."}
>>> Exception args: ('{"error":true,"message":"We are having trouble completing this action. Please try again shortly."}',)
>>> e.args: ('{"error":true,"message":"We are having trouble completing this action. Please try again shortly."}',)
>>> Full traceback:
Traceback (most recent call last):
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\atlassian_agent.py", line 216, in call_model
resource_result = await resource_tool.ainvoke({})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\structured.py", line 70, in ainvoke
return await super().ainvoke(input, config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 652, in ainvoke
return await self.arun(tool_input, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 1131, in arun
raise error_to_raise
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 1097, in arun
response = await coro_with_context(coro, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\structured.py", line 124, in _arun
return await self.coroutine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_mcp_adapters\tools.py", line 414, in call_tool
return _convert_call_tool_result(call_tool_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_mcp_adapters\tools.py", line 189, in _convert_call_tool_result
raise ToolException(error_msg)
langchain_core.tools.base.ToolException: {"error":true,"message":"We are having trouble completing this action. Please try again shortly."}
The token looks good and has the right scopes.
1. I am getting valid cloud ID using the access token generated through OAuth flow.
API CALL
What I meant is to use the MCP url in https://modelcontextprotocol.io/docs/tools/inspector or any MCP client and use the same oAuth token and test calling any of the tools.
I suspect, it has something to do with the code you have written and not the token/server itself.
I'm not familiar with the client you are using, so I cannot help much here.
What I am using here is :
from langchain_mcp_adapters.client import MultiServerMCPClient
https://reference.langchain.com/python/langchain-mcp-adapters/client/MultiServerMCPClient
And, this is an MCP Client. And, I have already pasted the code that I used.
Is there anyone else from the Atlassian Team who can help me with this?
OR
Anyone from this community?