How to Connect Claude Code to dfin.pro MCP
Claude Code can connect to dfin.pro MCP so it can work with live financial data instead of relying only on model knowledge. Once connected, Claude Code can search filings, read transcripts, pull financial statements and ratios, run screeners, and use dfin.pro's financial research workflow from your coding session.
The dfin.pro plugin is the recommended way to set this up: it installs the MCP connection and the bundled dfin research skill together in one step. The easiest way to add it is through the claude command line, even if you normally work inside an editor. Start with the API key step below, then install the plugin.
Set the API key
Claude Code needs your dfin.pro API key stored as an environment variable named DFIN_API_KEY. An environment variable gives Claude Code a credential it can find automatically, without pasting it into the plugin setup each time. Set it permanently using the commands below so Claude Code can still find it after you restart the app or open a new terminal.
macOS Zsh
echo 'export DFIN_API_KEY="paste-your-api-key-here"' >> ~/.zshrc
source ~/.zshrc
Linux Bash
echo 'export DFIN_API_KEY="paste-your-api-key-here"' >> ~/.bashrc
source ~/.bashrc
Windows PowerShell
[Environment]::SetEnvironmentVariable("DFIN_API_KEY", "paste-your-api-key-here", "User")
Close and reopen PowerShell after setting the variable.
Windows Command Prompt
setx DFIN_API_KEY "paste-your-api-key-here"
Close and reopen Command Prompt after setting the variable.
Install the plugin
Open Claude Code from a terminal:
claude
Inside the session, add the dfin.pro plugin marketplace:
/plugin marketplace add dfin-pro/dfin-financial-mcp
Install the plugin from that marketplace:
/plugin install dfin-financial-mcp@dfin
Here is what this looks like in the terminal:
Reload plugins so Claude Code picks up the new MCP connection and skill:
/reload-plugins
Then test it with a question that needs current financial data:
Here is what a working setup looks like:
Add MCP directly
If you want the MCP server without the bundled skill, you can add it directly instead of installing the plugin. Set DFIN_API_KEY first as shown above, then run the command for your shell.
The command stores the literal text ${DFIN_API_KEY} in your Claude Code config and resolves the key from your environment on each connection, so your key is never written into the config file. The only catch is that your shell must not expand ${DFIN_API_KEY} before Claude Code stores it, so the quoting differs by shell.
macOS Zsh, Linux Bash, and Windows PowerShell
Single quotes keep the placeholder literal:
claude mcp add --transport http dfin https://www.dfin.pro/mcp -H 'Authorization: Bearer ${DFIN_API_KEY}' --scope user
Windows Command Prompt
Command Prompt leaves ${DFIN_API_KEY} untouched, so use double quotes:
claude mcp add --transport http dfin https://www.dfin.pro/mcp -H "Authorization: Bearer ${DFIN_API_KEY}" --scope user
Either way, the saved config should show the placeholder rather than your key:
"headers": { "Authorization": "Bearer ${DFIN_API_KEY}" }
Verify that the server is connected:
claude mcp list
This direct route connects Claude Code to the dfin.pro MCP server, but it does not install the bundled skill. The plugin route is still preferred because the skill gives Claude Code better default guidance for financial research workflows.
Test Run
After installing the plugin, open Claude Code and ask a question that should require live financial data, such as:
Summarize Microsoft's revenue and margins over the last five fiscal years.
From the command line tool, you may need to approve requests to access the information.
Claude Code should use the dfin.pro tools instead of answering only from memory. If it does not, check that DFIN_API_KEY is set in the same terminal environment where you launch claude, and confirm that the dfin MCP server appears in claude mcp list.
If you run into any trouble during setup, reach out at [email protected].