Connecting to an Informatica MCP Server using Python
To connect to an Informatica MCP Server using Python, paste the provided code block into your custom Python code and update the endpoint URL and authentication details.
Paste one of the following code blocks into the custom Python code based on your authentication method.
- If you use JWT or OAuth authentication, paste the following code block and replace <endpoint URL> with the endpoint URL and <token> with the bearer token:
from mcp.client.streamable_http import streamablehttp_client
# Create an MCP client instance, pointing to your deployed server URL mcp_client = streamablehttp_client( url="<endpoint URL>", headers={"Authorization": "Bearer <token>"} )
- If you use session-based authentication, paste the following code block and replace <endpoint URL> with the endpoint URL and <session ID> with the session ID:
from mcp.client.streamable_http import streamablehttp_client
# Create an MCP client instance, pointing to your deployed server URL mcp_client = streamablehttp_client( url="<endpoint URL>", headers={"IDS-SESSION-ID": "<session ID>"} )