tutorial

Connect Finta MCP to Microsoft Agent Framework

Use the MCP Python SDK for Finta OAuth, pass the authenticated session into Microsoft Agent Framework, and verify relationship data without making changes.

By Finta Editorial TeamReviewed by Finta Product TeamPublished August 22, 2026

Section
MCP installation
Supported clients
Microsoft Agent Framework for Python, MCP Python SDK Streamable HTTP client
Prerequisites
A Finta account with an active organization, Python 3.10 or later, Microsoft Agent Framework with its compatible MCP SDK dependency, A configured Agent Framework model client, Permission to open a localhost OAuth callback

Direct answer: Microsoft Agent Framework for Python can use Finta MCP, but the current setup is an advanced composition rather than a one-line connector. Use the official MCP Python SDK to complete Finta's browser OAuth flow over Streamable HTTP, initialize a ClientSession, then pass that authenticated session to MCPStreamableHTTPTool. Keep approval_mode="always_require" and begin with tool discovery plus one explicitly read-only lookup.

Understand the connection first

Microsoft Agent Framework supports remote Streamable HTTP MCP servers, but its documented header_provider path assumes that your application already has a usable credential. Finta uses interactive OAuth with organization selection. The clean boundary is therefore:

LayerResponsibility
FintaHosts https://finta.ai/mcp, authenticates the user, scopes access to a Finta organization, and enforces current server-side permissions.
MCP Python SDKDiscovers Finta OAuth metadata, opens browser authorization, handles the localhost callback, manages PKCE and tokens, and creates the authenticated ClientSession.
Microsoft Agent FrameworkConverts the authenticated session's MCP tools into agent tools, applies an allowlist, and requires host approval before a tool call.
Your applicationStores credentials safely, presents approval requests, logs receipts, and decides which tool results may influence a workflow.

Microsoft's MCP tool documentation covers MCPStreamableHTTPTool and third-party server controls. The official MCP Python SDK OAuth client documentation explains discovery, browser authorization, PKCE, callbacks, and token storage.

Before you connect

CheckRecommended state
Finta accessYou can sign in and identify the Finta organization you intend to use.
PythonPython 3.10 or later in a dedicated virtual environment.
Agent FrameworkInstall the current agent-framework meta package and keep its resolved MCP dependency.
Model clientConfigure a supported Agent Framework chat client. The example below uses OpenAIChatClient.
OAuth callbackYour browser can return to http://localhost:3030/callback.
Approval modeEvery Finta tool requires explicit approval during setup.

Do not place a Finta password, browser cookie, OAuth access token, refresh token, or client registration secret in source code or an environment file committed to a repository.

1. Create an isolated Python environment

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install agent-framework

On Windows PowerShell, activate the environment with .venv\Scripts\Activate.ps1.

The current Agent Framework core package constrains the MCP Python SDK to mcp>=1.24.0,<2. Let agent-framework resolve that compatible dependency. Do not force-upgrade mcp to 2.x in the same environment unless Microsoft has removed the constraint and you have retested the integration.

Configure the model provider separately. For the OpenAI client used below, set the provider variables required by the current Agent Framework Python setup, including a model and API credential. You can substitute another supported Agent Framework client without changing the Finta MCP session boundary.

2. Start from the compatible OAuth client

Use the official MCP Python SDK's simple OAuth client at the v1.24.0 tag as the starting point. That tagged example matches the MCP major-version range currently accepted by Agent Framework.

The sample already implements:

  • OAuthClientProvider for discovery, registration, authorization, PKCE, refresh, and request authentication.
  • A localhost callback server.
  • Streamable HTTP transport.
  • ClientSession initialization.
  • In-memory token and client-registration storage for a short proof.

Copy the sample into an isolated test project. Set its server URL to:

https://finta.ai/mcp

Keep the callback URI at http://localhost:3030/callback for the first proof unless your environment requires another loopback port and the registered client metadata is updated to match.

3. Pass the authenticated session into Agent Framework

In the tagged sample, replace the interactive loop inside _run_session with this adapter. Keep the rest of the sample's OAuth and transport code intact.

from agent_framework import Agent, MCPStreamableHTTPTool
from agent_framework.openai import OpenAIChatClient
from mcp.client.session import ClientSession


async def _run_session(self, read_stream, write_stream, get_session_id):
    async with ClientSession(read_stream, write_stream) as session:
        await session.initialize()

        finta = MCPStreamableHTTPTool(
            name="Finta",
            url=self.server_url,
            session=session,
            load_prompts=False,
            approval_mode="always_require",
        )

        async with finta:
            print("Available Finta tools:")
            for function in finta.functions:
                print(f"- {function.name}")

            async with Agent(
                client=OpenAIChatClient(),
                name="finta_relationship_assistant",
                instructions=(
                    "Use Finta only for read-only relationship research during "
                    "this verification. Never create, update, send, schedule, "
                    "enroll, archive, or delete anything."
                ),
                tools=finta,
            ) as agent:
                prompt = (
                    "Search my Finta CRM for the contact I name and summarize "
                    "the matching record. Do not change anything."
                )
                result = await agent.run(prompt)

                for request in result.user_input_requests:
                    if request.function_call is None:
                        continue
                    print("Approval required")
                    print(f"Tool: {request.function_call.name}")
                    print(f"Arguments: {request.function_call.arguments}")

This code intentionally stops at the approval request. It proves that Agent Framework can see the authenticated Finta tools without automatically executing one. Do not change the approval mode to never_require just to make the example finish.

4. Complete Finta OAuth

