Skip to main content
Glama
ziamalik

Bay Street MCP

by ziamalik

Bay Street MCP

Сервер протокола контекста модели (MCP), который позволяет Claude (и любому клиенту MCP) ссылаться на актуальные канадские правила финансовых услуг: OSFI, PIPEDA, FINTRAC, Закон Квебека 25.

Предотвратите галлюцинации вашего ИИ при ответах на вопросы о соответствии требованиям для канадского финтеха.

CI License: MIT Python 3.13+ Status: Early Development

Статус

🚧 Ранняя стадия разработки. Каркас проекта и дорожная карта v0.1 были добавлены в первом коммите. Первый рабочий релиз (v0.1.0) запланирован примерно через 6 недель и будет создаваться постепенно. Следите за историей коммитов, чтобы видеть еженедельный прогресс.

Компонент

Состояние

Каркас проекта, CI, лицензия, зависимости, заглушка сервера MCP

✅ Готово

Интеграция руководства OSFI E-21

🚧 В работе

Инструмент MCP compliance_lookup, возвращающий реальные цитируемые отрывки

⬜ Запланировано

Сквозное дымовое тестирование Claude Desktop

⬜ Запланировано

Полный текст PIPEDA

⬜ Запланировано

Руководство FINTRAC AML/ATF

⬜ Запланировано

Закон Квебека 25

⬜ Запланировано

Демонстрационная запись + первый публичный релиз (тег v0.1.0)

⬜ Запланировано

Если вам это нужно для вашего инструментария канадского финтех-ИИ, подпишитесь на репозиторий или поставьте звезду. Существенные отзывы по дорожной карте приветствуются через Issues.

Related MCP server: india-reg-mcp

Демонстрация

Демонстрация появится с релизом v0.1.0: 90-секундная запись экрана, показывающая, как Claude Desktop вызывает compliance_lookup и отвечает на регуляторный вопрос со ссылкой на исходный документ.

Почему я это создал

Я провел 20 лет в сфере канадских финансовых услуг (TD, Canada Life, Gore Mutual). Каждый канадский финтех, с которым я общался и который внедряет функции ИИ, сталкивается с одной и той же проблемой: их LLM уверенно выдумывает ответы о риск-менеджменте по OSFI E-21 или обязательствах по раскрытию информации по PIPEDA, потому что в обучающих данных в 100 раз больше регулирующих норм США/ЕС, чем канадских.

Этот сервер MCP решает данную проблему. Направьте на него Claude, задайте любой вопрос о канадском финансовом регулировании и получите ответ, основанный на реальном документе со ссылками.

Быстрый старт (запланировано для v0.1, пока не работает)

Инструкции ниже описывают, как сервер будет работать после выхода v0.1.0. Они не работают с текущим коммитом. Отслеживание прогресса ведется в таблице «Статус» выше.

  1. Клонируйте и установите:

    git clone https://github.com/ziamalik/bay-street-mcp.git
    cd bay-street-mcp
    uv sync
  2. Скачайте PDF с правилами. Для примера v0.1 возьмите руководство OSFI E-21 (Operational Risk Management and Resilience) с сайта https://www.osfi-bsif.gc.ca/.

  3. Загрузите его:

    uv run bay-street-ingest data/osfi-e21.pdf \
      --regulation "OSFI Guideline E-21" \
      --jurisdiction CA \
      --source-url "https://www.osfi-bsif.gc.ca/en/guidance/guidance-library/operational-risk-management-resilience"
  4. Добавьте в ваш claude_desktop_config.json (обычно находится по адресу ~/Library/Application Support/Claude/claude_desktop_config.json на macOS или %APPDATA%\Claude\claude_desktop_config.json на Windows):

    {
      "mcpServers": {
        "bay-street": {
          "command": "uv",
          "args": ["--directory", "/absolute/path/to/bay-street-mcp", "run", "bay-street-mcp"]
        }
      }
    }

    См. claude_desktop_config.example.json для альтернативного вызова, если вы установили пакет глобально.

  5. Перезапустите Claude Desktop. Спросите:

    Что говорит OSFI E-21 об управлении рисками ИИ?

    Claude вызовет compliance_lookup и ответит с цитатами.

Что даст v0.1 (после выпуска)

  • Один инструмент MCP: compliance_lookup(query, top_k), возвращающий отрывки с метаданными цитирования {regulation, jurisdiction, page, source_url}

  • Одно правило, поддерживаемое «из коробки»: руководство OSFI E-21 (вы загружаете PDF)

  • Векторное хранилище Chroma, сохраняемое на диске

  • Транспорт Stdio (работает с Claude Desktop, Claude Code, Cursor, любым клиентом MCP)

  • Около 400 строк кода на Python

Последующие версии добавят PIPEDA, FINTRAC, Закон Квебека 25, затем расширятся до OSFI E-23 (риск моделей) и B-13 (технологический и киберриск). См. дорожную карту ниже.

Дорожная карта

