NebulaBlock API MCP is the official Model Context Protocol (MCP) server provided by NebulaBlock, designed to expose the full functionality of the NebulaBlock API as tools, thereby enabling seamless and efficient interaction in environments that support MCP. The project is built on the fastmcp library.
Purpose
As the official MCP server, it allows developers to directly invoke the capabilities of the NebulaBlock API in any MCP-compatible client (such as the MCP extension for VS Code), without having to implement the underlying communication themselves.
Main Capabilities
Integrates the full range of NebulaBlock API functionality into accessible tools, supporting use in MCP environments. The project structure is clear and includes:
src/: main application source code, including configuration and tool definitions;tests/: unit and integration tests;scripts/: reserved utility scripts (such as setup, data generation);docs/: reserved supplementary documentation;.env.example: example environment variables;pyproject.toml: project metadata and build configuration;uv.lock: uv dependency management lock file.
Usage
- Installation and Setup:
- Clone the repository:
git clone https://github.com/Nebula-Block-Data/api-mcpand enter the directory; - Create a virtual environment:
python3 -m venv .venv; - Activate the virtual environment (macOS/Linux);
- Install dependencies:
uv pip install -e ., which will install fastmcp and other dependencies specified in pyproject.toml.
- Clone the repository:
- Run the Server: After startup, output similar to the following will be visible:
[05/29/25 17:32:58] INFO Starting MCP server 'FastMCP' with transport 'stdio'. - Configure the API Key: There are two ways:
- Command-line argument:
python -m src.main --api-key your_nebula_block_api_key, this method overrides the key in the .env file; - .env file: create
.envin the project root directory and addNEBULA_BLOCK_API_KEY=your_nebula_block_api_key, which will be loaded automatically if no command-line argument is provided.
- Command-line argument:
- Run Tests: Activate the virtual environment and install pytest, then run the unit tests.
- Integrate with an MCP Client: Configure the MCP client (such as VS Code) settings.json to connect to this server. In the example, replace
~/path/to/uvwith the path to the uv executable,~/path/to/nebulablock_mcpwith the project directory path, andYOUR_API_KEYwith the actual API key.
Applicable Scenarios
Suitable for developers who need to integrate the NebulaBlock API in an MCP-compatible environment, for example, automatically invoking NebulaBlock services through an MCP client.
Limitations
The project uses the MIT license; see the LICENSE file for details (if created). Details regarding specific API functionality, pricing, platform support, etc. are not provided at this time.