Prerequisites
Before integrating FinMCP with OpenCode, ensure you have:- OpenCode installed
- Node.js 18+ installed
- Python 3.10+ installed
- Python dependencies installed:
Server logs are written to stderr, while stdout is reserved for MCP transport communication.
Installation
Locate OpenCode Configuration
Find or create your
opencode.json configuration file. This is typically located in your project root or OpenCode config directory.Add FinMCP Configuration
Add the FinMCP server configuration to your
opencode.json:opencode.json
The
-y flag ensures npx automatically installs or uses the latest version of FinMCP without prompting.Enable the MCP Server
The
"enabled": true setting activates FinMCP when OpenCode starts. You can disable it temporarily by setting this to false.Configuration Options
Server Type
The"type": "local" setting indicates FinMCP runs as a local process using stdio transport.
Command Array
The command array["npx", "-y", "finmcp"] specifies:
npx- Node package executor-y- Auto-confirm package installation/executionfinmcp- The package to run
Alternative Configuration
If you have FinMCP installed globally:opencode.json
Multiple MCP Servers
You can run FinMCP alongside other MCP servers:opencode.json
Troubleshooting
Server Not Loading
If FinMCP doesn’t load in OpenCode:- Check the
opencode.jsonsyntax is valid JSON - Verify Python 3.10+ is installed:
python --version - Ensure yfinance dependencies are installed
- Check OpenCode logs for error messages
Command Not Found
If you see “command not found” errors:- Verify Node.js and npx are in your PATH
- Try using the full path to npx in the command array
- Install FinMCP globally:
npm install -g finmcp
Enabling/Disabling
To temporarily disable FinMCP without removing the configuration:Next Steps
- Explore available tools in FinMCP
- Learn about data sources and market coverage
- Check out example queries for inspiration