Skip to main content

A Model Context Protocol (MCP) server for accessing YouMind content

Project description

YouMind MCP Server

A Model Context Protocol (MCP) server built with FastMCP that provides access to YouMind content.

Features

  • Retrieve craft content by craft ID
  • Authenticated API access to YouMind
  • Simple FastMCP-based implementation

Prerequisites

  • Python 3.8 or higher
  • A YouMind account with valid authentication token

Installation

From PyPI (Recommended)

pip install youmind-mcp

From Source

  1. Clone this repository:
git clone <repository-url>
cd youmind-mcp
  1. Install the package:
pip install .

Or install in development mode:

pip install -e .

Configuration

Set up environment variables. You can either:

  1. Create a .env file:
cp .env.example .env
  1. Edit .env and add your YouMind authentication token:
YOUMIND_AUTH_TOKEN=sb-flzdupptcpbcowdaetfq-auth-token=your-actual-token-here

Or set the environment variable directly:

export YOUMIND_AUTH_TOKEN=sb-flzdupptcpbcowdaetfq-auth-token=your-actual-token-here

To get your authentication token:

  1. Log in to YouMind in your browser
  2. Open browser developer tools (F12)
  3. Go to Application/Storage > Cookies > https://youmind.com
  4. Copy the value of sb-flzdupptcpbcowdaetfq-auth-token
  5. Set YOUMIND_AUTH_TOKEN=sb-flzdupptcpbcowdaetfq-auth-token=<copied-value>

Usage

Running the Server

After installation, you can run the MCP server using:

youmind-mcp

Or as a Python module:

python -m youmind_mcp

The server will start and communicate via stdio (standard input/output), which is the standard transport for MCP servers.

Using with MCP Clients

Configure your MCP client (e.g., Claude Desktop, Cursor) to use this server:

After pip installation:

{
  "mcpServers": {
    "youmind": {
      "command": "youmind-mcp",
      "env": {
        "YOUMIND_AUTH_TOKEN": "sb-flzdupptcpbcowdaetfq-auth-token=your-token"
      }
    }
  }
}

Or using Python module:

{
  "mcpServers": {
    "youmind": {
      "command": "python",
      "args": ["-m", "youmind_mcp"],
      "env": {
        "YOUMIND_AUTH_TOKEN": "sb-flzdupptcpbcowdaetfq-auth-token=your-token"
      }
    }
  }
}

Available Tools

get_craft_content

Retrieves the plain text content of a craft by its ID.

Parameters:

  • craft_id (string, required): The ID of the craft to retrieve

Returns:

  • The plain text content of the craft, or an error message if the craft is not found or accessible

Example:

# Called via MCP protocol
get_craft_content(craft_id="019bc6bc-e1cc-79a2-a6fd-448b711a8895")

Project Structure

youmind-mcp/
├── youmind_mcp/          # Package directory
│   ├── __init__.py       # Package initialization
│   ├── __main__.py       # Module entry point
│   ├── server.py         # Main FastMCP server implementation
│   ├── api_client.py     # YouMind API client
│   └── exceptions.py     # Custom exceptions
├── pyproject.toml        # Package configuration
├── MANIFEST.in           # Distribution manifest
├── requirements.txt      # Python dependencies (for reference)
├── README.md             # This file
├── LICENSE               # MIT License
└── .env.example          # Environment variable template

Error Handling

The server handles various error scenarios:

  • 404 Not Found: Craft ID doesn't exist
  • 401 Unauthorized: Authentication token is invalid or expired
  • 403 Forbidden: No permission to access the craft
  • Network Errors: Connection issues with YouMind API
  • Invalid Input: Empty or malformed craft IDs

All errors are returned as user-friendly messages.

Development

Setup

  1. Clone the repository:
git clone <repository-url>
cd youmind-mcp
  1. Install in development mode with optional dependencies:
pip install -e ".[dev]"

Testing

You can test the API client directly:

from youmind_mcp.api_client import YouMindAPIClient

client = YouMindAPIClient()
response = client.get_craft("craft-id-here")
print(response)

Building for Distribution

To build the package:

python -m build

This will create distribution files in the dist/ directory.

Publishing to PyPI

  1. Build the package:
python -m build
  1. Upload to PyPI (requires credentials):
python -m twine upload dist/*

Support

For issues or questions, please open an issue in the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youmind_mcp-0.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youmind_mcp-0.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file youmind_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: youmind_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for youmind_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b3b33b38386f33da8f5fe687db2e11694ecf6b8df9d240bd7db01e6c1944ac6a
MD5 3018d1667401628639da1b64544a1841
BLAKE2b-256 acac69affadf30283ed153f5a0e98d3a90d49d0aaca8e32381318fad94c4ead3

See more details on using hashes here.

File details

Details for the file youmind_mcp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: youmind_mcp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for youmind_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 647fd698217e871bd4ea9aa0b748d89887794c340830f693750a306035f4b132
MD5 c693decfff62439513033b239aaf5dc5
BLAKE2b-256 02699949daf8588a0d6c0043eea1d5701e145f010a111c11135961381f61d2ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page