bcb-br-mcp 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +256 -228
- package/README.pt-BR.md +388 -0
- package/dist/index.js +89 -786
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts +280 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +725 -0
- package/dist/tools.js.map +1 -0
- package/dist/worker.d.ts +20 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +236 -0
- package/dist/worker.js.map +1 -0
- package/package.json +20 -8
package/README.md
CHANGED
|
@@ -1,49 +1,64 @@
|
|
|
1
1
|
# BCB BR MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/bcb-br-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/bcb-br-mcp)
|
|
5
|
+
[](https://smithery.ai/server/@sidneybissoli/bcb-br-mcp)
|
|
4
6
|
[](https://registry.modelcontextprotocol.io)
|
|
7
|
+
[](https://lobehub.com/mcp/sidneybissoli-bcb-br-mcp)
|
|
5
8
|
[](https://opensource.org/licenses/MIT)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
[Leia em Português](README.pt-BR.md)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
MCP (Model Context Protocol) server for accessing the Brazilian Central Bank's time series data (SGS/BCB).
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Query economic and financial indicators such as **Selic** (interest rate), **IPCA** (inflation), **exchange rates**, **GDP**, and more, directly from AI assistants like Claude.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
- **Últimos valores** - Obtém os N valores mais recentes de uma série
|
|
15
|
-
- **Metadados** - Informações detalhadas sobre séries (periodicidade, fonte, etc.)
|
|
16
|
-
- **Catálogo de séries populares** - Lista de 150+ indicadores econômicos organizados em 12 categorias
|
|
17
|
-
- **Busca inteligente** - Encontra séries por termo de busca (com ou sem acentos)
|
|
18
|
-
- **Indicadores atuais** - Valores mais recentes dos principais indicadores econômicos
|
|
19
|
-
- **Cálculo de variação** - Variação percentual entre períodos com estatísticas
|
|
20
|
-
- **Comparação de séries** - Compara múltiplas séries no mesmo período
|
|
16
|
+
## Features
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
- **Historical data** - Query time series values by code with date filters
|
|
19
|
+
- **Latest values** - Get the most recent N values of any series
|
|
20
|
+
- **Metadata** - Detailed information about series (frequency, source, etc.)
|
|
21
|
+
- **Popular series catalog** - 150+ economic indicators organized in 12 categories
|
|
22
|
+
- **Smart search** - Find series by keyword (accent-insensitive)
|
|
23
|
+
- **Current indicators** - Latest values for key economic indicators
|
|
24
|
+
- **Variation calculation** - Percentage change between periods with statistics
|
|
25
|
+
- **Series comparison** - Compare multiple series over the same period
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|------------|-----------|
|
|
26
|
-
| `bcb_serie_valores` | Consulta valores de uma série por código e período |
|
|
27
|
-
| `bcb_serie_ultimos` | Obtém os últimos N valores de uma série |
|
|
28
|
-
| `bcb_serie_metadados` | Retorna informações/metadados de uma série |
|
|
29
|
-
| `bcb_series_populares` | Lista séries populares agrupadas por categoria |
|
|
30
|
-
| `bcb_buscar_serie` | Busca séries por nome ou descrição (aceita termos sem acento) |
|
|
31
|
-
| `bcb_indicadores_atuais` | Valores mais recentes: Selic, IPCA, Dólar, IBC-Br |
|
|
32
|
-
| `bcb_variacao` | Calcula variação percentual entre duas datas ou últimos N períodos |
|
|
33
|
-
| `bcb_comparar` | Compara 2 a 5 séries no mesmo período com ranking |
|
|
27
|
+
## Available Tools
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
| Tool | Description |
|
|
30
|
+
|------|-------------|
|
|
31
|
+
| `bcb_serie_valores` | Query series values by code and date range |
|
|
32
|
+
| `bcb_serie_ultimos` | Get the last N values of a series |
|
|
33
|
+
| `bcb_serie_metadados` | Get series metadata (name, frequency, source) |
|
|
34
|
+
| `bcb_series_populares` | List popular series grouped by category |
|
|
35
|
+
| `bcb_buscar_serie` | Search series by name or description (accent-insensitive) |
|
|
36
|
+
| `bcb_indicadores_atuais` | Latest values: Selic, IPCA, USD/BRL, IBC-Br |
|
|
37
|
+
| `bcb_variacao` | Calculate percentage variation between dates or last N periods |
|
|
38
|
+
| `bcb_comparar` | Compare 2 to 5 series over the same period with ranking |
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
## Installation
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
### Via Smithery (recommended)
|
|
43
|
+
|
|
44
|
+
Visit [bcb-br-mcp on Smithery](https://smithery.ai/server/@sidneybissoli/bcb-br-mcp) and follow the installation instructions for your MCP client.
|
|
45
|
+
|
|
46
|
+
### Via URL (Claude.ai, Claude Desktop, any MCP client)
|
|
47
|
+
|
|
48
|
+
Use the HTTP endpoint directly, no installation required:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
https://bcb.sidneybissoli.workers.dev
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Via npx (Claude Desktop)
|
|
55
|
+
|
|
56
|
+
Add to your Claude Desktop configuration file:
|
|
40
57
|
|
|
41
58
|
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
42
59
|
|
|
43
60
|
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
44
61
|
|
|
45
|
-
#### Opção 1: Via npx (recomendado)
|
|
46
|
-
|
|
47
62
|
```json
|
|
48
63
|
{
|
|
49
64
|
"mcpServers": {
|
|
@@ -55,7 +70,7 @@ Adicione ao arquivo de configuração do Claude Desktop:
|
|
|
55
70
|
}
|
|
56
71
|
```
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
### Via global install
|
|
59
74
|
|
|
60
75
|
```bash
|
|
61
76
|
npm install -g bcb-br-mcp
|
|
@@ -71,216 +86,216 @@ npm install -g bcb-br-mcp
|
|
|
71
86
|
}
|
|
72
87
|
```
|
|
73
88
|
|
|
74
|
-
##
|
|
89
|
+
## Usage Examples
|
|
75
90
|
|
|
76
|
-
###
|
|
91
|
+
### Get the current Selic rate
|
|
77
92
|
|
|
78
93
|
```
|
|
79
|
-
|
|
80
|
-
→
|
|
94
|
+
What is the current Selic interest rate?
|
|
95
|
+
→ Uses bcb_indicadores_atuais
|
|
81
96
|
```
|
|
82
97
|
|
|
83
|
-
###
|
|
98
|
+
### IPCA history for 2024
|
|
84
99
|
|
|
85
100
|
```
|
|
86
|
-
|
|
87
|
-
→
|
|
101
|
+
Show me the monthly IPCA for 2024
|
|
102
|
+
→ Uses bcb_serie_valores with code 433, dataInicial 2024-01-01, dataFinal 2024-12-31
|
|
88
103
|
```
|
|
89
104
|
|
|
90
|
-
###
|
|
105
|
+
### List inflation indicators
|
|
91
106
|
|
|
92
107
|
```
|
|
93
|
-
|
|
94
|
-
→
|
|
108
|
+
What inflation series are available?
|
|
109
|
+
→ Uses bcb_series_populares with category "Inflação"
|
|
95
110
|
```
|
|
96
111
|
|
|
97
|
-
###
|
|
112
|
+
### Search for USD exchange rate series
|
|
98
113
|
|
|
99
114
|
```
|
|
100
|
-
|
|
101
|
-
→
|
|
115
|
+
Search for series related to the dollar
|
|
116
|
+
→ Uses bcb_buscar_serie with term "dolar" (works without accents)
|
|
102
117
|
```
|
|
103
118
|
|
|
104
|
-
###
|
|
119
|
+
### Calculate USD/BRL variation
|
|
105
120
|
|
|
106
121
|
```
|
|
107
|
-
|
|
108
|
-
→
|
|
122
|
+
What was the USD/BRL variation over the last 12 months?
|
|
123
|
+
→ Uses bcb_variacao with code 1 and periodos 12
|
|
109
124
|
```
|
|
110
125
|
|
|
111
|
-
###
|
|
126
|
+
### Compare IPCA, IGP-M, and INPC
|
|
112
127
|
|
|
113
128
|
```
|
|
114
|
-
Compare IPCA, IGP-M
|
|
115
|
-
→
|
|
129
|
+
Compare IPCA, IGP-M, and INPC in 2024
|
|
130
|
+
→ Uses bcb_comparar with codes [433, 189, 188], dataInicial 2024-01-01, dataFinal 2024-12-31
|
|
116
131
|
```
|
|
117
132
|
|
|
118
|
-
##
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
| 11 |
|
|
127
|
-
| 432 |
|
|
128
|
-
| 1178 |
|
|
129
|
-
| 12 | CDI
|
|
130
|
-
| 4389 | CDI
|
|
131
|
-
| 226 |
|
|
132
|
-
| 256 |
|
|
133
|
-
|
|
134
|
-
###
|
|
135
|
-
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
| 433 | IPCA -
|
|
139
|
-
| 13522 | IPCA -
|
|
140
|
-
| 7478 | IPCA-15 -
|
|
141
|
-
| 188 | INPC -
|
|
142
|
-
| 189 | IGP-M -
|
|
143
|
-
| 190 | IGP-DI -
|
|
144
|
-
| 7447 | IGP-10 -
|
|
145
|
-
| 10841-10850 | IPCA
|
|
146
|
-
| 4449 | IPCA -
|
|
147
|
-
| 11428 | IPCA -
|
|
148
|
-
| 16121-16122 | IPCA -
|
|
149
|
-
|
|
150
|
-
###
|
|
151
|
-
|
|
152
|
-
|
|
|
153
|
-
|
|
154
|
-
| 1 |
|
|
155
|
-
| 10813 |
|
|
156
|
-
| 3698/3697 |
|
|
157
|
-
| 21619/21620 | Euro (
|
|
158
|
-
| 21623/21624 |
|
|
159
|
-
| 21621/21622 |
|
|
160
|
-
| 21637/21638 | Peso
|
|
161
|
-
| 21639/21640 | Yuan
|
|
162
|
-
|
|
163
|
-
###
|
|
164
|
-
|
|
165
|
-
|
|
|
166
|
-
|
|
167
|
-
| 4380 |
|
|
168
|
-
| 4382 |
|
|
169
|
-
| 4385 |
|
|
170
|
-
| 7324 |
|
|
171
|
-
| 24363/24364 | IBC-Br (
|
|
172
|
-
| 29601-29606 | IBC-Br
|
|
173
|
-
| 22099 |
|
|
174
|
-
| 21859 |
|
|
175
|
-
| 21862 |
|
|
176
|
-
|
|
177
|
-
###
|
|
178
|
-
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
| 24369 |
|
|
182
|
-
| 24370 |
|
|
183
|
-
| 24380 |
|
|
184
|
-
| 24381 |
|
|
185
|
-
| 28561 | CAGED -
|
|
186
|
-
|
|
187
|
-
### Fiscal (10+
|
|
188
|
-
|
|
189
|
-
|
|
|
190
|
-
|
|
191
|
-
| 4503 |
|
|
192
|
-
| 4513 |
|
|
193
|
-
| 4537 |
|
|
194
|
-
| 4539 |
|
|
195
|
-
| 5364 |
|
|
196
|
-
|
|
197
|
-
###
|
|
198
|
-
|
|
199
|
-
|
|
|
200
|
-
|
|
201
|
-
| 3546 |
|
|
202
|
-
| 22707 |
|
|
203
|
-
| 22708 |
|
|
204
|
-
| 22709 |
|
|
205
|
-
| 22701 |
|
|
206
|
-
| 22846 |
|
|
207
|
-
| 13690 |
|
|
208
|
-
|
|
209
|
-
###
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
| 20539 |
|
|
214
|
-
| 20540/20541 |
|
|
215
|
-
| 20714 |
|
|
216
|
-
| 20749 |
|
|
217
|
-
| 20772 |
|
|
218
|
-
| 20783 |
|
|
219
|
-
| 21082 |
|
|
220
|
-
| 21128/21129 |
|
|
221
|
-
|
|
222
|
-
###
|
|
223
|
-
|
|
224
|
-
|
|
|
225
|
-
|
|
226
|
-
| 1788 |
|
|
227
|
-
| 27788-27791 |
|
|
228
|
-
| 27815 |
|
|
229
|
-
|
|
230
|
-
###
|
|
231
|
-
|
|
232
|
-
|
|
|
233
|
-
|
|
234
|
-
| 25 |
|
|
235
|
-
| 195 |
|
|
236
|
-
| 7165 |
|
|
237
|
-
|
|
238
|
-
###
|
|
239
|
-
|
|
240
|
-
|
|
|
241
|
-
|
|
133
|
+
## Series Catalog (150+)
|
|
134
|
+
|
|
135
|
+
The server includes a catalog of 150+ series organized in 12 categories.
|
|
136
|
+
|
|
137
|
+
### Interest Rates
|
|
138
|
+
|
|
139
|
+
| Code | Description |
|
|
140
|
+
|------|-------------|
|
|
141
|
+
| 11 | Selic rate - monthly accumulated |
|
|
142
|
+
| 432 | Selic rate - annualized (base 252) |
|
|
143
|
+
| 1178 | Selic target rate (Copom) |
|
|
144
|
+
| 12 | CDI daily rate |
|
|
145
|
+
| 4389 | CDI annualized (base 252) |
|
|
146
|
+
| 226 | Reference Rate (TR) - daily |
|
|
147
|
+
| 256 | Long-Term Interest Rate (TJLP) |
|
|
148
|
+
|
|
149
|
+
### Inflation (30+ series)
|
|
150
|
+
|
|
151
|
+
| Code | Description |
|
|
152
|
+
|------|-------------|
|
|
153
|
+
| 433 | IPCA - Monthly change |
|
|
154
|
+
| 13522 | IPCA - 12-month accumulated |
|
|
155
|
+
| 7478 | IPCA-15 - Monthly change |
|
|
156
|
+
| 188 | INPC - Monthly change |
|
|
157
|
+
| 189 | IGP-M - Monthly change |
|
|
158
|
+
| 190 | IGP-DI - Monthly change |
|
|
159
|
+
| 7447 | IGP-10 - Monthly change |
|
|
160
|
+
| 10841-10850 | IPCA by group (Food, Housing, Transportation, etc.) |
|
|
161
|
+
| 4449 | IPCA - Administered prices |
|
|
162
|
+
| 11428 | IPCA - Market prices |
|
|
163
|
+
| 16121-16122 | IPCA - Core measures |
|
|
164
|
+
|
|
165
|
+
### Exchange Rates (15+ series)
|
|
166
|
+
|
|
167
|
+
| Code | Description |
|
|
168
|
+
|------|-------------|
|
|
169
|
+
| 1 | USD/BRL - US Dollar (sell) |
|
|
170
|
+
| 10813 | USD/BRL - US Dollar (buy) |
|
|
171
|
+
| 3698/3697 | USD/BRL PTAX (sell/buy) |
|
|
172
|
+
| 21619/21620 | EUR/BRL - Euro (sell/buy) |
|
|
173
|
+
| 21623/21624 | GBP/BRL - British Pound (sell/buy) |
|
|
174
|
+
| 21621/21622 | JPY/BRL - Japanese Yen (sell/buy) |
|
|
175
|
+
| 21637/21638 | ARS/BRL - Argentine Peso (sell/buy) |
|
|
176
|
+
| 21639/21640 | CNY/BRL - Chinese Yuan (sell/buy) |
|
|
177
|
+
|
|
178
|
+
### Economic Activity (25+ series)
|
|
179
|
+
|
|
180
|
+
| Code | Description |
|
|
181
|
+
|------|-------------|
|
|
182
|
+
| 4380 | Monthly GDP (R$ millions) |
|
|
183
|
+
| 4382 | GDP - 12-month accumulated (R$ millions) |
|
|
184
|
+
| 4385 | Monthly GDP in USD |
|
|
185
|
+
| 7324 | Annual GDP in USD |
|
|
186
|
+
| 24363/24364 | IBC-Br Economic Activity Index (unadjusted/seasonally adjusted) |
|
|
187
|
+
| 29601-29606 | IBC-Br by sector (Agriculture, Industry, Services) |
|
|
188
|
+
| 22099 | Quarterly GDP - Rate of change |
|
|
189
|
+
| 21859 | Industrial production - Monthly change |
|
|
190
|
+
| 21862 | Installed capacity utilization |
|
|
191
|
+
|
|
192
|
+
### Employment (10+ series)
|
|
193
|
+
|
|
194
|
+
| Code | Description |
|
|
195
|
+
|------|-------------|
|
|
196
|
+
| 24369 | Unemployment rate - PNAD |
|
|
197
|
+
| 24370 | Labor force participation rate |
|
|
198
|
+
| 24380 | Average real income |
|
|
199
|
+
| 24381 | Real income mass |
|
|
200
|
+
| 28561 | CAGED - Formal job creation |
|
|
201
|
+
|
|
202
|
+
### Fiscal (10+ series)
|
|
203
|
+
|
|
204
|
+
| Code | Description |
|
|
205
|
+
|------|-------------|
|
|
206
|
+
| 4503 | Net public sector debt (% GDP) |
|
|
207
|
+
| 4513 | General government gross debt (% GDP) |
|
|
208
|
+
| 4537 | Primary balance (% GDP) |
|
|
209
|
+
| 4539 | Nominal balance (% GDP) |
|
|
210
|
+
| 5364 | Central government total revenue |
|
|
211
|
+
|
|
212
|
+
### External Sector (15+ series)
|
|
213
|
+
|
|
214
|
+
| Code | Description |
|
|
215
|
+
|------|-------------|
|
|
216
|
+
| 3546 | International reserves - daily |
|
|
217
|
+
| 22707 | Trade balance - Monthly |
|
|
218
|
+
| 22708 | Exports - Monthly |
|
|
219
|
+
| 22709 | Imports - Monthly |
|
|
220
|
+
| 22701 | Current account - Balance |
|
|
221
|
+
| 22846 | Foreign direct investment |
|
|
222
|
+
| 13690 | Total external debt |
|
|
223
|
+
|
|
224
|
+
### Credit (30+ series)
|
|
225
|
+
|
|
226
|
+
| Code | Description |
|
|
227
|
+
|------|-------------|
|
|
228
|
+
| 20539 | Total credit balance |
|
|
229
|
+
| 20540/20541 | Credit balance - Individuals/Corporations |
|
|
230
|
+
| 20714 | Average interest rate - Total |
|
|
231
|
+
| 20749 | Average rate - Vehicle financing |
|
|
232
|
+
| 20772 | Average rate - Mortgage |
|
|
233
|
+
| 20783 | Average spread - Total |
|
|
234
|
+
| 21082 | Default rate - Total |
|
|
235
|
+
| 21128/21129 | Default rate - Credit card |
|
|
236
|
+
|
|
237
|
+
### Monetary Aggregates
|
|
238
|
+
|
|
239
|
+
| Code | Description |
|
|
240
|
+
|------|-------------|
|
|
241
|
+
| 1788 | Monetary base |
|
|
242
|
+
| 27788-27791 | Money supply M1, M2, M3, M4 |
|
|
243
|
+
| 27815 | Money multiplier |
|
|
244
|
+
|
|
245
|
+
### Savings
|
|
246
|
+
|
|
247
|
+
| Code | Description |
|
|
248
|
+
|------|-------------|
|
|
249
|
+
| 25 | Savings - Monthly yield |
|
|
250
|
+
| 195 | Savings - Total balance |
|
|
251
|
+
| 7165 | Savings - Net deposits |
|
|
252
|
+
|
|
253
|
+
### Market Indices
|
|
254
|
+
|
|
255
|
+
| Code | Description |
|
|
256
|
+
|------|-------------|
|
|
242
257
|
| 12466 | IMA-B |
|
|
243
258
|
| 12467 | IMA-B5 |
|
|
244
259
|
| 12468 | IMA-B5+ |
|
|
245
|
-
| 7832 | Ibovespa
|
|
260
|
+
| 7832 | Ibovespa - Monthly |
|
|
246
261
|
|
|
247
|
-
###
|
|
262
|
+
### Expectations (Focus Survey)
|
|
248
263
|
|
|
249
|
-
|
|
|
250
|
-
|
|
251
|
-
| 29033/29034 |
|
|
252
|
-
| 29035/29036 |
|
|
253
|
-
| 29037/29038 |
|
|
254
|
-
| 29039/29040 |
|
|
264
|
+
| Code | Description |
|
|
265
|
+
|------|-------------|
|
|
266
|
+
| 29033/29034 | IPCA expectation (current/next year) |
|
|
267
|
+
| 29035/29036 | Selic expectation (current/next year) |
|
|
268
|
+
| 29037/29038 | GDP expectation (current/next year) |
|
|
269
|
+
| 29039/29040 | Exchange rate expectation (current/next year) |
|
|
255
270
|
|
|
256
|
-
##
|
|
271
|
+
## Finding Other Series
|
|
257
272
|
|
|
258
|
-
|
|
273
|
+
The SGS database contains over 18,000 time series. To find codes for other series:
|
|
259
274
|
|
|
260
|
-
1.
|
|
261
|
-
2.
|
|
262
|
-
3.
|
|
263
|
-
4. Use
|
|
275
|
+
1. Visit the [BCB SGS Portal](https://www3.bcb.gov.br/sgspub/)
|
|
276
|
+
2. Search for the desired series
|
|
277
|
+
3. Note the series code
|
|
278
|
+
4. Use that code with this server's tools
|
|
264
279
|
|
|
265
|
-
##
|
|
280
|
+
## Technical Details
|
|
266
281
|
|
|
267
|
-
###
|
|
282
|
+
### Robustness
|
|
268
283
|
|
|
269
|
-
- **Timeout**: 30
|
|
270
|
-
- **
|
|
271
|
-
- **
|
|
284
|
+
- **Timeout**: 30 seconds per request (prevents hanging)
|
|
285
|
+
- **Auto-retry**: 3 attempts with exponential backoff (1s, 2s, 4s)
|
|
286
|
+
- **Error handling**: Clear error messages
|
|
272
287
|
|
|
273
|
-
###
|
|
288
|
+
### Smart Search
|
|
274
289
|
|
|
275
|
-
|
|
290
|
+
The `bcb_buscar_serie` tool normalizes search terms, allowing you to find series even without Portuguese accents:
|
|
276
291
|
|
|
277
|
-
- `"inflacao"` →
|
|
278
|
-
- `"cambio"` →
|
|
279
|
-
- `"credito"` →
|
|
292
|
+
- `"inflacao"` → finds "Inflação"
|
|
293
|
+
- `"cambio"` → finds "Câmbio"
|
|
294
|
+
- `"credito"` → finds "Crédito"
|
|
280
295
|
|
|
281
|
-
##
|
|
296
|
+
## Development
|
|
282
297
|
|
|
283
|
-
###
|
|
298
|
+
### Requirements
|
|
284
299
|
|
|
285
300
|
- Node.js >= 18.0.0
|
|
286
301
|
|
|
@@ -298,69 +313,82 @@ npm install
|
|
|
298
313
|
npm run build
|
|
299
314
|
```
|
|
300
315
|
|
|
301
|
-
###
|
|
316
|
+
### Local testing (stdio)
|
|
302
317
|
|
|
303
318
|
```bash
|
|
304
319
|
npm run dev
|
|
305
320
|
```
|
|
306
321
|
|
|
307
|
-
|
|
322
|
+
### Local testing (HTTP worker)
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
npm run dev:worker
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Or use the MCP Inspector:
|
|
308
329
|
|
|
309
330
|
```bash
|
|
310
331
|
npx @modelcontextprotocol/inspector npm run dev
|
|
311
332
|
```
|
|
312
333
|
|
|
313
|
-
## API
|
|
334
|
+
## BCB API
|
|
314
335
|
|
|
315
|
-
|
|
336
|
+
This server uses the Brazilian Central Bank's public API:
|
|
316
337
|
|
|
317
|
-
- **
|
|
318
|
-
- **
|
|
319
|
-
- **
|
|
320
|
-
- **
|
|
338
|
+
- **Base endpoint:** `https://api.bcb.gov.br/dados/serie/bcdata.sgs.{code}/dados`
|
|
339
|
+
- **Format:** JSON
|
|
340
|
+
- **Authentication:** None (public API)
|
|
341
|
+
- **Documentation:** [BCB Open Data](https://dadosabertos.bcb.gov.br/)
|
|
321
342
|
|
|
322
343
|
## Changelog
|
|
323
344
|
|
|
345
|
+
### v1.2.0
|
|
346
|
+
|
|
347
|
+
- HTTP endpoint via Cloudflare Workers (`https://bcb.sidneybissoli.workers.dev`)
|
|
348
|
+
- Published on Smithery.ai
|
|
349
|
+
- Refactored: tool logic extracted to `src/tools.ts` (shared between stdio and HTTP)
|
|
350
|
+
|
|
324
351
|
### v1.1.0
|
|
325
352
|
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
329
|
-
-
|
|
330
|
-
-
|
|
331
|
-
-
|
|
353
|
+
- New tool `bcb_variacao` for percentage variation calculation
|
|
354
|
+
- New tool `bcb_comparar` for comparing multiple series
|
|
355
|
+
- 30-second timeout on requests
|
|
356
|
+
- Auto-retry with exponential backoff (3 attempts)
|
|
357
|
+
- Normalized search (accent-insensitive)
|
|
358
|
+
- Additional statistics (max, min, average, range)
|
|
332
359
|
|
|
333
360
|
### v1.0.0
|
|
334
361
|
|
|
335
|
-
-
|
|
336
|
-
- 6
|
|
337
|
-
-
|
|
362
|
+
- Initial release
|
|
363
|
+
- 6 basic tools
|
|
364
|
+
- Catalog with 150+ series
|
|
338
365
|
|
|
339
|
-
##
|
|
366
|
+
## Contributing
|
|
340
367
|
|
|
341
|
-
|
|
368
|
+
Contributions are welcome! Please:
|
|
342
369
|
|
|
343
|
-
1.
|
|
344
|
-
2.
|
|
345
|
-
3. Commit
|
|
346
|
-
4. Push
|
|
347
|
-
5.
|
|
370
|
+
1. Fork the repository
|
|
371
|
+
2. Create a feature branch (`git checkout -b feature/new-feature`)
|
|
372
|
+
3. Commit your changes (`git commit -m 'Add new feature'`)
|
|
373
|
+
4. Push to the branch (`git push origin feature/new-feature`)
|
|
374
|
+
5. Open a Pull Request
|
|
348
375
|
|
|
349
|
-
##
|
|
376
|
+
## License
|
|
350
377
|
|
|
351
|
-
MIT -
|
|
378
|
+
MIT - see [LICENSE](LICENSE) for details.
|
|
352
379
|
|
|
353
|
-
##
|
|
380
|
+
## Author
|
|
354
381
|
|
|
355
|
-
**Sidney Bissoli**
|
|
382
|
+
**Sidney da Silva Pereira Bissoli**
|
|
356
383
|
|
|
357
384
|
- GitHub: [@SidneyBissoli](https://github.com/SidneyBissoli)
|
|
358
385
|
- Email: sbissoli76@gmail.com
|
|
359
386
|
|
|
360
|
-
## Links
|
|
387
|
+
## Useful Links
|
|
361
388
|
|
|
362
|
-
- [
|
|
363
|
-
- [
|
|
389
|
+
- [BCB SGS Portal](https://www3.bcb.gov.br/sgspub/)
|
|
390
|
+
- [BCB Open Data](https://dadosabertos.bcb.gov.br/)
|
|
364
391
|
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
365
392
|
- [MCP Registry](https://registry.modelcontextprotocol.io/)
|
|
393
|
+
- [Smithery: bcb-br-mcp](https://smithery.ai/server/@sidneybissoli/bcb-br-mcp)
|
|
366
394
|
- [npm: bcb-br-mcp](https://www.npmjs.com/package/bcb-br-mcp)
|