Sponsored by Deepsite.site

Blues Notehub MCP Server (Python)

Created By
blues8 months ago
MCP Server Implementation of the Blues Notehub API
Content

Blues Notehub MCP Server (Python)

This is a Model Context Protocol (MCP) server implementation that interacts with the Blues Notehub API using the official notehub_py SDK. It allows large language models to interface with your Blues Notehub projects, devices, and data.

What is MCP?

Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. It standardizes how LLMs interact with external tools and services.

Prerequisites

  • Python 3.8 or higher
  • A Blues Notehub account (https://notehub.io)
  • Your Notehub account username (email) and password

Installation

  1. Clone or download this repository.
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install the dependencies:
    pip install -r requirements.txt
    

Option 2: Using uv (faster alternative)

  1. Install uv following the instructions at https://github.com/astral-sh/uv
  2. Create the environment and install dependencies:
    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    uv pip install -r requirements.txt
    

Running the Server

Start the server with:

python notehub.py

The MCP server will run using stdio as the transport layer, which is the standard transport for most MCP clients.

Authentication Method

This server uses X-Session-Token authentication with the Notehub API. You will need to provide your Notehub username (email) and password when using the tools. The server will automatically:

  1. Obtain a session token using the /auth/login endpoint
  2. Cache the token for up to 29 minutes (tokens expire after 30 minutes)
  3. Automatically handle token refreshing when needed

Connecting to an MCP Client

Claude for Desktop (macOS/Windows)

  1. Install Claude for Desktop
  2. Update your Claude Desktop configuration file:

For macOS:

mkdir -p ~/Library/Application\ Support/Claude/

Edit or create ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "notehub": {
      "command": "python",
      "args": [
        "--directory",
        "/path/to/your/mcp-server",
        "run",
        "notehub.py"
      ],
      "availableTo": ["claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-5-sonnet-20240307", "claude-3-haiku-20240307"]
    }
  }
}

For Windows, the config file is located at: %APPDATA%\Claude\claude_desktop_config.json

  1. Restart Claude for Desktop

Custom MCP Client

If you're building a custom MCP client, you'll need to:

  1. Start this server as a child process
  2. Communicate with it using stdin/stdout following the MCP protocol
  3. Configure your client to discover the tools this server exposes

Available Tools

This MCP server exposes the following tools:

  1. get-projects - Get all accessible Notehub projects
  2. get-project-devices - Get all devices for a specific project (with optional filtering)
  3. get-project-events - Get all events for a specific project (with optional filtering)
  4. send-note - Send a note to a specific device

Usage Examples

When using with Claude for Desktop, you can ask questions like:

  • "Can you show me all my Notehub projects? My username is example@email.com and my password is mypassword123"
  • "Fetch all devices from my project app:12345 using my Notehub username (example@email.com) and password"
  • "Get the last 10 events from device dev:12345 in project app:12345"
  • "Send a note to device dev:12345 in project app:12345 with the following payload: {"message": "Hello from MCP"}"

Security Considerations

  • This server requires your Notehub username and password to function.
  • Never share your configuration file containing paths or credentials.
  • The MCP protocol runs locally, so your credentials are not sent to remote servers.
  • The server implements token caching for better performance while maintaining security.
  • If your Notehub account was created using "Sign in with GitHub", you'll need to set a password in the Account settings panel in Notehub.io first.

Troubleshooting

If you encounter issues:

  1. Check the logs for any error messages:

    • macOS: ~/Library/Logs/Claude/mcp-server-notehub.log
    • Windows: %APPDATA%\Claude\Logs\mcp-server-notehub.log
  2. Verify your Notehub credentials are correct.

  3. If you signed up with GitHub, make sure you've set a password in your Notehub account settings.

  4. Make sure the server is running with the correct Python version.

  5. Ensure both mcp and notehub_py packages are properly installed.

Extending the Server

To add more capabilities to this server:

  1. Extend the functions with additional Notehub API features
  2. Register new tools with @mcp.tool() decorator
  3. Add more filtering options to existing tools
  4. Implement additional error handling and reporting

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"