home / mcp / tavily extract mcp server
Provides a local page extraction service via a Python script executed as a standalone MCP stdio server.
Configuration
View docs{
"mcpServers": {
"algonacci-mcp-tavily-extract": {
"command": "uv",
"args": [
"--directory",
"%USERPROFILE%/Documents/GitHub/mcp-tavily-extract",
"run",
"python",
"main.py"
],
"env": {
"TAVILY_API_KEY": "YOUR_API_KEY"
}
}
}
}This MCP server lets clients extract a web page by running a Python script from a dedicated local process. It’s useful when you want an automated, repeatable way to fetch and process page content within your MCP workflow, using a lightweight local runner to execute the extraction script.
Set up your MCP client to reference the tavily_extract server as a stdio endpoint. This server runs a local command that executes a Python script to perform the extraction. Ensure you provide the required API key in your environment so the extraction flow can access the external service it needs.
Prerequisites you need to have before configuring this server:
- Python 3.x installed on your system.
- A runtime for the local MCP command (UV or equivalent) installed so you can run the local process.
- A working directory where you will place the extraction scripts (the expected directory path in the configuration is a Windows-style user documents path).
- An API key for the Tavily service saved in a .env file as TAVILY_API_KEY.
Follow these steps to initialize and run the server within your MCP setup:
1. Prepare your working directory where the extraction script resides. The path used by the MCP config is %USERPROFILE%/Documents/GitHub/mcp-tavily-extract. Ensure main.py exists in that directory and is ready to run with Python.
2. Create or update your environment so the Tavily API key is available. Add a line like TAVILY_API_KEY=YOUR_API_KEY in a .env file in your project root.
3. Add the MCP server configuration to your MCP config file exactly as shown in the code example below so the local process can be started by the MCP system.
4. Start your MCP client or environment that loads the MCP configuration. The tavily_extract server will invoke the local command with the arguments provided.
Configuration notes: you enable the local extraction by wiring the stdio server with the exact command and arguments shown in the configuration example. The server uses a dedicated directory to store or access extracted content, so keep that directory consistent with your workflow.
Security: protect your TAVILY_API_KEY. Do not commit it to public repositories and only expose it to processes that require it. Use environment management best practices to keep keys secure.
Troubleshooting: if the extraction does not start, verify that the Python script main.py is present in the specified directory, that Python 3.x is installed, and that the UV runtime (or equivalent) is available to run the command. Check that the environment variable TAVILY_API_KEY is set in the environment used by the MCP client.