About Model Context Protocol Server
Model Context Protocol Server is an MCP server published by ShravyaC30 in the AI category: mCP server: Model Context Protocol Server. It has been installed 0 times through Conduid.
Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx model-context-protocol-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Model Context Protocol Server
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
MCP File & URL Tools
A clean, production-ready MCP (Model Context Protocol) server built with Node.js that provides two essential tools: read_file and fetch_url.
Features
- read_file: Read local files and return their contents as text
- fetch_url: Perform HTTP GET requests with timeout and error handling
- Clean, modular architecture
- Full MCP protocol compliance
- Simple test client included
Project Structure
.
├── src/
│ ├── server.js # MCP server setup and routing
│ └── tools/
│ ├── readFile.js # read_file tool implementation
│ └── fetchUrl.js # fetch_url tool implementation
├── client/
│ └── testClient.js # Simple test client
├── package.json
└── README.md
Installation
-
Install Node.js 18+ (for native fetch support)
-
Install dependencies:
npm install
Usage
Running the MCP Server
The server uses stdio transport and follows the MCP protocol:
npm start
# or
node src/server.js
Testing with the Test Client
Run the included test client:
npm test
# or
node client/testClient.js
Tools
Tool 1: read_file
Read a local file and return its contents as text.
Input:
{
"path": "/path/to/file.txt"
}
Output: Returns the file contents as plain text in the MCP response format.
Error Handling:
- File not found (ENOENT)
- Permission denied (EACCES)
- Path is a directory (EISDIR)
- Other file system errors
Tool 2: fetch_url
Perform a GET request to a URL and return the response.
Input:
{
"url": "https://example.com"
}
Output: Returns a JSON object containing:
status: HTTP status codestatusText: HTTP status textheaders: Response headersbody: Response body as text
Features:
- 10 second timeout to prevent hanging requests
- Basic URL validation
- Network error handling
- User-Agent header included
MCP Client Configuration
To use this server with an MCP client, configure it as follows:
{
"mcpServers": {
"file-url-tools": {
"command": "node",
"args": ["path/to/src/server.js"]
}
}
}
Design Decisions
Architecture
- Modular structure: Tools are separated into individual modules for maintainability
- Error handling: Consistent error handling across all tools with clear error messages
- MCP compliance: Uses official MCP SDK and follows protocol specifications
read_file Tool
- Uses
fs/promisesfor async file operations - UTF-8 encoding only (text files)
- Path resolution for relative paths
fetch_url Tool
- Uses Node.js built-in
fetch(Node 18+) - 10 second timeout via AbortController
- Returns complete response info (status, headers, body)
License
MIT
README mirrored from the source repository 3 months ago. The original is authoritative.