NebulaBlock API MCP Server

NebulaBlock API MCP Server

Expose NebulaBlock API as tools for MCP-compatible environments

1
Stars
2
Forks
1
Watchers
3
Issues
NebulaBlock API MCP Server provides an implementation of the Model Context Protocol (MCP), enabling seamless integration of the NebulaBlock API as accessible tools. It leverages the fastmcp library and supports both command-line and environment variable API key configuration. Designed with MCP compatibility in mind, it offers a server interface for programmatic and tool-based interactions within any MCP-compliant system.

Key Features

Implements MCP protocol using fastmcp
Exposes NebulaBlock API functionalities as tools
Configurable API key via command-line or .env file
Easy integration with MCP clients (e.g., VS Code extensions)
Editable install and modern dependency management with pyproject.toml
Unit and integration test support
Structured project layout for modularity
Server runs via uv with stdio transport
Supplementary documentation and scripts
Automatic tool discovery in MCP environments

Use Cases

Integrating blockchain data tools into AI-powered developer environments
Automating blockchain data retrieval and analysis within an MCP workflow
Providing NebulaBlock API access for model context-aware extensions
Enhancing IDEs or editors with blockchain tooling via MCP
Serving as a backend for programmatic blockchain data queries
Customizing tool exposure for collaborative AI research
Rapid prototyping of applications that need chain data in model context
Facilitating secure API key management for blockchain data access
Running unit and integration tests for reliable server deployment
Extending existing model context-aware pipelines with blockchain insights

README

NebulaBlock API MCP

This repository hosts the official NebulaBlock API Model Context Protocol (MCP) server. This server integrates with the fastmcp library to expose the full range of NebulaBlock API functionalities as accessible tools, enabling seamless and efficient interaction within any MCP-compatible environment.

Project Structure

.
├── src/
│   ├── __init__.py
│   ├── config.py
│   ├── main.py
│   ├── tools.py
│   └── mcp_project.egg-info/
├── tests/
│   ├── __init__.py
│   └── test_main.py
├── scripts/
├── docs/
├── .env.example
├── .gitignore
├── pyproject.toml
├── README.md
└── uv.lock
  • src/: Contains the main application source code, including configuration and tool definitions.
  • tests/: Contains unit and integration tests.
  • scripts/: Reserved for utility scripts (e.g., setup, data generation).
  • docs/: Reserved for supplementary documentation.
  • .env.example: Example file for environment variables.
  • .gitignore: Specifies intentionally untracked files to ignore.
  • pyproject.toml: Project metadata and build system configuration, including dependencies and project information.
  • README.md: This documentation file.
  • uv.lock: Lock file for uv dependency management.

Installation and Setup

To set up and run this project, follow these steps:

  1. Clone the repository (if applicable):

    bash
    git clone https://github.com/Nebula-Block-Data/api-mcp
    cd mcp-project
    
  2. Create a virtual environment: It's highly recommended to use a virtual environment to manage project dependencies.

    bash
    python3 -m venv .venv
    
  3. Activate the virtual environment:

    • macOS/Linux:
bash
source .venv/bin/activate
  1. Install dependencies: This project uses pyproject.toml for dependency management. Install setuptools and then the project in editable mode.
    bash
    uv pip install -e .
    
    This will install fastmcp and any other dependencies specified in pyproject.toml.

Running the NebulaBlock API MCP Server

To start the NebulaBlock API MCP server:

bash
uv run -m src.main

You should see output similar to: [05/29/25 17:32:58] INFO Starting MCP server 'FastMCP' with transport 'stdio'

Configuring API Key

The NebulaBlock API key can be configured in two ways:

  1. Using the --api-key command-line argument: You can provide the API key directly when running the application:

    bash
    python -m src.main --api-key your_nebula_block_api_key
    

    This method will override any API key set in the .env file.

  2. Using a .env file: Create a file named .env in the root directory of the project and add your API key to it:

    NEBULA_BLOCK_API_KEY=your_nebula_block_api_key
    

    The application will automatically load the API key from this file if the --api-key argument is not provided.

Running Tests

