URL Content Saver MCP Server
A Model Context Protocol (MCP) server that allows AI agents to download content from any URL and save it directly to a specified file path.
Features
- Provides a tool for AI agents to download content from any URL and save it to a specified file path
- Handles large content that would exceed the AI’s token limit by processing the download and file writing operations server-side
- Supports saving files to any valid path specified by the AI agent
- Implements proper error handling for cases such as invalid URLs, network failures, or permission issues
- Returns a success confirmation or detailed error message to the AI agent
Prerequisites
- Node.js 18.x or higher
- npm or yarn
Installation
Installing via Smithery
To install url-content-saver-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @chirag127/url-content-saver-mcp-server --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/chirag127/URL-Content-Saver-MCP-Server.git
cd URL-Content-Saver-MCP-Server
- Install dependencies:
npm install
- Build the project:
npm run build
Usage
Command Line (stdio)
Run the server with stdio transport (for direct integration with AI agents):
npm start
HTTP Server
Run the server with HTTP transport (for remote integration):
npm run start:http
By default, the HTTP server listens on port 3000. You can change this by setting the PORT environment variable:
PORT=8080 npm run start:http
Tool Documentation
The server provides a single tool:
saveUrlContent
Downloads content from a URL and saves it to a specified file path.
Parameters
url(string, required): The complete URL to fetch content from (must include http:// or https://)filePath(string, required): The complete target file path where the content should be saved
Returns
On success:
{
"success": true,
"filePath": "/absolute/path/to/saved/file.html",
"fileSize": 12345,
"contentType": "text/html",
"url": "https://example.com",
"statusCode": 200
}
On error:
{
"success": false,
"error": "Detailed error message"
}
Example
{
"name": "saveUrlContent",
"arguments": {
"url": "https://example.com/sample.pdf",
"filePath": "/path/to/save/sample.pdf"
}
}
Integration with AI Agents
Claude for Desktop
- Start the HTTP server:
npm run start:http
In Claude for Desktop, add the MCP server:
- Go to Settings > MCP Servers
- Click “Add Server”
- Enter the URL:
http://localhost:3000/mcp - Name it “URL Content Saver”
Claude can now use the
saveUrlContenttool to download and save content.
Programmatic Integration
For programmatic integration with the MCP TypeScript SDK:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
async function main() {
const transport = new StreamableHTTPClientTransport(
new URL("http://localhost:3000/mcp")
);
const client = new Client({
name: "example-client",
version: "1.0.0",
});
await client.connect(transport);
// Call the saveUrlContent tool
const result = await client.callTool({
name: "saveUrlContent",
arguments: {
url: "https://example.com/sample.pdf",
filePath: "/path/to/save/sample.pdf",
},
});
console.log(result);
}
main().catch(console.error);
Development
For development with auto-reloading:
# For stdio transport
npm run dev
# For HTTP transport
npm run dev:http
License
ISC
Author
Chirag Singhal
URL Content Saver
Project Details
- chirag127/URL-Content-Saver-MCP-Server
- Last Updated: 5/17/2025
Recomended MCP Servers
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the...
- Amin Azmoodeh – Code. Create. Evolve.
MCP Server + Plugin for Unity Editor and Unity game. The Plugin allows to connect to MCP clients...
Korea Law Tool
芋道管理后台,基于 Vue3 + Element Plus 实现,支持 RBAC 动态权限、数据权限、SaaS 多租户、Flowable 工作流、三方登录、支付、短信、商城、CRM、ERP、AI 大模型等功能。
A FastAPI-based server that acts as a Model Context Protocol (MCP) wrapper for the Ollama API. This server...
Bengaluru BMTC MCP Server
MCP server to provide Figma layout information to AI coding agents like Cursor





