Other AI Tools & Frameworks¶
Any tool that supports the MCP protocol can connect to FinPlan. Below are examples for common frameworks.
Authentication¶
FinPlan requires a bearer token. Most frameworks don't run FinPlan's browser OAuth flow, so generate a manual API key first:
- Sign up at mcp.finplan.prethink.io/auth/signup
- Create a key at /auth/api-keys β starts with
fp_live_, lasts 90 days - Export it so the examples below can pick it up:
export FINPLAN_API_KEY=fp_live_...
Pass the token as Authorization: Bearer $FINPLAN_API_KEY on every request.
OpenAI Agents SDK¶
import os
from openai_agents import Agent, MCPServerSse
finplan = MCPServerSse(
url="https://mcp.finplan.prethink.io/mcp",
headers={"Authorization": f"Bearer {os.environ['FINPLAN_API_KEY']}"},
)
agent = Agent(
name="Financial Planner",
instructions="Help users with financial planning questions.",
mcp_servers=[finplan]
)
LangChain¶
import os
from langchain_mcp import MCPToolkit
toolkit = MCPToolkit(
server_url="https://mcp.finplan.prethink.io/mcp",
headers={"Authorization": f"Bearer {os.environ['FINPLAN_API_KEY']}"},
)
tools = toolkit.get_tools()
AutoGen¶
from autogen import AssistantAgent
from autogen.tools import MCPToolWrapper
mcp_tools = MCPToolWrapper(
"https://mcp.finplan.prethink.io/mcp",
headers={"Authorization": f"Bearer {os.environ['FINPLAN_API_KEY']}"},
)
assistant = AssistantAgent(
name="financial_planner",
llm_config={"model": "gpt-4"},
tools=mcp_tools.get_tools()
)
CrewAI¶
from crewai import Agent
from crewai_tools import MCPTool
finplan_tool = MCPTool(
name="finplan",
server_url="https://mcp.finplan.prethink.io/mcp",
headers={"Authorization": f"Bearer {os.environ['FINPLAN_API_KEY']}"},
)
analyst = Agent(
role="Financial Analyst",
goal="Help users understand their financial projections",
tools=[finplan_tool]
)
Any HTTP Client¶
For any tool or script that can make HTTP requests:
# List all available tools
curl https://mcp.finplan.prethink.io/mcp/tools \
-H "Authorization: Bearer $FINPLAN_API_KEY"
# Call a tool
curl -X POST https://mcp.finplan.prethink.io/mcp/call \
-H "Authorization: Bearer $FINPLAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "calculate_federal_income_tax",
"arguments": {
"taxable_income_cents": 8500000,
"filing_status": "single",
"tax_year": 2025
}
}'
Priming the agent
Sometimes agents need to be told to use tools. Making sure it knows about them often helps.
```
user> 'Do you have access to FinPlan tools for financial planning?'
agent> (inspecting) 'Yes, I do'.
```