Skip to main content
Glama
ziamalik

Bay Street MCP

by ziamalik

Bay Street MCP

Claude(およびあらゆるMCPクライアント)が、OSFI、PIPEDA、FINTRAC、ケベック州法25条といったカナダの金融サービス規制を実際に引用できるようにするModel Context Protocolサーバー。

AIがカナダのフィンテックに関するコンプライアンスの回答をハルシネーション(幻覚)することを防ぎます。

CI License: MIT Python 3.13+ Status: Early Development

ステータス

🚧 初期開発段階。 プロジェクトの足場とv0.1のロードマップが最初のコミットで作成されました。最初の動作可能なリリース(v0.1.0)を約6週間後を目指し、段階的に構築しています。毎週の進捗についてはコミット履歴を確認してください。

コンポーネント

状態

プロジェクトの足場、CI、ライセンス、依存関係、MCPサーバーのスタブ

✅ 出荷済み

OSFIガイドラインE-21の取り込み機能

🚧 次回

実際の引用箇所を返す compliance_lookup MCPツール

⬜ 計画中

Claude Desktopでのエンドツーエンドのスモークテスト

⬜ 計画中

PIPEDA全文

⬜ 計画中

FINTRAC AML/ATFガイダンス

⬜ 計画中

ケベック州法25条

⬜ 計画中

デモ録画 + 初のパブリックリリース(v0.1.0タグ)

⬜ 計画中

カナダのフィンテックAIツールにこれが必要な場合は、リポジトリをウォッチまたはスターしてください。ロードマップに関する実質的なフィードバックはIssueにて歓迎します。

Related MCP server: india-reg-mcp

デモ

デモはv0.1.0リリース時に公開されます:Claude Desktopが compliance_lookup を呼び出し、ソースドキュメントへの引用付きで規制に関する質問に回答する90秒の画面録画です。

開発の背景

私は20年間、カナダの金融サービス(TD、Canada Life、Gore Mutual)に携わってきました。AI機能をリリースしようとしているカナダのフィンテック企業は皆、同じ壁にぶつかっています。LLMがOSFI E-21のリスク管理やPIPEDAの開示義務について自信満々に回答を捏造してしまうのです。なぜなら、トレーニングデータにはカナダの規制よりも米・EUの規制が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の例として、https://www.osfi-bsif.gc.ca/ からOSFIガイドラインE-21(オペレーショナル・リスク管理とレジリエンス)を取得してください。

  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 に追加します(通常、macOSでは ~/Library/Application Support/Claude/claude_desktop_config.json、Windowsでは %APPDATA%\Claude\claude_desktop_config.json にあります):

    {
      "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はAIリスク管理について何と言っていますか?

    Claudeが compliance_lookup を呼び出し、引用付きで回答します。

v0.1で提供されるもの(リリース時)

  • 1つのMCPツール: {regulation, jurisdiction, page, source_url} の引用メタデータを含む箇所を返す compliance_lookup(query, top_k)

  • 標準でサポートされる1つの規制: OSFIガイドラインE-21(PDFを読み込む必要があります)

  • ディスク永続化可能なChromaベクターストア

  • Stdioトランスポート(Claude Desktop、Claude Code、Cursor、あらゆるMCPクライアントで動作)

  • 約400行のPythonコード

以降のバージョンでは、PIPEDA、FINTRAC、ケベック州法25条を追加し、その後OSFI E-23(モデルリスク)およびB-13(技術・サイバーリスク)に拡張します。以下のロードマップを参照してください。

ロードマップ

v0.1(進行中、ETA 約6週間):

  • [x] プロジェクトの足場、CI、ライセンス、依存関係、MCPサーバーのスタブ

  • [ ] OSFIガイドラインE-21の取り込み機能のエンドツーエンド実装

  • [ ] 実際の引用箇所を返す compliance_lookup MCPツール

  • [ ] エンドツーエンドの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語の重複あり)でチャンク化し、{regulation, jurisdiction, page, source_url} というメタデータと共にChromaに保存します。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。自由に使用、フォーク、出荷してください。

について

Zia Malikによって構築されました。カナダの金融サービスで20年の経験を持ち、現在は AppVet(AIを活用したWebアプリセキュリティ監査)を構築し、フィンテックグレードのAIエンジニアリングについて執筆しています。

カナダのフィンテック企業に所属しており、特定の規制領域のためにこれを拡張したい場合は、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