Cbn MCP
A Model Context Protocol (MCP) server for accessing Central Bank of Nigeria (CBN) data and circulars. Connect this server to Cursor, Claude Desktop, or any MCP-compatible application to access CBN regulatory information directly in your AI conversations. π
Ask AI about Cbn MCP
Powered by Claude Β· Grounded in docs
I know everything about Cbn MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
CBN MCP Server π¦

A Model Context Protocol (MCP) server for accessing Central Bank of Nigeria (CBN) data and circulars. Connect this server to Cursor, Claude Desktop, or any MCP-compatible application to access CBN regulatory information directly in your AI conversations. π
Built with mcp_server_dart - A developer-friendly MCP framework for Dart with annotations and code generation that I created. πͺ
Features β¨
MCP Tools π οΈ
Circulars Tools π
- getAllCirculars: Fetch all CBN circulars with optional filtering by date range and category π
- getCircularById: Get a specific CBN circular by its ID π
- searchCirculars: Search CBN circulars by title or description keywords π
- fetchCircularPdf: Download and read PDF content of CBN circulars π
- fetchCircularPdfById: Download PDF content by circular ID π₯
- getCircularPdfUrl: Get the direct download URL for a CBN circular PDF by its ID π
- getCircularsForLLMAnalysis: Get recent CBN circulars with PDF URLs formatted for LLM analysis π€
Exchange Rates Tools π±
- getAllExchangeRates: Fetch all CBN exchange rates with optional filtering by date range and currency π±
- getExchangeRateById: Get a specific CBN exchange rate by its ID π
Financial Data Tools π
- getAllFinancialData: Fetch all CBN financial data with optional filtering by date range and financial metrics π
- getFinancialDataById: Get a specific CBN financial data by its ID π
MCP Resources π
- cbnApiStatus: Current status and health of the CBN API connection π
- serverInfo: Information about this CBN MCP server βΉοΈ
- availableCircularPdfs: List of available circular PDFs with their URIs π
- randomFact: A random fact about the CBN π²
MCP Prompts π¬
- circularSummary: Generate a summary prompt for CBN circulars analysis π
- regulatoryAnalysis: Generate prompts for regulatory compliance analysis of CBN circulars βοΈ
Quick Start π
Option 1: Download Pre-built Binary (Easiest) β‘
- Go to Releases π¦
- Download the
cbn_mcpexecutable β¬οΈ - Make it executable:
chmod +x cbn_mcpπ§ - Use path:
/path/to/cbn_mcpπ
Option 2: Run with Dart (If you have Dart installed) π―
- Clone this repository:
git clone https://github.com/chiziaruhoma/cbn_mcp.gitπ - Navigate to directory:
cd cbn_mcpπ - Install dependencies:
dart pub getπ¦ - Use command:
dart run bin/main.dartβΆοΈ
Option 3: Build from Source π¨
- Follow Option 2 steps 1-3 β¬οΈ
- Build executable:
dart compile exe bin/main.dart -o cbn_mcpποΈ - Use path:
/path/to/cbn_mcpπ
Integration with AI Applications π€
Cursor IDE π»
-
Open Cursor settings (Cmd/Ctrl + ,) βοΈ
-
Go to "Features" β "Model Context Protocol" π§
-
Add a new MCP server with one of these configurations: π
Using pre-built binary: β‘
{ "name": "cbn-mcp", "command": "/path/to/cbn_mcp" }Using Dart (if you have Dart installed): π―
{ "name": "cbn-mcp", "command": "dart", "args": ["run", "bin/main.dart"], "cwd": "/path/to/cbn_mcp" } -
Restart Cursor π
-
Now you can ask questions like: "What are the latest CBN circulars?" or "Find CBN regulations about forex trading" π¬
Claude Desktop π₯οΈ
-
Open Claude Desktop settings βοΈ
-
Navigate to the MCP servers configuration π§
-
Add the CBN MCP server with one of these configurations: π
Using pre-built binary: β‘
{ "mcpServers": { "cbn-mcp": { "command": "/path/to/cbn_mcp" } } }Using Dart (if you have Dart installed): π―
{ "mcpServers": { "cbn-mcp": { "command": "dart", "args": ["run", "bin/main.dart"], "cwd": "/path/to/cbn_mcp" } } } -
Restart Claude Desktop π
-
The CBN tools will be available in your conversations π
Other MCP-Compatible Applications π
For any application that supports MCP: π
- Add the server configuration pointing to the
cbn_mcpexecutable π - The server will expose CBN data access tools to your AI assistant π€
Usage Examples π‘
Once integrated, you can ask your AI assistant: π£οΈ
Circulars Examples π
- "What are the latest CBN circulars from this month?" π
- "Find all CBN regulations related to cryptocurrency" π°
- "Get me the details of CBN circular BSD/DIR/GEN/LAB/11/020" π
- "Summarize the key points from recent CBN monetary policy circulars" π
- "What are the compliance requirements for banks based on recent CBN circulars?" βοΈ
Exchange Rates Examples π±
- "What is the current USD/NGN exchange rate?" π΅
- "Show me the exchange rates for the past week" π
- "Get the official CBN rate for EUR to NGN" πΆ
Financial Data Examples π
- "What are the current CBN monetary policy parameters?" ποΈ
- "Show me the repo rates for the last month" π
- "What is the current cash reserve ratio?" π°
- "Get the opening balance data for this quarter" π
Development π¨βπ»
Prerequisites π
- Dart SDK ^3.9.2
- Git
Setup π οΈ
-
Clone the repository:
git clone https://github.com/chiziaruhoma/cbn_mcp.git cd cbn_mcp -
Install dependencies:
dart pub get -
Generate mappable classes (if needed):
dart run build_runner build
Running the Server βΆοΈ
# Run directly with Dart
dart run bin/main.dart
# Or build and run executable
dart compile exe bin/main.dart -o cbn_mcp
./cbn_mcp
Testing π§ͺ
dart test
Building for Distribution π¦
# Build executable
dart compile exe bin/main.dart -o cbn_mcp
# The executable can be distributed and run on any compatible system
Project Structure π
lib/
βββ cbn.dart # Main MCP server class
βββ cbn.mcp.dart # Generated MCP annotations
βββ core/
β βββ api/
β β βββ api_client.dart # HTTP client for CBN API
β βββ utils/
β βββ logger.dart # Logging utilities
βββ models/ # Data models with mappable annotations
β βββ circular.dart # Circular data models
β βββ financials.dart # Financial data models
β βββ rates.dart # Exchange rates models
β βββ random.dart # Random fact models
β βββ models.dart # Base model classes
βββ services/ # Business logic services
βββ circulars.dart # Circulars API service
βββ financials.dart # Financial data service
βββ rates.dart # Exchange rates service
βββ prompt.dart # MCP prompt service
βββ status.dart # Status and info service
βββ services.dart # Base service classes
Contributing π€
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
API Documentation π
This project integrates with the Central Bank of Nigeria's public API. For more information about the available endpoints, visit the CBN Developer Portal.
License π
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments π
- Central Bank of Nigeria for providing the public API
- The MCP community for the protocol specification
- mcp_server_dart for the Dart MCP framework
