tiny-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., "@tiny-mcp-serverhelp me create a simple MCP server with one tool"
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.
tiny-mcp-server
The fastest, smallest way to build Model Context Protocol (MCP) servers in Python. Zero dependencies. MIT.
tiny-mcp-server is a single-file Python framework for building Model Context Protocol servers. No external dependencies, no boilerplate — just decorate a function with @tool and you're shipping an MCP server.
Features
🪶 One-file, zero-dependency — pure Python stdlib, drop it in any project
🪄
@tooldecorator — turn any function into an MCP tool with one line🚀 Multiple transports —
stdio(for desktop MCP clients) andsse(for web/remote)� Automatic JSON Schema generation — type hints + docstrings become tool schemas
�️ Built-in logging and error handling — never crash on a malformed payload
�️ MIT licensed — use it anywhere
Related MCP server: Berry MCP Server
Install
Pick whichever is easiest:
# Option 1 — pip (when published)
pip install tiny-mcp-server
# Option 2 — curl a single file and import it
curl -O https://raw.githubusercontent.com/hussain-alsaibai/tiny-mcp-server/main/tiny_mcp_server.py
# Option 3 — vendor it
cp tiny_mcp_server.py your_project/Quick Start
Here's a complete MCP server with two tools — under 20 lines:
from tiny_mcp_server import Server, tool
app = Server("hello-world")
@app.tool
def add(a: int, b: int) -> int:
"""Add two numbers together."""
return a + b
@app.tool
def greet(name: str = "World") -> str:
"""Greet someone by name."""
return f"Hello, {name}!"
if __name__ == "__main__":
app.run("stdio") # or "sse" for HTTP transportThe add tool's auto-generated JSON Schema:
{
"name": "add",
"description": "Add two numbers together.",
"inputSchema": {
"type": "object",
"properties": {
"a": {"type": "integer"},
"b": {"type": "integer"}
},
"required": ["a", "b"]
}
}Transports
stdio (default — for Claude Desktop, Cursor, etc.)
app.run("stdio")The server reads JSON-RPC messages from stdin and writes responses to stdout. This is the transport used by every desktop MCP client.
SSE (HTTP — for web clients)
app.run("sse", host="127.0.0.1", port=8000)Exposes a Server-Sent Events endpoint at /sse and a POST endpoint at /messages. Great for running an MCP server as a local microservice.
API Reference
Server(name: str)
app = Server("my-server")@app.tool
@app.tool(name="optional-name", description="optional-desc")
def my_tool(arg: str, count: int = 1) -> str:
"""Tool description (used as fallback if description not provided)."""
return arg * countname— defaults to the function namedescription— defaults to the function's docstringArguments are inferred from the signature; types from annotations
Default values become optional in the schema
app.run(transport: str, **kwargs)
"stdio"— no extra args"sse"—host(default127.0.0.1),port(default8000)
Examples
See examples/hello_world.py for a runnable demo.
License
MIT © hussain-alsaibai
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…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseDqualityDmaintenanceA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.137MIT
- AlicenseNot gradedqualityDmaintenanceA universal framework for creating and deploying custom Model Context Protocol (MCP) tool servers with decorator-based tool registration, supporting multiple transports and automatic JSON schema generation for AI assistants.1MIT
- AlicenseNot gradedqualityFmaintenanceA robust server implementing the Model Context Protocol with SSE and STDIO transport, enabling real-time communication and extensible tooling for AI models.205 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA simple toolkit for creating MCP servers with stdio and SSE transport, auto-validating tools via Pydantic.MIT