utilityforge-mcp
v1.0.3
Published
A Model Context Protocol (MCP) server implementation for providing tool functionalities to AI models
Maintainers
Readme
MCP Server
A Model Context Protocol (MCP) server implementation using Node.js and Express.
What is MCP?
Model Context Protocol (MCP) is a standard that connects AI systems with external tools and data sources. This server provides a standardized way to expose functions/tools that can be called by AI systems.
Features
- Express-based HTTP API
- Built-in tool registration system
- Sample tool implementations
- Easy extensibility
- CORS support
Installation
# Clone the repository (if using git)
git clone [your-repo-url]
cd mcp-server
# Install dependencies
npm installConfiguration
The server uses environment variables for configuration:
PORT: The port on which the server will run (default: 3000)NODE_ENV: The environment mode (development, production)
You can set these in the .env file.
Usage
Starting the server
# Start the server
npm start
# Start with nodemon (automatic restarts during development)
npm run devAPI Endpoints
GET /health: Health check endpointGET /functions: List all available tools/functionsPOST /execute: Execute a specific function with parameters
Example usage with curl:
# Get list of available functions
curl http://localhost:3000/functions
# Execute a function
curl -X POST http://localhost:3000/execute \
-H "Content-Type: application/json" \
-d '{"function_name": "echo", "parameters": {"message": "Hello, World!"}}'Adding Custom Tools
You can add custom tools in the src/tools.js file following this format:
toolName: {
description: "Description of what the tool does",
execute: async (params) => {
// Implementation
return {
// Result
};
}
}Deploying to Windsurf
To deploy this MCP server to Windsurf:
- Make sure you have the Windsurf CLI installed
- Configure your Windsurf credentials
- Run
npm run deployor follow the Windsurf deployment documentation
License
MIT