v0.1 (в процессе, ожидается ~6 недель):

  • [x] Каркас проекта, CI, лицензия, зависимости, заглушка сервера MCP

  • [ ] Интеграция руководства OSFI E-21 (сквозная)

  • [ ] Инструмент MCP compliance_lookup, возвращающий реальные цитируемые отрывки

  • [ ] Сквозная демонстрация Claude Desktop (Loom)

  • [ ] Первый публичный релиз (тег v0.1.0)

v0.2 и далее:

  • [ ] Полный текст PIPEDA + резюме

  • [ ] Руководство FINTRAC AML/ATF

  • [ ] Закон Квебека 25

  • [ ] OSFI E-23 (управление рисками моделей)

  • [ ] OSFI B-13 (технологический и киберриск)

  • [ ] Автоматическое обновление с сайтов регуляторов с обнаружением изменений

  • [ ] Конечные точки ресурсов для получения документа целиком

  • [ ] Форматирование цитат (APA, обычный текст)

  • [ ] Готовый образ Docker

Как это работает

User question  →  Claude  →  MCP tool call  →  Chroma similarity search
       →  top-k passages with metadata  →  Claude synthesizes answer with citations

Скрипт загрузки разбивает каждое правило на фрагменты по ~800 слов с перекрытием в 100 слов и сохраняет их в Chroma с метаданными {regulation, jurisdiction, page, source_url}. Инструмент MCP возвращает отрывки с полными метаданными цитирования, поэтому Claude может указывать номера страниц и исходные URL-адреса в своем ответе.

Почему MCP

MCP (Model Context Protocol) становится стандартным интерфейсом для подключения LLM к внешнему контексту. Предоставление этого в виде сервера MCP означает, что одни и те же знания о соответствии требованиям можно использовать в Claude Desktop, Claude Code, Cursor и любом будущем клиенте MCP без необходимости каждый раз создавать пользовательскую интеграцию.

Разработка

uv sync --all-extras
uv run pytest
uv run ruff check .

Лицензия

MIT. Используйте, форкайте, выпускайте.

Об авторе

Создано Зиа Маликом — 20 лет в сфере канадских финансовых услуг, в настоящее время создает AppVet (аудит безопасности веб-приложений на базе ИИ) и пишет о финтех-инженерии с использованием ИИ.

Если вы работаете в канадском финтехе и хотите, чтобы это было расширено для вашей конкретной регуляторной области, откройте issue или свяжитесь со мной.

Available Tools

1 tool
compliance_lookupA

Search Canadian financial-services regulations (OSFI, PIPEDA, FINTRAC, Quebec Law 25) and return the most relevant passages with citation metadata. Use this tool whenever the user asks about Canadian financial regulation, compliance, AI/data governance for Canadian financial institutions, AML/ATF, operational risk, model risk, or related topics.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesNatural-language question about Canadian financial-services compliance.
top_kNoNumber of passages to return. Default 5, max 10.

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It implies a read-only operation by stating 'search and return', but does not explicitly confirm non-destructive behavior or disclose any side effects, rate limits, or auth requirements. It adds some value by mentioning citation metadata but lacks full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, each adding value. The first sentence states functionality, the second provides usage guidance. No unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description briefly mentions returning 'most relevant passages with citation metadata', but does not detail the output structure (e.g., fields, format, pagination). For a search tool, more specificity on the return value would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both 'query' and 'top_k' having descriptions. The description does not add any additional meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches Canadian financial-services regulations, listing specific sources (OSFI, PIPEDA, FINTRAC, Quebec Law 25), and returns relevant passages with citation metadata. The verb 'search' and resource 'Canadian financial-services regulations' are specific, and there are no sibling tools to distinguish from.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this tool whenever the user asks about Canadian financial regulation, compliance, AI/data governance for Canadian financial institutions, AML/ATF, operational risk, model risk, or related topics.' This provides clear guidance on when to use, even though no alternatives exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedcompliance_lookup

TDQS

A4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap with other tools.

Naming Consistency5/5

The single tool name 'compliance_lookup' follows a clear verb_noun convention, which is consistent by default.

Tool Count3/5

A single tool for a broad domain like Canadian financial regulations feels slightly thin, but it may be acceptable for a focused lookup utility.

Completeness2/5

The tool only supports lookup operations, lacking capabilities like listing categories, comparing regulations, or retrieving updates, which leaves significant gaps for comprehensive compliance work.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that gives Claude searchable, cited access to RBI and SEBI regulatory documents — circulars, master directions, notifications, and regulations.
    44 npm
    2
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server to fetch Japanese financial laws and regulations from the e-Gov API, preventing hallucinations in Claude's responses. Supports 9 domains including Financial Instruments and Exchange Act, Banking Act, etc.
    5
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for token-efficient access to Open Finance Brasil rules, enabling coding agents to search and retrieve specific regulations, OpenAPI specs, and business rules through progressive disclosure.
    4
    35 npm
    MIT