| ---
|
| license: mit
|
| tags:
|
| - public-domain
|
| - osf-2.0.1
|
| - mcp
|
| - x402
|
| - sec-edgar
|
| ---
|
| # Open Source Filings (OSF) Data Endpoints
|
|
|
| Verifiable public-record data with provenance back to primary U.S. government sources (SEC EDGAR). Every record links to its originating filing so any agent can confirm it independently. x402 v2 compatible. Discovery manifest provided for facilitator crawling.
|
|
|
| **MCP Tools Endpoint:** https://api.osf-master-server.com/mcp/tools
|
|
|
| **x402 Discovery Manifest:** https://api.osf-master-server.com/.well-known/x402
|
|
|
| **Contact:** coreygallant@gmail.com
|
|
|
| ### Agent Client Integration (x402 v2, Python)
|
|
|
| ```python
|
| from eth_account.messages import encode_defunct
|
| from eth_account import Account
|
| import requests, json, base64
|
| API_URL = 'https://api.osf-master-server.com/mcp/call'
|
| payload = {"method": "tools/call", "params": {"name": "get_record", "arguments": {"record_id": 1}}}
|
| r = requests.post(API_URL, json=payload)
|
| if r.status_code == 402:
|
| reqs = json.loads(base64.b64decode(r.headers['PAYMENT-REQUIRED']).decode())
|
| tx_hash = '0xYourUSDCTransferTxHash'
|
| msg = encode_defunct(text=f'{tx_hash}:1')
|
| sig = Account.sign_message(msg, private_key='YOUR_KEY').signature.hex()
|
| signed = base64.b64encode(json.dumps({'tx_hash': tx_hash, 'signature': sig}).encode()).decode()
|
| paid = requests.post(API_URL, json=payload, headers={'PAYMENT-SIGNATURE': signed})
|
| print(paid.json())
|
| ```
|
|
|