To run the unit tests, ensure your virtual environment is activated and pytest is installed (it will be installed with pip install -e .):

bash
pytest

You should see output indicating that the tests passed.

Integrating with an MCP Client

To utilize the NebulaBlock API MCP server, you need to configure your MCP client (e.g., VS Code with an MCP extension) to connect to this server. Below is an example configuration for a settings.json file:

json
{
  "mcpServers": {
    "nebula": {
      "command": "~/path/to/uv",
      "args": [
        "--directory",
        "~/path/to/nebulablock_mcp",
        "run",
        "-m",
        "src.main",
        "--api-key=YOUR_API_KEY"
      ]
    }
  }
}
  • Replace ~/path/to/uv with the actual path to your uv executable.
  • Replace ~/path/to/nebulablock_mcp with the actual path to your project directory.
  • Replace YOUR_API_KEY with your actual NebulaBlock API key.

License

This project is licensed under the MIT License. See the LICENSE file (if created) for details.

Star History

Star History Chart

Repository Owner

Nebula-Block-Data
Nebula-Block-Data

Organization

Repository Details

Language Python
Default Branch main
Size 36 KB
Contributors 2
MCP Verified Nov 11, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • FastMCP

    FastMCP

    The fast, Pythonic way to build MCP servers and clients.

    FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.

    • 20,201
    • MCP
    • jlowin/fastmcp
  • Insforge MCP Server

    Insforge MCP Server

    A Model Context Protocol server for seamless integration with Insforge and compatible AI clients.

    Insforge MCP Server implements the Model Context Protocol (MCP), enabling smooth integration with various AI tools and clients. It allows users to configure and manage connections to the Insforge platform, providing automated and manual installation methods. The server supports multiple AI clients such as Claude Code, Cursor, Windsurf, Cline, Roo Code, and Trae via standardized context management. Documentation and configuration guidelines are available for further customization and usage.

    • 3
    • MCP
    • InsForge/insforge-mcp
  • Codex MCP Server

    Codex MCP Server

    An MCP-compatible server delivering enriched blockchain data for AI models.

    Codex MCP Server implements the Model Context Protocol to provide enriched blockchain data from Codex. It is compatible with MCP clients such as Claude Desktop and Claude CLI, allowing seamless integration in AI workflows that require blockchain context. Users can run the server locally or via npx, and configure it for various MCP-compatible tools using their Codex API key.

    • 20
    • MCP
    • Codex-Data/codex-mcp
  • Perplexity MCP Server

    Perplexity MCP Server

    MCP Server integration for accessing the Perplexity API with context-aware chat completion.

    Perplexity MCP Server provides a Model Context Protocol (MCP) compliant server that interfaces with the Perplexity API, enabling chat completion with citations. Designed for seamless integration with clients such as Claude Desktop, it allows users to send queries and receive context-rich responses from Perplexity. Environment configuration for API key management is supported, and limitations with long-running requests are noted. Future updates are planned to enhance support for client progress reporting.

    • 85
    • MCP
    • tanigami/mcp-server-perplexity
  • CyberChef API MCP Server

    CyberChef API MCP Server

    MCP server enabling LLMs to access CyberChef's powerful data analysis and processing tools.

    CyberChef API MCP Server implements the Model Context Protocol (MCP), interfacing with the CyberChef Server API to provide structured tools and resources for LLM/MCP clients. It exposes key CyberChef operations such as executing recipes, batch processing, retrieving operation categories, and utilizing the magic operation for automated data decoding. The server can be configured and managed via standard MCP client workflows and supports context-driven tool invocation for large language models.

    • 29
    • MCP
    • slouchd/cyberchef-api-mcp-server
  • books-mcp-server

    books-mcp-server

    A server implementation supporting Model Context Protocol integration with cherry-studio.

    books-mcp-server allows users to set up a Model Context Protocol (MCP) compliant server for managing and interacting with AI models. It enables integration with cherry-studio through STDIO commands and structured server configurations. The tool provides straightforward setup instructions and supports launching the server with customizable parameters, making it suitable for various AI context management tasks.

    • 5
    • MCP
    • VmLia/books-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results