Skip to main content

MCP server for AIND metadata

Project description

AIND Metadata MCP Server

License Code Style semantic-release: angular Interrogate Coverage Python

An MCP (Model Context Protocol) server that provides access to AIND (Allen Institute for Neural Dynamics) metadata and data assets through a comprehensive set of tools and resources.

Features

This MCP server provides tools for:

  • Data Retrieval: Query MongoDB collections with filters and projections
  • Aggregation: Execute complex MongoDB aggregation pipelines
  • Schema Exploration: Access detailed schema examples and documentation
  • NWB File Access: Load and explore NWB (Neurodata Without Borders) files
  • Data Summaries: Generate AI-powered summaries of data assets

Installation

Install uv if you haven't already - following this documentation

Install the MCP server using uv:

uv tool install aind-metadata-mcp

Or using pip:

pip install aind-metadata-mcp

Configuration

For Cline (VSCode Extension)

In order to ensure that the MCP server runs in your preferred client, you will have to download the aind-metadata-mcp package to your console. If space is an issue, please set UV_CACHE_DIR and UV_TOOL_DIR to locations that have capacity before proceeding with the next step.

  1. Simpler version of install Run uv tool install aind-metadata-mcp on your terminal and proceed below to configuring your MCP clients.

  2. If the above step didn't work:

Create virtual environment with python 3.11 in IDE

# Instructions for Conda
conda create -n <my_env> python=3.11
conda activate <my_env>

# Instructions for virtual environment
py -3.11 -m venv .venv
# Windows startup
.venv\Scripts\Activate.ps1 
# Mac/ Linux startup
source .venv/bin/activate 

Run the following commands in your IDE terminal.

pip install uv
uvx aind-metadata-mcp

If all goes well, and you see the following notice - Starting MCP server 'aind_data_access' with transport 'stdio'-, you should be good for the set up in your client of choice!

Cursor IDE

  1. Install the MCP server:

    uv tool install aind-metadata-mcp
    
  2. Create the MCP configuration file:

    mkdir -p ~/.cursor
    
  3. Create ~/.cursor/mcp.json with the following content:

    {
      "mcpServers": {
        "aind-data-access": {
          "command": "aind-metadata-mcp",
          "args": [],
          "env": {}
        }
      }
    }
    
  4. Important: Replace aind-metadata-mcp with the full path if needed:

    which aind-metadata-mcp
    

    Use the full path (e.g., /Users/username/.local/bin/aind-metadata-mcp) in the command field.

  5. Restart Cursor completely (Cmd+Q then reopen)

Note: Cursor uses a different MCP configuration system than VSCode. The configuration must be in ~/.cursor/mcp.json, not in the main settings.json file.

Instructions for use in MCP clients

JSON Config files to add MCP servers in clients should be structured like this

{
    "mcpServers": {

    }
}

Insert the following lines into the mcpServers dictionary

"aind_data_access": {
      "disabled": false,
      "timeout": 300,
      "type": "stdio",
      "command": "aind-metadata-mcp"
}

Note that after configuring the JSON files, it will take a few minutes for the serve to populate in the client.

Claude Desktop App

  • Click the three lines at the top left of the screen.
  • File > Settings > Developer > Edit config

Cline in VSCode

  • Ensure that Cline is downloaded to VScode
  • Click the three stacked rectangles at the top right of the Cline window
  • Installed > Configure MCP Servers
  • Close and reopen VSCode

Github Copilot in VSCode

  • Command palette (ctr shift p)
  • Search for MCP: Add server
  • Select Manual Install / stdio
  • When prompted for a command, input uvx aind-data-access
  • Name your server
  • Close and reopen VSCode
  • In Copilot chat -> Select agent mode -> Click the three stacked rectangles to configure tools
  • In order to enable the agent to reply with context of the AIND API, you'll have to manually add the .txt files (under resources) in this repository

For use in Code Ocean

  • Locate the following capsule, to spin up Cline and Co-pilot with the aind-metadata-mcp pre-installed.
  • Refer the the code ocean MCP server for additional support
  • Either pin version 4.2, or 4.5

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

aind_metadata_mcp-0.5.2.tar.gz (154.6 kB view details)

Uploaded Source

Built Distribution

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

aind_metadata_mcp-0.5.2-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file aind_metadata_mcp-0.5.2.tar.gz.

File metadata

  • Download URL: aind_metadata_mcp-0.5.2.tar.gz
  • Upload date:
  • Size: 154.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aind_metadata_mcp-0.5.2.tar.gz
Algorithm Hash digest
SHA256 f24e75a55880cffc61593518f4cee5ef59b16cd2e0d8d77606ed4853a9801a77
MD5 dd859245764e12fdc86bdf9dd34e83bb
BLAKE2b-256 45579cf2616d590acfbafd7dafc3461c3ff94091720e763e6d9acd357ca6f153

See more details on using hashes here.

File details

Details for the file aind_metadata_mcp-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for aind_metadata_mcp-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 165a2295ced81dc1f4dfa1e6361adfe7e2c1773c01350685f7674f6da5e5536b
MD5 7cc7880bdbb07ddbbca0849d7c9ac874
BLAKE2b-256 1051185c9141c00e969ac5cf5bd82ab29f2a0d6ac206396a18fbbb302c124208

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