This repository contains example code for using the Foundational Lineage API. You can run the examples either directly on your local machine or within a Docker container.
To get started, clone this repository to your local machine:
git clone https://github.com/foundational-io/lineage-api-examples.git
cd lineage-api-examples
Before running the examples, you need an API token. Follow the instructions here to generate your API key: Creating an API Token
Update the following variables in the main.py
file under hello_lineage_graph
folder:
ENTITY_NAME = "table_name_to_search_for"
API_KEY_ID = "your_api_key_id"
API_KEY_SECRET = "your_api_key_secret"
You can run the example in two ways: directly on your machine or within Docker.
- Install the required dependencies:
pip install -r requirements.txt
- Run the example script:
python hello_lineage_graph/main.py
- Build the Docker image:
docker build -t lineage-api-example .
- Run the container:
docker run --rm lineage-api-example
This repository includes an MCP server implementation that provides convenient access to the Foundational API. To use it:
-
Install the MCP package:
pip install mcp
-
Test that the server is running correctly by executing:
mcp run /path/to/lineage-api-examples/mcp/foundational_mcp_server.py
-
Configure the MCP server in your AI assistant settings (e.g., Claude). Add the following configuration, replacing the paths and API credentials with your own:
{ "mcpServers": { "FoundationalRamp": { "command": "/path/to/your/python/mcp", "args": [ "run", "/path/to/lineage-api-examples/mcp/foundational_mcp_server.py" ], "env": { "FOUNDATIONAL_API_KEY": "your-api-key", "FOUNDATIONAL_API_SECRET": "your-api-secret" } } }, "globalShortcut": "" }
The MCP server provides tools for searching entities, getting entity details, and exploring upstream/downstream dependencies through your AI assistant.
- Learn more about the API: Getting Started with the Lineage API
- Explore the OpenAPI documentation: API Reference
If you have any questions, please contact [email protected].