MCP Server

Installation

Three ways to install and run the OpenOcean MCP server.

Method 1: pnpm dlx (Recommended)

Run without global install. Use command: "pnpm", args: ["dlx", "openocean-mcp"] in your MCP client config.

Terminal
{}
1
{
2
"mcpServers": {
3
"openocean-mcp-server": {
4
"command": "pnpm",
5
"args": ["dlx", "openocean-mcp"]
6
}
7
}
8
}

Method 2: Global Install

Install once globally, then run openocean-mcp from config:

Terminal
SH
1
pnpm add -g openocean-mcp

MCP client config:

Terminal
{}
1
{
2
"mcpServers": {
3
"openocean-mcp-server": {
4
"command": "openocean-mcp",
5
"args": []
6
}
7
}
8
}

Method 3: Build from Source

For development or custom changes:

Terminal
SH
1
git clone https://github.com/openocean-finance/openocean-mcp.git
2
cd openocean-mcp
3
pnpm install
4
pnpm run build

The prepare script runs pnpm run build on install, so building happens automatically after pnpm install.

Configuration

The MCP server may require environment variables (e.g. for wallet providers or API keys). Configure these in your MCP client's server definition (e.g. mcp.json or mcp_servers.json).

Environment variables

Use the env object in your MCP server config to pass environment variables when the server process starts.

Next Steps