Pywss
一个轻量级的 Python Web 框架,一站式集成 MCP SSE、StreamHTTP 和 MCPO 协议,助你轻松构建MCP Server🔥
What is Pywss?
Pywss is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 一个轻量级的 python web 框架,一站式集成 mcp sse、streamhttp 和 mcpo 协议,助你轻松构建mcp server🔥
一个轻量级的 Python Web 框架,一站式集成 MCP SSE、StreamHTTP 和 MCPO 协议,助你轻松构建MCP Server🔥
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 一个轻量级的 Python Web 框架,一站式集成 MCP SSE、StreamHTTP 和 MCPO 协议,助你轻松
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx pywssConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Pywss
Pywss is a lightweight Python web framework that provides first-class support for building MCP servers with integrated SSE, StreamHTTP, and MCPO protocol handling in a single package. Developers define MCP tools as class methods prefixed with 'tool_', annotate them with Pydantic models for automatic parameter validation and OpenAPI documentation, and then mount them to route groups with one call. This makes Pywss well suited for teams who want to create internal MCP servers using Python web conventions rather than wrapping a CLI tool, and who need to serve multiple independent MCP services on different route paths from a single process.
Prerequisites
- Python 3.6 or higher installed
- pip or pip3 available for installing the package
- Pydantic installed (installed automatically as a pywss dependency)
- An MCP-compatible client such as Claude Desktop that supports SSE or StreamHTTP transports
Install pywss
Install pywss from PyPI using pip. This pulls in all required dependencies including Pydantic.
pip3 install pywssCreate an MCP server class
Create a Python file defining your MCP server. Subclass pywss.mcp.MCPServer, name your tool methods with the 'tool_' prefix, and annotate them with @pywss.openapi.docs and a Pydantic request model.
# mcp_server.py
import pywss
from pydantic import BaseModel
from pywss.mcp import MCPServer
class SearchReq(BaseModel):
query: str
class MyMCPServer(MCPServer):
@pywss.openapi.docs(description="Search for items", request=SearchReq)
def tool_search(self, ctx: pywss.Context):
req: SearchReq = ctx.data.req
self.handle_success(ctx, {"results": [f"Result for {req.query}"]})
mcp = MyMCPServer()
app = pywss.App()
app.openapi()
mcp.mount(app.group("/api/v1/search"))
app.run()Start the server
Run your Python file to start the pywss application. By default it listens on port 8080.
python3 mcp_server.pyIdentify the protocol endpoints
Each mounted MCPServer automatically exposes three protocol endpoints. For the example above mounted at /api/v1/search, the endpoints are: SSE at GET /api/v1/search/sse, StreamHTTP at POST /api/v1/search/mcp, and MCPO at POST /api/v1/search/tools/{tool_name}.
Connect your MCP client to the SSE endpoint
Point your MCP client at the SSE endpoint. For Claude Desktop, configure an SSE-transport server entry pointing to your running pywss server.
{
"mcpServers": {
"pywss-search": {
"url": "http://localhost:8080/api/v1/search/sse"
}
}
}Pywss Examples
Client configuration
For clients that support SSE transport, point them at the pywss SSE endpoint. Replace the URL with your server's host and the route you mounted the MCPServer on.
{
"mcpServers": {
"pywss": {
"url": "http://localhost:8080/api/v1/myservice/sse"
}
}
}Prompts to try
Once your pywss MCP server is running and connected, try these prompts based on the tools you defined.
- "Call the search tool with query 'python async'."
- "What tools are available on this MCP server?"
- "Use tool_get_domain to look up domain 'example.com'."
- "Run the tool_get_trace_log function for trace ID 'abc-123'."
- "Show me the OpenAPI documentation for this service at http://localhost:8080/openapi"Troubleshooting Pywss
ImportError: No module named 'pywss'
Run 'pip3 install pywss' in the same Python environment you are using to run your server. If using virtual environments, activate it first.
MCP client cannot connect to the SSE endpoint
Confirm the pywss app is running and listening on the expected port (default 8080). Check that the URL in your client config matches the route you passed to mcp.mount(). Test the endpoint with: curl http://localhost:8080/api/v1/yourservice/sse
Tool methods are not discovered by the MCP client
Ensure every tool method name starts with 'tool_' and is decorated with @pywss.openapi.docs with both 'description' and 'request' arguments. Methods missing either the prefix or the decorator will not be registered as MCP tools.
Frequently Asked Questions about Pywss
What is Pywss?
Pywss is a Model Context Protocol (MCP) server that 一个轻量级的 python web 框架,一站式集成 mcp sse、streamhttp 和 mcpo 协议,助你轻松构建mcp server🔥 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Pywss?
Follow the installation instructions on the Pywss GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Pywss?
Pywss works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Pywss free to use?
Yes, Pywss is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Pywss Alternatives — Similar Developer Tools Servers
Looking for alternatives to Pywss? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Pywss in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Pywss?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.