UVG Local MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UVG Local MCP ServerAnalyze the text 'Hello world' for word count and case."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UVG Local MCP Server
Author: Anggelie Velásquez — Student ID 221181 Universidad del Valle de Guatemala — Course CC3067
1. Description
Local MCP (Model Context Protocol) server, implemented from scratch in standard Python 3, without using FastMCP or any official MCP SDK. The server communicates with a client through stdio, using JSON-RPC 2.0 implemented manually.
Related MCP server: @belal-elsabbagh-apex/copilot-mcp
2. Objective
Demonstrate understanding of the MCP server lifecycle (initialize → notifications/initialized → tools/list → tools/call) by building the protocol manually, without relying on libraries that hide that logic.
3. Architecture
Cliente MCP <-- stdio (stdin/stdout) --> server.py
│
┌─────────┴─────────┐
│ │
jsonrpc.py tools.py
(formato JSON-RPC 2.0) (herramientas)server.py: entry point, stdin read loop, and method routing.jsonrpc.py: construction of JSON-RPC 2.0 responses/errors and basic validation.tools.py: centralized tool registry (metadata + schema + executor function).
4. Protocol used
Transport: stdio (standard input / standard output).
Framing: one JSON-RPC 2.0 message per line (JSON Lines / NDJSON). No
Content-Length-style framing is used.Message format: JSON-RPC 2.0, implemented manually (no JSON-RPC or MCP libraries).
Reported MCP protocol version:
2024-11-05(protocolVersionfield in theinitializeresponse).stdoutis reserved exclusively for JSON-RPC responses. All logs are sent tostderr.
5. MCP methods implemented
Method | Type | Description |
| Request | Returns |
| Notification | Client confirmation; generates no response. |
| Request | Returns the list of available tools with their |
| Request | Executes a tool with the received arguments. |
Any other method returns the JSON-RPC error -32601 Method not found.
6. Available tools
analizar_texto
Input: { "texto": "Hola mundo" }
Returns: character count, word count, line count, text in uppercase and lowercase.
calcular_estadisticas
Input: { "numeros": [10, 20, 30, 40] }
Returns: count, sum, average, minimum, and maximum.
Validates that numeros is a list, not empty, and contains only numeric values.
informacion_sistema
No arguments. Returns: operating system, Python version, platform, and current working directory. Does not expose passwords, tokens, environment variables, or file contents.
7. Requirements
Python 3.8 or higher.
No external dependencies required (see requirements.txt).
8. Installation
git clone https://github.com/Anggelie/mcp-local-server-uvg.git
cd mcp-local-server-uvg9. How to run the server manually
From PowerShell, the server waits for messages on stdin:
python src/server.pyYou can write a JSON line and press Enter, for example:
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}The server will respond with a JSON line on stdout. To exit, press Ctrl+Z and then Enter (end of stdin on Windows).
You can also send the entire example file at once:
Get-Content examples/requests.jsonl | python src/server.py10. How to test it
Automated tests (unittest)
python -m unittest discover tests -vDemo client (subprocess)
python examples/test_client.pyThis script launches src/server.py as a subprocess and automatically runs the initialize -> initialized -> tools/list -> tools/call cycle for all 3 tools, plus a nonexistent-method case.
11. How to configure it in an MCP client
An example configuration is included in client-config/claude_desktop_config.example.json:
{
"mcpServers": {
"uvg-local-server": {
"command": "python",
"args": [
"C:\\RUTA\\AL\\PROYECTO\\src\\server.py"
]
}
}
}Important: replace C:\RUTA\AL\PROYECTO with the actual path where you cloned this repository on your machine.
12. Examples
See examples/requests.jsonl, which contains one JSON-RPC message per line covering initialize, notifications/initialized, tools/list, and tools/call for all three tools, plus error cases.
13. Project structure
mcp-local-server-uvg/
│
├── src/
│ ├── server.py # Punto de entrada del servidor
│ ├── jsonrpc.py # Utilidades JSON-RPC 2.0
│ └── tools.py # Registro de herramientas
│
├── tests/
│ ├── test_jsonrpc.py
│ └── test_tools.py
│
├── examples/
│ ├── requests.jsonl
│ └── test_client.py
│
├── client-config/
│ └── claude_desktop_config.example.json
│
├── .gitignore
├── requirements.txt
├── README.md
└── README_ES.md14. Error handling
The standard JSON-RPC 2.0 codes are implemented:
Code | Meaning | When it occurs |
| Parse error | The received line is not valid JSON. |
| Invalid Request |
|
| Method not found | The requested method is not implemented. |
| Invalid params | Missing or incorrectly typed arguments in |
| Internal error | Unexpected error during execution (must not crash the server). |
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides file reading and mathematical calculation tools through the Model Context Protocol. Enables reading file contents and evaluating mathematical expressions via stdio transport.-
- FlicenseNot gradedqualityAmaintenanceEnables EHR Copilot operations such as order cloning, queue building, and execution trace analysis over stdio.-
- AlicenseNot gradedqualityCmaintenanceEnables local tool calling over Model Context Protocol via stdio, providing deterministic tools such as calc.add, text.word_count, and text.summarize_naive after JSON-RPC handshake and discovery.MIT
- AlicenseNot gradedqualityBmaintenanceProvides a production-ready Model Context Protocol server with dual STDIO and Streamable HTTP transports, enabling file operations, memory, database queries, RAG, web search, GitHub integration, background tasks, and prompt-based workflows.MIT