oxford-ledge-mcp 2.0.0__tar.gz
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.
- oxford_ledge_mcp-2.0.0/PKG-INFO +157 -0
- oxford_ledge_mcp-2.0.0/README.md +130 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp/__init__.py +21 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp/server.py +1563 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/PKG-INFO +157 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/SOURCES.txt +15 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/dependency_links.txt +1 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/entry_points.txt +2 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/requires.txt +4 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp.egg-info/top_level.txt +3 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp_core/__init__.py +74 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp_core/cache.py +106 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp_core/errors.py +32 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp_core/registry.py +94 -0
- oxford_ledge_mcp-2.0.0/oxford_ledge_mcp_core/tool_partition.py +113 -0
- oxford_ledge_mcp-2.0.0/pyproject.toml +45 -0
- oxford_ledge_mcp-2.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: oxford-ledge-mcp
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: MCP server for Oxford Ledge financial terminal — 36 tools for stocks, SEC filings, credit data, bonds, macro indicators, and BDC holdings from Claude Desktop
|
|
5
|
+
Author-email: Oxford Ledge <contact@oxfordledge.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.oxfordledge.com
|
|
8
|
+
Project-URL: Repository, https://github.com/hs902/OxfordLedge
|
|
9
|
+
Project-URL: Documentation, https://www.oxfordledge.com/llm-guide
|
|
10
|
+
Keywords: mcp,finance,stocks,sec,edgar,bonds,bdc,credit,claude,anthropic
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: yfinance>=0.2.31
|
|
25
|
+
Provides-Extra: mcp
|
|
26
|
+
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
27
|
+
|
|
28
|
+
> **Last Updated:** 2026-04-24 ET — 2.0.0 architecture refactor
|
|
29
|
+
|
|
30
|
+
# Oxford Ledge MCP Server
|
|
31
|
+
|
|
32
|
+
Financial data tools for [Claude Desktop](https://claude.ai/download) via the [Model Context Protocol](https://modelcontextprotocol.io/).
|
|
33
|
+
|
|
34
|
+
36 tools for stocks, SEC filings, bonds, credit data, BDC holdings, macro indicators, and more. Works standalone with free public data or connects to your Oxford Ledge instance for the full suite.
|
|
35
|
+
|
|
36
|
+
**Upgrading from 1.x?** 2.0 is an internal architecture refactor — tool names, argument schemas, and output shapes are unchanged, and your Claude Desktop config stays the same. See [MIGRATING.md](./MIGRATING.md) for details. Under the hood, 2.0 extracts the shared tool registry (`@mcp_tool` decorator, cache, error class) into a new `oxford_ledge_mcp_core` subpackage that both the pip-installable server and Oxford Ledge's in-tree server consume — eliminates drift between the two.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install oxford-ledge-mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Claude Desktop Setup
|
|
45
|
+
|
|
46
|
+
Add to your `claude_desktop_config.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"oxford-ledge": {
|
|
52
|
+
"command": "oxford-ledge-mcp"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Restart Claude Desktop. You'll see 36 financial tools available.
|
|
59
|
+
|
|
60
|
+
### API Mode (recommended)
|
|
61
|
+
|
|
62
|
+
For all 36 tools, connect to a running Oxford Ledge instance:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"oxford-ledge": {
|
|
68
|
+
"command": "oxford-ledge-mcp",
|
|
69
|
+
"env": {
|
|
70
|
+
"OXFORD_LEDGE_URL": "https://www.oxfordledge.com"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Environment Variables
|
|
78
|
+
|
|
79
|
+
| Variable | Description |
|
|
80
|
+
|----------|-------------|
|
|
81
|
+
| `OXFORD_LEDGE_URL` | Oxford Ledge API URL (enables all 36 tools) |
|
|
82
|
+
| `FRED_API_KEY` | FRED API key for yield curve and economic data |
|
|
83
|
+
|
|
84
|
+
## Available Tools
|
|
85
|
+
|
|
86
|
+
### Standalone Tools (18 tools, no server needed)
|
|
87
|
+
|
|
88
|
+
| Tool | Description |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| `get_stock_quote` | Current price, P/E, EV/EBITDA, market cap, beta |
|
|
91
|
+
| `get_financials` | Income statement (revenue, net income, EBITDA) |
|
|
92
|
+
| `get_balance_sheet` | Assets, liabilities, equity, debt, cash |
|
|
93
|
+
| `get_cash_flow` | Operating, investing, financing cash flows, FCF |
|
|
94
|
+
| `get_analyst_recommendations` | Buy/hold/sell counts, price targets |
|
|
95
|
+
| `get_holders` | Top institutional shareholders |
|
|
96
|
+
| `get_company_info` | Sector, industry, employees, description |
|
|
97
|
+
| `compare_stocks` | Side-by-side comparison of 2-5 stocks |
|
|
98
|
+
| `get_sec_filings` | Recent 10-K, 10-Q, 8-K filings from EDGAR |
|
|
99
|
+
| `get_insider_trades` | Recent insider buy/sell transactions |
|
|
100
|
+
| `get_options_chain` | Calls and puts with expiry filtering |
|
|
101
|
+
| `screen_stocks` | Filter by sector, market cap, P/E, dividend yield |
|
|
102
|
+
| `get_fundamentals` | 10-year XBRL financials from SEC EDGAR |
|
|
103
|
+
| `search_bonds` | Search bond issuers via FINRA TRACE |
|
|
104
|
+
| `get_bond_data` | Look up bonds by CUSIP |
|
|
105
|
+
| `get_yield_curve` | Treasury yield curve from FRED |
|
|
106
|
+
| `get_fred_data` | Any FRED series (GDP, UNRATE, CPI, etc.) |
|
|
107
|
+
| `get_short_interest` | Short percent of float, days to cover |
|
|
108
|
+
|
|
109
|
+
### API-Mode Tools (18 additional tools, require OXFORD_LEDGE_URL)
|
|
110
|
+
|
|
111
|
+
| Tool | Description |
|
|
112
|
+
|------|-------------|
|
|
113
|
+
| `get_company_data` | Full company data with valuation multiples |
|
|
114
|
+
| `search_company` | Fuzzy search by name, ticker, or industry |
|
|
115
|
+
| `get_company_profile` | Business description, CEO, founding year |
|
|
116
|
+
| `get_corporate_events` | M&A, executive changes, restructurings |
|
|
117
|
+
| `get_market_indicators` | S&P 500, VIX, Treasury yields, gold, oil |
|
|
118
|
+
| `search_bdc_borrower` | Search BDC portfolio holdings by borrower |
|
|
119
|
+
| `get_bdc_list` | All tracked BDCs with AUM and holdings |
|
|
120
|
+
| `calculate_intrinsic_value` | DCF, EPV, Graham fair value models |
|
|
121
|
+
| `get_anomaly_flags` | 15 automated red flag checks |
|
|
122
|
+
| `get_debt_maturities` | Maturity schedule from 10-K footnotes |
|
|
123
|
+
| `get_capital_allocation` | 10-year buyback/dividend/debt scorecard |
|
|
124
|
+
| `get_peer_comparison` | Peer valuation and financial metrics |
|
|
125
|
+
| `get_news` | News archive search with sentiment scores |
|
|
126
|
+
| `get_price_history` | OHLCV price history |
|
|
127
|
+
| `get_13f_holdings` | Institutional 13F holdings from EDGAR |
|
|
128
|
+
| `get_value_investing_fact` | Buffett/Graham/Munger quotes and principles |
|
|
129
|
+
| `get_valuation_history` | Historical P/E, EV/EBITDA, P/B, P/S |
|
|
130
|
+
| `get_economic_calendar` | FOMC, CPI, GDP, jobs report dates |
|
|
131
|
+
|
|
132
|
+
## Data Sources
|
|
133
|
+
|
|
134
|
+
- **yfinance** -- real-time quotes, financials, analyst data
|
|
135
|
+
- **SEC EDGAR** -- XBRL fundamentals, 10-K/10-Q/8-K filings
|
|
136
|
+
- **FINRA TRACE** -- corporate bond search and pricing
|
|
137
|
+
- **FRED** -- Treasury yields, economic indicators
|
|
138
|
+
- **Oxford Ledge API** -- BDC holdings, news archive, valuations (API mode)
|
|
139
|
+
|
|
140
|
+
## Full Terminal
|
|
141
|
+
|
|
142
|
+
For the complete experience with 45+ databases, news archive, credit analysis, BDC data, and AI-powered analysis, visit [www.oxfordledge.com](https://www.oxfordledge.com).
|
|
143
|
+
|
|
144
|
+
## Standalone Mode Data Source Notice
|
|
145
|
+
|
|
146
|
+
The 18 standalone tools (including `get_stock_quote`, `get_financials`, `get_short_interest`, etc.) rely on the open-source [`yfinance`](https://pypi.org/project/yfinance/) library, which retrieves data from Yahoo Finance. Yahoo Finance's Terms of Service restrict automated access and commercial redistribution of scraped data. Because `oxford-ledge-mcp` runs on **your local machine** (inside Claude Desktop), all such requests originate from your IP and are governed by Yahoo's ToS as they apply to you.
|
|
147
|
+
|
|
148
|
+
- Standalone mode is intended for **personal, educational, and research** use.
|
|
149
|
+
- If you plan to use this data commercially, redistribute it, or integrate it into a paid product, **review Yahoo Finance's Terms of Service first** and obtain appropriate licensing.
|
|
150
|
+
- For commercial or production workloads, we strongly recommend **API mode** (set `OXFORD_LEDGE_URL`), which routes requests through Oxford Ledge's licensed data providers (FMP, Finnhub, SEC EDGAR, FRED) rather than scraping.
|
|
151
|
+
- Oxford Ledge LLC is not responsible for end-user compliance with third-party data provider terms when using standalone mode.
|
|
152
|
+
|
|
153
|
+
Tools that use yfinance under the hood: `get_stock_quote`, `get_financials`, `get_balance_sheet`, `get_cash_flow`, `get_analyst_recommendations`, `get_holders`, `get_company_info`, `compare_stocks`, `get_insider_trades`, `get_options_chain`, `screen_stocks`, `get_short_interest`.
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
> **Last Updated:** 2026-04-24 ET — 2.0.0 architecture refactor
|
|
2
|
+
|
|
3
|
+
# Oxford Ledge MCP Server
|
|
4
|
+
|
|
5
|
+
Financial data tools for [Claude Desktop](https://claude.ai/download) via the [Model Context Protocol](https://modelcontextprotocol.io/).
|
|
6
|
+
|
|
7
|
+
36 tools for stocks, SEC filings, bonds, credit data, BDC holdings, macro indicators, and more. Works standalone with free public data or connects to your Oxford Ledge instance for the full suite.
|
|
8
|
+
|
|
9
|
+
**Upgrading from 1.x?** 2.0 is an internal architecture refactor — tool names, argument schemas, and output shapes are unchanged, and your Claude Desktop config stays the same. See [MIGRATING.md](./MIGRATING.md) for details. Under the hood, 2.0 extracts the shared tool registry (`@mcp_tool` decorator, cache, error class) into a new `oxford_ledge_mcp_core` subpackage that both the pip-installable server and Oxford Ledge's in-tree server consume — eliminates drift between the two.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install oxford-ledge-mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Claude Desktop Setup
|
|
18
|
+
|
|
19
|
+
Add to your `claude_desktop_config.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"oxford-ledge": {
|
|
25
|
+
"command": "oxford-ledge-mcp"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Restart Claude Desktop. You'll see 36 financial tools available.
|
|
32
|
+
|
|
33
|
+
### API Mode (recommended)
|
|
34
|
+
|
|
35
|
+
For all 36 tools, connect to a running Oxford Ledge instance:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"oxford-ledge": {
|
|
41
|
+
"command": "oxford-ledge-mcp",
|
|
42
|
+
"env": {
|
|
43
|
+
"OXFORD_LEDGE_URL": "https://www.oxfordledge.com"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Environment Variables
|
|
51
|
+
|
|
52
|
+
| Variable | Description |
|
|
53
|
+
|----------|-------------|
|
|
54
|
+
| `OXFORD_LEDGE_URL` | Oxford Ledge API URL (enables all 36 tools) |
|
|
55
|
+
| `FRED_API_KEY` | FRED API key for yield curve and economic data |
|
|
56
|
+
|
|
57
|
+
## Available Tools
|
|
58
|
+
|
|
59
|
+
### Standalone Tools (18 tools, no server needed)
|
|
60
|
+
|
|
61
|
+
| Tool | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `get_stock_quote` | Current price, P/E, EV/EBITDA, market cap, beta |
|
|
64
|
+
| `get_financials` | Income statement (revenue, net income, EBITDA) |
|
|
65
|
+
| `get_balance_sheet` | Assets, liabilities, equity, debt, cash |
|
|
66
|
+
| `get_cash_flow` | Operating, investing, financing cash flows, FCF |
|
|
67
|
+
| `get_analyst_recommendations` | Buy/hold/sell counts, price targets |
|
|
68
|
+
| `get_holders` | Top institutional shareholders |
|
|
69
|
+
| `get_company_info` | Sector, industry, employees, description |
|
|
70
|
+
| `compare_stocks` | Side-by-side comparison of 2-5 stocks |
|
|
71
|
+
| `get_sec_filings` | Recent 10-K, 10-Q, 8-K filings from EDGAR |
|
|
72
|
+
| `get_insider_trades` | Recent insider buy/sell transactions |
|
|
73
|
+
| `get_options_chain` | Calls and puts with expiry filtering |
|
|
74
|
+
| `screen_stocks` | Filter by sector, market cap, P/E, dividend yield |
|
|
75
|
+
| `get_fundamentals` | 10-year XBRL financials from SEC EDGAR |
|
|
76
|
+
| `search_bonds` | Search bond issuers via FINRA TRACE |
|
|
77
|
+
| `get_bond_data` | Look up bonds by CUSIP |
|
|
78
|
+
| `get_yield_curve` | Treasury yield curve from FRED |
|
|
79
|
+
| `get_fred_data` | Any FRED series (GDP, UNRATE, CPI, etc.) |
|
|
80
|
+
| `get_short_interest` | Short percent of float, days to cover |
|
|
81
|
+
|
|
82
|
+
### API-Mode Tools (18 additional tools, require OXFORD_LEDGE_URL)
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
|------|-------------|
|
|
86
|
+
| `get_company_data` | Full company data with valuation multiples |
|
|
87
|
+
| `search_company` | Fuzzy search by name, ticker, or industry |
|
|
88
|
+
| `get_company_profile` | Business description, CEO, founding year |
|
|
89
|
+
| `get_corporate_events` | M&A, executive changes, restructurings |
|
|
90
|
+
| `get_market_indicators` | S&P 500, VIX, Treasury yields, gold, oil |
|
|
91
|
+
| `search_bdc_borrower` | Search BDC portfolio holdings by borrower |
|
|
92
|
+
| `get_bdc_list` | All tracked BDCs with AUM and holdings |
|
|
93
|
+
| `calculate_intrinsic_value` | DCF, EPV, Graham fair value models |
|
|
94
|
+
| `get_anomaly_flags` | 15 automated red flag checks |
|
|
95
|
+
| `get_debt_maturities` | Maturity schedule from 10-K footnotes |
|
|
96
|
+
| `get_capital_allocation` | 10-year buyback/dividend/debt scorecard |
|
|
97
|
+
| `get_peer_comparison` | Peer valuation and financial metrics |
|
|
98
|
+
| `get_news` | News archive search with sentiment scores |
|
|
99
|
+
| `get_price_history` | OHLCV price history |
|
|
100
|
+
| `get_13f_holdings` | Institutional 13F holdings from EDGAR |
|
|
101
|
+
| `get_value_investing_fact` | Buffett/Graham/Munger quotes and principles |
|
|
102
|
+
| `get_valuation_history` | Historical P/E, EV/EBITDA, P/B, P/S |
|
|
103
|
+
| `get_economic_calendar` | FOMC, CPI, GDP, jobs report dates |
|
|
104
|
+
|
|
105
|
+
## Data Sources
|
|
106
|
+
|
|
107
|
+
- **yfinance** -- real-time quotes, financials, analyst data
|
|
108
|
+
- **SEC EDGAR** -- XBRL fundamentals, 10-K/10-Q/8-K filings
|
|
109
|
+
- **FINRA TRACE** -- corporate bond search and pricing
|
|
110
|
+
- **FRED** -- Treasury yields, economic indicators
|
|
111
|
+
- **Oxford Ledge API** -- BDC holdings, news archive, valuations (API mode)
|
|
112
|
+
|
|
113
|
+
## Full Terminal
|
|
114
|
+
|
|
115
|
+
For the complete experience with 45+ databases, news archive, credit analysis, BDC data, and AI-powered analysis, visit [www.oxfordledge.com](https://www.oxfordledge.com).
|
|
116
|
+
|
|
117
|
+
## Standalone Mode Data Source Notice
|
|
118
|
+
|
|
119
|
+
The 18 standalone tools (including `get_stock_quote`, `get_financials`, `get_short_interest`, etc.) rely on the open-source [`yfinance`](https://pypi.org/project/yfinance/) library, which retrieves data from Yahoo Finance. Yahoo Finance's Terms of Service restrict automated access and commercial redistribution of scraped data. Because `oxford-ledge-mcp` runs on **your local machine** (inside Claude Desktop), all such requests originate from your IP and are governed by Yahoo's ToS as they apply to you.
|
|
120
|
+
|
|
121
|
+
- Standalone mode is intended for **personal, educational, and research** use.
|
|
122
|
+
- If you plan to use this data commercially, redistribute it, or integrate it into a paid product, **review Yahoo Finance's Terms of Service first** and obtain appropriate licensing.
|
|
123
|
+
- For commercial or production workloads, we strongly recommend **API mode** (set `OXFORD_LEDGE_URL`), which routes requests through Oxford Ledge's licensed data providers (FMP, Finnhub, SEC EDGAR, FRED) rather than scraping.
|
|
124
|
+
- Oxford Ledge LLC is not responsible for end-user compliance with third-party data provider terms when using standalone mode.
|
|
125
|
+
|
|
126
|
+
Tools that use yfinance under the hood: `get_stock_quote`, `get_financials`, `get_balance_sheet`, `get_cash_flow`, `get_analyst_recommendations`, `get_holders`, `get_company_info`, `compare_stocks`, `get_insider_trades`, `get_options_chain`, `screen_stocks`, `get_short_interest`.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Oxford Ledge MCP Server — financial data tools for Claude Desktop.
|
|
2
|
+
|
|
3
|
+
Install: pip install oxford-ledge-mcp
|
|
4
|
+
Usage: oxford-ledge-mcp (runs as stdio MCP server)
|
|
5
|
+
|
|
6
|
+
Two modes:
|
|
7
|
+
1. Standalone: 18 tools via yfinance + free APIs (no setup needed)
|
|
8
|
+
2. API mode: All 36 tools via Oxford Ledge instance
|
|
9
|
+
Set OXFORD_LEDGE_URL=https://www.oxfordledge.com
|
|
10
|
+
|
|
11
|
+
Claude Desktop config (claude_desktop_config.json):
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"oxford-ledge": {
|
|
15
|
+
"command": "oxford-ledge-mcp"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
__version__ = "1.0.0"
|