MCP Server

J-Quants API's official MCP server is optimized for Generative AI to correctly use the J-Quants API. By introducing the MCP Server, you can easily access J-Quants data by entrusting code generation to AI. This guide provides steps to introduce the J-Quants official MCP Server to your AI client.

Overall Flow

  1. Check Prerequisites: Ensure Python 3.10 or higher and uv are installed.
  2. Install MCP Server: Install the MCP Server using the uvx command.
  3. Configure AI Client: Register the MCP Server in Claude Desktop or Cursor.
  4. Start Using: Just ask the AI to get J-Quants API endpoint information and sample code.

Prerequisites

The following environment is required to use the MCP Server.

  • Python 3.10 or higher
  • uv (Recommended) or pip
curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

Install the MCP Server with the following command. We recommend using uv tool, but you can also install it with pip.

# Install directly from GitHub
uv tool install git+https://github.com/J-Quants/j-quants-doc-mcp.git

# Or clone locally and install
git clone https://github.com/J-Quants/j-quants-doc-mcp.git
cd j-quants-doc-mcp
uv tool install .

Configuration for AI Client

Claude Desktop

Add the following to claude_desktop_config.json.

{
  "mcpServers": {
    "j-quants-doc-mcp": {
      "command": "uvx",
      "args": ["j-quants-doc-mcp"]
    }
  }
}

Config File Location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor

  1. Open the menu bar "Cursor" -> "Preferences" -> "Cursor Settings".
  2. Select "Tools & MCP" from the left menu and click "New MCP Server".
  3. Add the following to the opened JSON file (mcp.json).
{
  "mcpServers": {
    "j-quants-doc-mcp": {
      "command": "uvx",
      "args": ["j-quants-doc-mcp"]
    }
  }
}

Config File Location:

  • macOS: ~/.cursor/mcp.json
  • Windows: %USERPROFILE%\.cursor\mcp.json

Update

If you have already installed it, you can update to the latest version using the following methods.

# If installed directly from GitHub
uv tool upgrade j-quants-doc-mcp

# If installed from local clone
cd j-quants-doc-mcp
git pull
uv tool upgrade j-quants-doc-mcp

Troubleshooting

Not recognized by Claude Desktop or Cursor

  1. Check if the JSON in the configuration file is in the correct format.
  2. Restart the AI Client (Claude Desktop / Cursor).

Generated code cannot be executed

To execute the generated Python code, please install the following dependencies.

pip install httpx python-dotenv

Was this page helpful?