oci-pricing-mcp 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.
Files changed (49) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +24 -0
  3. package/README.md +299 -0
  4. package/dist/data/cache.d.ts +50 -0
  5. package/dist/data/cache.d.ts.map +1 -0
  6. package/dist/data/cache.js +90 -0
  7. package/dist/data/cache.js.map +1 -0
  8. package/dist/data/fetcher.d.ts +96 -0
  9. package/dist/data/fetcher.d.ts.map +1 -0
  10. package/dist/data/fetcher.js +232 -0
  11. package/dist/data/fetcher.js.map +1 -0
  12. package/dist/data/pricing-data.json +6162 -0
  13. package/dist/index.d.ts +21 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +582 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/tools/calculator.d.ts +17 -0
  18. package/dist/tools/calculator.d.ts.map +1 -0
  19. package/dist/tools/calculator.js +318 -0
  20. package/dist/tools/calculator.js.map +1 -0
  21. package/dist/tools/compute.d.ts +58 -0
  22. package/dist/tools/compute.d.ts.map +1 -0
  23. package/dist/tools/compute.js +172 -0
  24. package/dist/tools/compute.js.map +1 -0
  25. package/dist/tools/core.d.ts +70 -0
  26. package/dist/tools/core.d.ts.map +1 -0
  27. package/dist/tools/core.js +113 -0
  28. package/dist/tools/core.js.map +1 -0
  29. package/dist/tools/database.d.ts +66 -0
  30. package/dist/tools/database.d.ts.map +1 -0
  31. package/dist/tools/database.js +212 -0
  32. package/dist/tools/database.js.map +1 -0
  33. package/dist/tools/kubernetes.d.ts +65 -0
  34. package/dist/tools/kubernetes.d.ts.map +1 -0
  35. package/dist/tools/kubernetes.js +226 -0
  36. package/dist/tools/kubernetes.js.map +1 -0
  37. package/dist/tools/networking.d.ts +63 -0
  38. package/dist/tools/networking.d.ts.map +1 -0
  39. package/dist/tools/networking.js +248 -0
  40. package/dist/tools/networking.js.map +1 -0
  41. package/dist/tools/storage.d.ts +64 -0
  42. package/dist/tools/storage.d.ts.map +1 -0
  43. package/dist/tools/storage.js +175 -0
  44. package/dist/tools/storage.js.map +1 -0
  45. package/dist/types.d.ts +162 -0
  46. package/dist/types.d.ts.map +1 -0
  47. package/dist/types.js +5 -0
  48. package/dist/types.js.map +1 -0
  49. package/package.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Jason Wilbur
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,24 @@
1
+ OCI Pricing MCP Server
2
+ Copyright 2026 Jason Wilbur
3
+
4
+ This product includes software developed by Jason Wilbur.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ ---
19
+
20
+ This project uses pricing data from Oracle Cloud Infrastructure.
21
+ Oracle and OCI are trademarks of Oracle Corporation.
22
+ Pricing data is sourced from Oracle's public pricing API and price list.
23
+
24
+ This project is not affiliated with or endorsed by Oracle Corporation.
package/README.md ADDED
@@ -0,0 +1,299 @@
1
+ # OCI Pricing MCP Server
2
+
3
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides Oracle Cloud Infrastructure pricing data to AI assistants like Claude.
4
+
5
+ > **Important Note:** This server provides pricing data from Oracle's public pricing API and bundled data. We cannot guarantee that AI assistants will always interpret pricing correctly or identify the absolute cheapest options. Always verify pricing on [Oracle's official price list](https://www.oracle.com/cloud/price-list/) before making decisions. All API calls are free of charge (no authentication required).
6
+
7
+ ## Why This Exists
8
+
9
+ AWS, Azure, and GCP all have pricing MCP servers. OCI did not - until now.
10
+
11
+ | Provider | Pricing MCP | Type |
12
+ |----------|-------------|------|
13
+ | AWS | [aws-pricing-mcp-server](https://awslabs.github.io/mcp/servers/aws-pricing-mcp-server) | Official |
14
+ | Azure | [azure-pricing-mcp](https://github.com/charris-msft/azure-pricing-mcp) | Community |
15
+ | GCP | [gcp-cost-mcp-server](https://github.com/nozomi-koborinai/gcp-cost-mcp-server) | Community |
16
+ | OCI | **oci-pricing-mcp** | Community |
17
+
18
+ ### Example: "How much does a 4 OCPU, 32GB VM cost on OCI?"
19
+
20
+ **You ask Claude:**
21
+ > What's the monthly cost for a VM with 4 OCPUs and 32GB RAM on OCI?
22
+
23
+ **Claude responds (using this MCP):**
24
+ ```
25
+ For a VM.Standard.E5.Flex with 4 OCPUs and 32GB RAM:
26
+
27
+ OCPU cost: 4 OCPUs × $0.03/hr = $0.12/hr
28
+ Memory cost: 32 GB × $0.002/hr = $0.064/hr
29
+ Total hourly: $0.184/hr
30
+
31
+ Monthly cost (730 hrs): $134.32
32
+
33
+ For comparison, the Arm-based A1 shape would be significantly cheaper:
34
+
35
+ A1 total: 4 × $0.01 + 32 × $0.0015 = $0.088/hr
36
+ Monthly: $64.24 (52% savings)
37
+ ```
38
+
39
+ ### Example: "Compare OCI vs AWS for data egress"
40
+
41
+ **You ask Claude:**
42
+ > How much would I save on OCI vs AWS for 5TB of monthly data egress?
43
+
44
+ **Claude responds (using this MCP):**
45
+ ```
46
+ Data Egress Cost Comparison (5 TB/month):
47
+
48
+ OCI:
49
+ First 10 TB free → $0.00
50
+
51
+ AWS:
52
+ First 10 GB: free
53
+ Next 9.99 TB @ $0.09/GB → ~$450/month
54
+
55
+ Monthly savings with OCI: $450 (100% savings)
56
+
57
+ OCI includes 10 TB of free outbound data transfer monthly,
58
+ making it significantly more cost-effective for data-heavy workloads.
59
+ ```
60
+
61
+ ## Installation
62
+
63
+ ### Quick Install (Recommended)
64
+
65
+ ```bash
66
+ claude mcp add oci-pricing -- npx github:jasonwilbur/oci-pricing-mcp
67
+ ```
68
+
69
+ ### From Source
70
+
71
+ ```bash
72
+ git clone https://github.com/jasonwilbur/oci-pricing-mcp.git
73
+ cd oci-pricing-mcp
74
+ npm install
75
+ npm run build
76
+ claude mcp add oci-pricing -- node /path/to/oci-pricing-mcp/dist/index.js
77
+ ```
78
+
79
+ ## Available Tools
80
+
81
+ ### Core Tools
82
+
83
+ | Tool | Description |
84
+ |------|-------------|
85
+ | `get_pricing` | Get pricing for any OCI resource by service/type |
86
+ | `list_services` | List all OCI services with pricing categories |
87
+ | `compare_regions` | Compare pricing across regions (OCI has consistent global pricing) |
88
+ | `list_regions` | List all available OCI regions |
89
+ | `calculate_monthly_cost` | Estimate monthly spend for a configuration |
90
+ | `quick_estimate` | Get cost estimates for common deployment presets |
91
+
92
+ ### Compute Tools
93
+
94
+ | Tool | Description |
95
+ |------|-------------|
96
+ | `list_compute_shapes` | List VM shapes (E4, E5, A1, GPU, etc.) with pricing |
97
+ | `get_compute_shape_details` | Get detailed info for a specific shape |
98
+ | `compare_compute_shapes` | Compare pricing between shapes |
99
+
100
+ ### Storage Tools
101
+
102
+ | Tool | Description |
103
+ |------|-------------|
104
+ | `list_storage_options` | Block, object, file, archive storage pricing |
105
+ | `calculate_storage_cost` | Calculate cost for specific storage config |
106
+ | `compare_storage_tiers` | Compare all tiers for a given size |
107
+
108
+ ### Database Tools
109
+
110
+ | Tool | Description |
111
+ |------|-------------|
112
+ | `list_database_options` | Autonomous DB, MySQL, PostgreSQL pricing |
113
+ | `calculate_database_cost` | Calculate database cost |
114
+ | `compare_database_options` | Compare options for workload type |
115
+
116
+ ### Networking Tools
117
+
118
+ | Tool | Description |
119
+ |------|-------------|
120
+ | `list_networking_options` | Load balancers, FastConnect, VPN, egress |
121
+ | `calculate_networking_cost` | Calculate networking cost with free tier |
122
+ | `compare_data_egress` | Compare OCI egress vs AWS/Azure/GCP |
123
+
124
+ ### Kubernetes Tools
125
+
126
+ | Tool | Description |
127
+ |------|-------------|
128
+ | `list_kubernetes_options` | OKE cluster options (Basic is FREE) |
129
+ | `calculate_kubernetes_cost` | Calculate cluster cost |
130
+ | `compare_kubernetes_providers` | Compare OKE vs EKS/AKS/GKE |
131
+
132
+ ### Utility Tools
133
+
134
+ | Tool | Description |
135
+ |------|-------------|
136
+ | `get_free_tier` | OCI Always Free tier details |
137
+ | `get_pricing_info` | Pricing data metadata |
138
+
139
+ ### Real-Time Pricing Tools
140
+
141
+ | Tool | Description |
142
+ |------|-------------|
143
+ | `fetch_realtime_pricing` | Fetch live pricing from Oracle's API (600+ products) |
144
+ | `list_realtime_categories` | List all 109 service categories from the API |
145
+
146
+ ## Usage Examples
147
+
148
+ ### Ask Claude about OCI pricing
149
+
150
+ ```
151
+ What's the cost of running a VM.Standard.E5.Flex with 4 OCPUs and 32GB RAM?
152
+ ```
153
+
154
+ ```
155
+ Compare OCI block storage tiers for 1TB of data
156
+ ```
157
+
158
+ ```
159
+ Estimate monthly cost for a Kubernetes cluster with 3 nodes
160
+ ```
161
+
162
+ ```
163
+ How much would I save using OCI vs AWS for 5TB of monthly data egress?
164
+ ```
165
+
166
+ ### Quick Estimates
167
+
168
+ ```
169
+ Give me a quick estimate for a small web app on OCI
170
+ ```
171
+
172
+ Available presets:
173
+ - `small-web-app` - 1 OCPU, 8GB, 100GB storage, LB
174
+ - `medium-api-server` - 4 OCPU, 32GB, 500GB storage
175
+ - `large-database` - 8 OCPU, 128GB, Autonomous DB
176
+ - `ml-training` - 8x A100 GPUs (part-time)
177
+ - `kubernetes-cluster` - 3 nodes, 4 OCPU each
178
+
179
+ ## OCI Pricing Highlights
180
+
181
+ ### Key Differentiators
182
+
183
+ - **Consistent Global Pricing**: Unlike AWS/Azure/GCP, OCI prices are the same across all commercial regions
184
+ - **10 TB Free Egress**: First 10 TB of outbound data transfer is free monthly
185
+ - **Free Kubernetes Control Plane**: OKE Basic clusters have no management fee
186
+ - **Network Load Balancer**: Completely free (no hourly or data charges)
187
+ - **Always Free Tier**: Never expires - 4 Arm OCPUs, 24GB RAM, 200GB storage, 2 Autonomous DBs
188
+
189
+ ### Cost-Effective Shapes
190
+
191
+ | Shape | OCPU Price | Best For |
192
+ |-------|------------|----------|
193
+ | VM.Standard.A1.Flex (Arm) | $0.01/hr | Best value, Arm workloads |
194
+ | VM.Standard.E5.Flex | $0.03/hr | New x86 deployments |
195
+ | VM.Standard.E4.Flex | $0.025/hr | Previous gen, still good |
196
+
197
+ ### OCPU vs vCPU
198
+
199
+ 1 OCPU = 2 vCPUs for x86 architectures. OCPUs represent physical cores, so OCI's $0.03/OCPU/hr is equivalent to $0.015/vCPU/hr.
200
+
201
+ ## Data Sources
202
+
203
+ This MCP server supports two data modes:
204
+
205
+ ### Bundled Data (Default)
206
+
207
+ Pricing data is synced from Oracle's public pricing API and bundled with the server. This provides fast, offline access to the complete OCI pricing catalog.
208
+
209
+ - **Products**: 602 SKUs (full API dataset)
210
+ - **Categories**: 109 service categories
211
+ - **Detailed compute shapes**: 15 curated shapes with OCPU/memory breakdowns
212
+ - **Timestamps**: `apiLastUpdated` and `bundledDataGenerated` for verification
213
+
214
+ ### Real-Time API
215
+
216
+ For the most current pricing between releases, use `fetch_realtime_pricing` which queries Oracle's API directly:
217
+
218
+ ```
219
+ https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/
220
+ ```
221
+
222
+ - **Authentication**: None required (public API)
223
+ - **Multi-currency**: USD, EUR, GBP, JPY, AUD, CAD, and more
224
+ - **Updates**: Oracle updates pricing data periodically
225
+
226
+ ## FAQ
227
+
228
+ ### Does OCI have a pricing API?
229
+
230
+ Yes! Oracle provides a public pricing API at `https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/` that returns all OCI product pricing in JSON format. No authentication is required. This MCP server uses this API for the `fetch_realtime_pricing` tool.
231
+
232
+ ### Where does the pricing data come from?
233
+
234
+ - **Bundled data**: Full dataset synced from Oracle's public pricing API and included in the npm package
235
+ - **Real-time data**: Fetched directly from Oracle's public pricing API on-demand
236
+
237
+ ### How often is the bundled data updated?
238
+
239
+ The bundled pricing data is synced from Oracle's API with each npm release. Check `metadata.bundledDataGenerated` for the sync date. Use `fetch_realtime_pricing` between releases to check for updates.
240
+
241
+ ### Why are prices the same across all regions?
242
+
243
+ Unlike AWS, Azure, and GCP, Oracle Cloud Infrastructure maintains **consistent global pricing** across all commercial regions. This simplifies cost planning and means you can deploy anywhere without price variations.
244
+
245
+ ### What's the difference between OCPU and vCPU?
246
+
247
+ 1 OCPU = 2 vCPUs for x86 architectures. OCPUs represent physical cores with hyper-threading, so OCI's $0.03/OCPU/hr is equivalent to $0.015/vCPU/hr when comparing to AWS/Azure/GCP.
248
+
249
+ ### Can I query my actual OCI spend?
250
+
251
+ This MCP server provides pricing data, not account spend. For actual usage and spend tracking, you would need to use the OCI Cost Management APIs with proper authentication. This could be added as a future enhancement.
252
+
253
+ ### What's NOT included in the pricing data?
254
+
255
+ The bundled data includes all 602 products from Oracle's public pricing API. However, some pricing is not available through this API:
256
+
257
+ - **Committed use discounts** - Only Pay-As-You-Go pricing is shown; annual/3-year commits require Oracle sales
258
+ - **Government/sovereign cloud** - Dedicated government regions have separate pricing
259
+ - **Oracle SaaS products** - Fusion Apps, NetSuite, etc. are separate from OCI IaaS
260
+ - **Custom/negotiated pricing** - Enterprise agreements with volume discounts
261
+ - **Support costs** - Premier Support pricing is separate
262
+
263
+ For these, contact [Oracle Sales](https://www.oracle.com/cloud/contact/) or check the [Oracle Cloud Price List](https://www.oracle.com/cloud/price-list/) directly.
264
+
265
+ ### How do I verify the pricing is accurate?
266
+
267
+ Each bundled data release includes timestamps:
268
+ - `apiLastUpdated`: When Oracle last updated their pricing API
269
+ - `bundledDataGenerated`: When this package synced the data
270
+
271
+ You can verify prices against [Oracle's official price list](https://www.oracle.com/cloud/price-list/) or use the `fetch_realtime_pricing` tool to get live data.
272
+
273
+ ## Development
274
+
275
+ ```bash
276
+ # Install dependencies
277
+ npm install
278
+
279
+ # Build
280
+ npm run build
281
+
282
+ # Run locally
283
+ node dist/index.js
284
+
285
+ # Watch mode
286
+ npm run dev
287
+ ```
288
+
289
+ ## Author
290
+
291
+ **Jason Wilbur** - [jasonwilbur.com](https://jasonwilbur.com)
292
+
293
+ ## License
294
+
295
+ Apache 2.0
296
+
297
+ ## Contributing
298
+
299
+ Issues and pull requests welcome at [GitHub](https://github.com/jasonwilbur/oci-pricing-mcp).
@@ -0,0 +1,50 @@
1
+ /**
2
+ * In-memory cache for OCI pricing data
3
+ */
4
+ export declare class PricingCache {
5
+ private cache;
6
+ private defaultTTL;
7
+ constructor(defaultTTLMinutes?: number);
8
+ /**
9
+ * Get an item from the cache
10
+ */
11
+ get<T>(key: string): T | null;
12
+ /**
13
+ * Set an item in the cache
14
+ */
15
+ set<T>(key: string, data: T, ttlMinutes?: number): void;
16
+ /**
17
+ * Check if a key exists and is not expired
18
+ */
19
+ has(key: string): boolean;
20
+ /**
21
+ * Delete an item from the cache
22
+ */
23
+ delete(key: string): boolean;
24
+ /**
25
+ * Clear all items from the cache
26
+ */
27
+ clear(): void;
28
+ /**
29
+ * Get cache statistics
30
+ */
31
+ getStats(): {
32
+ size: number;
33
+ keys: string[];
34
+ };
35
+ /**
36
+ * Clean expired entries
37
+ */
38
+ private cleanExpired;
39
+ }
40
+ export declare const pricingCache: PricingCache;
41
+ export declare const CACHE_KEYS: {
42
+ readonly PRICING_DATA: "oci_pricing_data";
43
+ readonly COMPUTE_SHAPES: "oci_compute_shapes";
44
+ readonly STORAGE_OPTIONS: "oci_storage_options";
45
+ readonly DATABASE_OPTIONS: "oci_database_options";
46
+ readonly NETWORKING_OPTIONS: "oci_networking_options";
47
+ readonly KUBERNETES_OPTIONS: "oci_kubernetes_options";
48
+ readonly SERVICES_CATALOG: "oci_services_catalog";
49
+ };
50
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/data/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAA+C;IAC5D,OAAO,CAAC,UAAU,CAAS;gBAEf,iBAAiB,GAAE,MAAW;IAI1C;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAgB7B;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;IAWvD;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,QAAQ,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;IAU5C;;OAEG;IACH,OAAO,CAAC,YAAY;CAQrB;AAGD,eAAO,MAAM,YAAY,cAAuB,CAAC;AAGjD,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * In-memory cache for OCI pricing data
3
+ */
4
+ export class PricingCache {
5
+ cache = new Map();
6
+ defaultTTL; // milliseconds
7
+ constructor(defaultTTLMinutes = 60) {
8
+ this.defaultTTL = defaultTTLMinutes * 60 * 1000;
9
+ }
10
+ /**
11
+ * Get an item from the cache
12
+ */
13
+ get(key) {
14
+ const entry = this.cache.get(key);
15
+ if (!entry) {
16
+ return null;
17
+ }
18
+ // Check if expired
19
+ if (Date.now() > entry.expiresAt) {
20
+ this.cache.delete(key);
21
+ return null;
22
+ }
23
+ return entry.data;
24
+ }
25
+ /**
26
+ * Set an item in the cache
27
+ */
28
+ set(key, data, ttlMinutes) {
29
+ const ttl = ttlMinutes ? ttlMinutes * 60 * 1000 : this.defaultTTL;
30
+ const now = Date.now();
31
+ this.cache.set(key, {
32
+ data,
33
+ timestamp: now,
34
+ expiresAt: now + ttl,
35
+ });
36
+ }
37
+ /**
38
+ * Check if a key exists and is not expired
39
+ */
40
+ has(key) {
41
+ return this.get(key) !== null;
42
+ }
43
+ /**
44
+ * Delete an item from the cache
45
+ */
46
+ delete(key) {
47
+ return this.cache.delete(key);
48
+ }
49
+ /**
50
+ * Clear all items from the cache
51
+ */
52
+ clear() {
53
+ this.cache.clear();
54
+ }
55
+ /**
56
+ * Get cache statistics
57
+ */
58
+ getStats() {
59
+ // Clean expired entries first
60
+ this.cleanExpired();
61
+ return {
62
+ size: this.cache.size,
63
+ keys: Array.from(this.cache.keys()),
64
+ };
65
+ }
66
+ /**
67
+ * Clean expired entries
68
+ */
69
+ cleanExpired() {
70
+ const now = Date.now();
71
+ for (const [key, entry] of this.cache.entries()) {
72
+ if (now > entry.expiresAt) {
73
+ this.cache.delete(key);
74
+ }
75
+ }
76
+ }
77
+ }
78
+ // Singleton instance for the pricing data cache
79
+ export const pricingCache = new PricingCache(60); // 1 hour default TTL
80
+ // Cache keys
81
+ export const CACHE_KEYS = {
82
+ PRICING_DATA: 'oci_pricing_data',
83
+ COMPUTE_SHAPES: 'oci_compute_shapes',
84
+ STORAGE_OPTIONS: 'oci_storage_options',
85
+ DATABASE_OPTIONS: 'oci_database_options',
86
+ NETWORKING_OPTIONS: 'oci_networking_options',
87
+ KUBERNETES_OPTIONS: 'oci_kubernetes_options',
88
+ SERVICES_CATALOG: 'oci_services_catalog',
89
+ };
90
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/data/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,MAAM,OAAO,YAAY;IACf,KAAK,GAAqC,IAAI,GAAG,EAAE,CAAC;IACpD,UAAU,CAAS,CAAC,eAAe;IAE3C,YAAY,oBAA4B,EAAE;QACxC,IAAI,CAAC,UAAU,GAAG,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;IAClD,CAAC;IAED;;OAEG;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