NPTools / README.md
Nelson André
Add input validation and update documentation
9587243
|
Raw
History Blame Contribute Delete
2.31 kB
---
title: NPTools
emoji: 🐢
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.43.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: MCP Server for Employee Management
---
# NPTools - Employee Management MCP Server
An MCP (Model Context Protocol) server that provides tools for managing employee records via OutSystems REST API.
## Available Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| `get_employees` | Get list of all employees | None |
| `get_employee_by_id` | Get a specific employee by ID | `employee_id` (required, integer) |
| `create_employee` | Create a new employee record | `name` (required), `nif`, `date_of_birth`, `address` |
## Tool Details
### get_employees
Returns a list of all employees with fields: Id, Name, NIF, DateOfBirth, Address, CreatedOn, Phone.
### get_employee_by_id
Fetches a single employee by their unique identifier.
**Parameters:**
- `employee_id` (integer, required): The unique identifier of the employee
### create_employee
Creates a new employee record in the system.
**Parameters:**
- `name` (string, required): Employee name (max 500 characters)
- `nif` (integer, optional): Tax identification number
- `date_of_birth` (string, optional): Date of birth in YYYY-MM-DD format
- `address` (string, optional): Employee address (max 500 characters)
## MCP Configuration
To use this MCP server with Claude Desktop or other MCP clients, add to your configuration:
```json
{
"mcpServers": {
"nptools": {
"url": "https://nelsondiasandre-nptools.hf.space/gradio_api/mcp/sse"
}
}
}
```
## Web Interface
The Gradio interface provides tabs for testing each endpoint:
- **Get All Employees**: Fetch all employee records
- **Get Employee by ID**: Look up a specific employee
- **Create Employee**: Add a new employee record
- **MCP Protocol**: Raw MCP JSON-RPC interface for testing
## Backend API
This MCP server connects to an OutSystems REST API at:
`https://nelsonandre.outsystemscloud.com/MCPServer/rest/MCP`
## Security Features
- Input validation for all parameters
- String length limits (500 characters max)
- Date format validation (YYYY-MM-DD)
- Positive integer validation for IDs
- Non-negative validation for NIF
- Generic error messages (no internal details leaked)