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
- Check Prerequisites: Ensure Python 3.10 or higher and uv are installed.
- Install MCP Server: Install the MCP Server using the uvx command.
- Configure AI Client: Register the MCP Server in Claude Desktop or Cursor.
- 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
- uv is a fast Python package manager. If you haven't installed it yet, you can install it with the following command.
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
- Open the menu bar "Cursor" -> "Preferences" -> "Cursor Settings".
- Select "Tools & MCP" from the left menu and click "New MCP Server".
- 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
- After configuration, please restart your AI client. Once the MCP Server is correctly recognized, the AI will be able to answer questions about the J-Quants API.
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
- After updating, restart Claude Desktop or Cursor to reflect the new version.
Troubleshooting
Not recognized by Claude Desktop or Cursor
- Check if the JSON in the configuration file is in the correct format.
- 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
- Check if the environment variables are correctly set.