Skip to content

MCP API

SecondBrain ships a curated MCP Marketplace registry and CLI for discovering, searching, and configuring Model Context Protocol servers.

Marketplace entries are discovery aids, not execution authority. A server still has to pass local zero-trust policy before it can run: reviewed command allowlists for stdio, signed manifest metadata, sandbox profile, per-client consent, capability policy, and quarantine/ban overrides.

Marketplace CLI

sb mcp marketplace list                          # all servers
sb mcp marketplace list --category development   # filter by category
sb mcp marketplace list --trust trusted          # filter by trust level
sb mcp marketplace search "postgres"             # full-text search
sb mcp marketplace info github                   # detailed entry
sb mcp marketplace configure sqlite              # generate config snippet

Python API

from brain.mcp.marketplace import list_servers, search_servers, get_server

# List all trusted development servers
servers = list_servers(category="development", trust="trusted")

# Search across id, name, description, tags
results = search_servers("sql")

# Get a specific server
entry = get_server("github")
print(entry.name, entry.trust, entry.config_template)

API Reference

brain.mcp.marketplace.MarketplaceEntry dataclass

MarketplaceEntry(id: str, name: str, description: str, category: Category, author: str, trust: TrustLevel, tags: list[str], install: dict[str, str], config_template: dict, homepage: str = '', docs: str = '', secondbrain_notes: str = '')

A single entry in the MCP marketplace.

to_dict

to_dict() -> dict
Source code in brain/mcp/marketplace_types.py
def to_dict(self) -> dict:
    return {
        "id": self.id,
        "name": self.name,
        "description": self.description,
        "category": self.category,
        "author": self.author,
        "trust": self.trust,
        "tags": self.tags,
        "install": self.install,
        "config_template": self.config_template,
        "homepage": self.homepage,
        "docs": self.docs,
        "secondbrain_notes": self.secondbrain_notes,
    }

brain.mcp.marketplace.list_servers

list_servers(*, category: str | None = None, trust: str | None = None) -> list[MarketplaceEntry]

Return all marketplace entries, optionally filtered by category or trust level.

Source code in brain/mcp/marketplace.py
def list_servers(
    *, category: str | None = None, trust: str | None = None
) -> list[MarketplaceEntry]:
    """Return all marketplace entries, optionally filtered by category or trust level."""
    entries = list(_REGISTRY)
    if category:
        entries = [e for e in entries if e.category == category]
    if trust:
        entries = [e for e in entries if e.trust == trust]
    return entries

brain.mcp.marketplace.search_servers

search_servers(query: str) -> list[MarketplaceEntry]

Case-insensitive search across name, description, tags, and id.

Source code in brain/mcp/marketplace.py
def search_servers(query: str) -> list[MarketplaceEntry]:
    """Case-insensitive search across name, description, tags, and id."""
    q = query.lower()
    return [
        e
        for e in _REGISTRY
        if q in e.name.lower()
        or q in e.description.lower()
        or any(q in tag for tag in e.tags)
        or q in e.id
    ]

brain.mcp.marketplace.get_server

get_server(server_id: str) -> MarketplaceEntry | None

Return a marketplace entry by ID, or None if not found.

Source code in brain/mcp/marketplace.py
def get_server(server_id: str) -> MarketplaceEntry | None:
    """Return a marketplace entry by ID, or None if not found."""
    return _INDEX.get(server_id)

Registry

ID Category Trust Description
github development trusted GitHub repos, PRs, issues, code search, and Actions
filesystem knowledge trusted Local file read/write with configured roots
brave-search search trusted Web, local, image, video, news, and LLM-context search via Brave
fetch knowledge trusted URL fetch and HTML-to-markdown conversion
context7 development cautious Current library/framework documentation for coding agents
postgres data trusted PostgreSQL query interface
sqlite data trusted SQLite query interface
supabase data cautious Project-scoped Supabase database, logs, advisors, and docs
neon data cautious Neon Postgres projects, branches, schema, SQL, and migrations
slack communication trusted Slack channel search, messages, and replies
notion productivity trusted Notion pages, databases, and blocks
puppeteer infrastructure cautious Legacy headless browser automation
playwright infrastructure cautious Browser automation through Playwright accessibility snapshots
sentry development trusted Sentry issues, events, and performance traces
grafana infrastructure cautious Grafana metrics, logs, dashboards, alerts, incidents, and OnCall
linear productivity trusted Linear issues, cycles, projects, and sprint context
git development cautious Local Git status, diff, log, branch, and commit operations
figma productivity cautious Figma design-to-code context and canvas workflows
atlassian-rovo productivity cautious Jira, Confluence, and Compass context through Atlassian Rovo
firecrawl search cautious Web search, scrape, crawl, and structured extraction
docker-mcp-gateway infrastructure cautious Docker MCP Catalog gateway for curated containerized servers