使用说明
🛠️ DevKnife MCP Server
The Developer Swiss Army Knife for AI Agents.
DevKnife is a blazing-fast, zero-cost Model Context Protocol (MCP) server that bundles 15+ essential developer utilities. It gives your AI agents (like Claude Desktop, LangChain, or custom LLM apps) the ability to instantly validate, encode, decode, parse, and manipulate data without hallucinating.
🧰 Included Tools
json_format: Format and validate JSON strings.base64_encode: Encode text to Base64.base64_decode: Decode Base64 strings.uuid_generate: Generate random UUID v4s.hash_compute: Compute MD5, SHA-1, SHA-256, or SHA-512 hashes.regex_test: Test regular expressions against strings and extract capture groups.jwt_decode: Decode JWT headers and payloads (no secret required).cron_parse: Parse cron expressions and get the next 5 occurrences.timestamp_convert: Convert between epoch timestamps and ISO 8601 strings.markdown_to_html: Convert Markdown to HTML.url_encode: URL encode a string.url_decode: URL decode a string.html_encode: Encode HTML entities.html_decode: Decode HTML entities.lorem_ipsum: Generate dummy text for testing.
🚀 Getting Started Locally
- Clone the repository:
git clone https://github.com/yourusername/devknife-mcp.git cd devknife-mcp - Install dependencies:
npm install - Start the development server (includes a UI playground):
npm run dev - The MCP SSE endpoint will be available at:
http://localhost:3000/mcp/sse
☁️ Deployment Guide
This project is designed to be hosted for $0/month.
Option A: Render.com (Recommended)
Because the official @modelcontextprotocol/sdk relies on Node.js streams for Server-Sent Events (SSE), deploying to a native Node environment is highly recommended.
- Go to Render.com and create a New Web Service.
- Connect this GitHub repository.
- Build Command:
npm run build - Start Command:
npm start - Render will automatically provision a free URL (e.g.,
https://devknife-mcp.onrender.com/mcp/sse).
Option B: Cloudflare Workers
This repository includes a worker.ts and wrangler.toml for Edge deployment.
- Go to the Cloudflare Dashboard -> Workers & Pages.
- Click Create Application -> Pages -> Connect to Git.
- Select this repository.
- Framework preset:
None - Build command:
npm install - Note: Running the official MCP SDK on Cloudflare Workers currently requires bridging Web Streams to Node streams. If your MCP client fails to connect via Cloudflare, use Render.com instead.
🔌 Connecting to an MCP Client
DevKnife exposes an SSE (Server-Sent Events) transport.
If you are using an MCP client that supports SSE (like many web-based AI agents), simply provide your deployed URL:
https://your-deployed-app.com/mcp/sse
(Note: Claude Desktop currently natively supports stdio transports. To use an SSE server with Claude Desktop, you may need a lightweight stdio-to-sse bridge script).
