mcp-server

Diegoval-Dev/mcp-server

3.1

If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This is a minimal Model Context Protocol (MCP) server implemented in Python, designed to handle JSON-RPC stdio transport.

Tools
4
Resources
0
Prompts
0

MCP Local Server

Minimal Model Context Protocol (MCP) server written in Python.

Features

  • Implements JSON-RPC stdio transport.
  • Tools:
    • sum: safely sum a list of numbers.
    • grep_lines: filter lines containing a substring.
    • sha256: compute SHA-256 hash of text.
    • json_validate: validate data against a JSON Schema.

Usage

Run locally

python main.py

Test with jq or PowerShell

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"Test","version":"0.1"}}}' | python main.py

Example tool call

echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"sum","arguments":{"values":[1,2,3.5]}}}' | python main.py

Logging

Setea MCP_LOG_FILE para escribir JSONL además de stderr:

$env:MCP_LOG_FILE="D:\ruta\log.jsonl"
python .\main.py