Run the adapted client with https://finta.ai/mcp as its Streamable HTTP target.

  1. Let the client open the browser authorization URL.
  2. Sign in to Finta.
  3. Review the requested access.
  4. Select the intended Finta organization.
  5. Allow the browser to return to the localhost callback.
  6. Return to the terminal and capture the discovered tool names.
  7. Confirm that the agent produces an approval request instead of executing the proposed lookup.

Finta publishes OAuth protected-resource and authorization-server metadata, including authorization, token, dynamic registration, and PKCE support. You should not need to invent a bearer token or paste a session cookie into a custom header.

5. Verify one read-only lookup

Before approving any request, compare its tool name with the current Finta MCP tools reference. Approve only a tool explicitly documented as read-only, and inspect its exact arguments.

Microsoft's tool approval guide shows how to turn a user_input_request into an approval response and continue the same agent run. Your host should make the user choose approve or reject. It should never set approval to True automatically.

Use a narrow test request:

Search my Finta CRM for the contact I name. Return the matching record and source context. Do not create, update, send, schedule, enroll, archive, or delete anything.

Confirm four outcomes:

CheckWhat to confirm
AuthenticationThe browser flow completed without a copied token or private header.
Tool discoveryAgent Framework loaded a current Finta tool inventory.
OrganizationThe returned record belongs to the intended Finta organization.
Side effectsNo CRM record, message, task, meeting, sequence, or automation changed.

A successful lookup is evidence for this tested path only. It does not prove that every Finta tool is compatible or appropriate for unattended use.

Why this matters for relationship intelligence

Microsoft Agent Framework gives a team a programmable agent runtime. Finta supplies the authorized relationship and capital-workflow context that a general runtime does not have on its own. Depending on the current tool inventory and connected sources, that can include CRM contacts, companies, deals, network paths, documents, inbox and calendar context, tasks, and workflow state.

This combination can help an application prepare a relationship brief, retrieve the last known context before a meeting, or check who owns a next step. The useful outcome is not a larger contact list. It is a better-supported decision about the right person and next action.

Relationship evidence still requires judgment. A network path does not establish consent to an introduction. A model summary does not prove investor interest. Private notes may be incomplete or stale. Finta remains the organization-scoped system of record, while Agent Framework is the agent runtime consuming the approved tools.

Security and approval boundary

  • Keep approval_mode="always_require" during setup and for consequential tools.
  • Add an allowed_tools list after you have captured and reviewed the exact Finta tool names.
  • Separate read-only research from tools that create, update, send, schedule, enroll, archive, or delete.
  • Show the human the tool name, arguments, target organization, and expected side effect before approval.
  • Persist OAuth tokens and dynamic client information in encrypted, access-controlled storage for production.
  • Never log tokens, authorization codes, relationship notes, or unredacted tool results by default.
  • Revoke or rotate access when a device, deployment, service account, or team role changes.
  • Treat third-party prompt content and tool output according to your organization's data-handling policy.

The official OAuth sample uses in-memory storage and is suitable only for a short proof. A production host should persist both tokens and dynamic client information so it does not create a new client registration on every run.

Troubleshooting

The request returns 401 Unauthorized

Confirm that the MCP SDK OAuth provider is attached to the HTTP client used by streamable_http_client. Do not call MCPStreamableHTTPTool(url=...) by itself for Finta and expect it to complete interactive OAuth.

The browser never opens

Confirm that the OAuth sample's redirect handler is running, a graphical browser is available, and browser launching is permitted. In a remote shell, print the authorization URL and open it on the user-controlled browser instead of disabling OAuth.

The callback times out

Check whether port 3030 is already in use, whether a local firewall blocks the loopback server, and whether the configured redirect URI exactly matches http://localhost:3030/callback. Preserve the OAuth state value returned to the callback.

Package installation reports an MCP conflict

Inspect the installed versions with python -m pip show agent-framework agent-framework-core mcp. The current Agent Framework core package accepts MCP 1.x and rejects MCP 2.x. Recreate the virtual environment and install agent-framework first instead of forcing incompatible versions together.

The v1.24 sample differs from the latest MCP SDK docs

The latest MCP Python SDK documentation follows the current major version, while Agent Framework currently pins MCP below 2. Use the tagged v1.24 OAuth sample for this integration until Microsoft expands its supported range, then retest before adopting newer APIs.

Tools load but the model proposes a write

Reject the approval request. Add an allowed_tools list containing only reviewed read tools, strengthen the agent instructions, and rerun the narrow verification. Instructions alone are not an authorization boundary.

The result comes from the wrong Finta organization

Stop the test, clear the test client's stored token and client information, reconnect, and select the intended organization during Finta authorization. Do not attempt to repair organization scope with a prompt.

Limitations

  • This is an advanced Python composition, not a native one-click Finta connector in Microsoft Agent Framework.
  • The guide does not cover the .NET SDK, Microsoft Foundry hosted agents, Agent Framework Go, or production deployment architecture.
  • The official OAuth sample's in-memory storage is not suitable for production.
  • The current Agent Framework package pins the MCP Python SDK below 2. Newer MCP SDK examples may require adaptation or may be incompatible.
  • Microsoft controls Agent Framework package behavior, model clients, approval APIs, and MCP session handling.
  • An authenticated Microsoft Agent Framework to Finta tool-call receipt has not yet been captured for this draft.
  • Finta results depend on the selected organization, permissions, connected sources, data quality, configuration, and current tool inventory.
  • Finta MCP does not guarantee complete records, correct model reasoning, introductions, replies, commitments, or fundraising outcomes.

Related guides

Verification status: The public Finta endpoint, Finta OAuth metadata, Microsoft Agent Framework MCP documentation and source, and the MCP Python SDK OAuth sample were reviewed August 21, 2026. An authenticated Microsoft Agent Framework connection, discovered-tool inventory, and safe read-only Finta tool-call receipt remain pending.

Explore Aurora and connect Finta