Installation
The Shinzo Python instrumentation library works with Python MCP servers built with the core MCP SDK or FastMCP. Simply install the base package:
pip install shinzo
接入你的智能体
从发布者处安装。不是 PlugMCP 端点。
远程 URL 还是本机命令? 两种安装方式的区别
来自发布者
The Shinzo Python instrumentation library works with Python MCP servers built with the core MCP SDK or FastMCP. Simply install the base package:
pip install shinzo
Python SDK for MCP server observability, built on OpenTelemetry. Gain insight into agent usage patterns, contextualize tool calls, and analyze server performance across platforms. Integrate with any OpenTelemetry ingest service including the Shinzo platform.
Choose the example that matches your MCP SDK:
from mcp.server.fastmcp import FastMCP
from shinzo import instrument_server
# Create FastMCP server
mcp = FastMCP(name="my-mcp-server")
# Instrument it with Shinzo
observability = instrument_server(
mcp,
config={
"server_name": "my-mcp-server",
"server_version": "1.0.0",
"exporter_auth": {
"type": "bearer",
"token": "your-api-token"
}
}
)
# Define your tools
@mcp.tool()
def get_weather(city: str) -> str:
"""Get weather for a city."""
return f"Weather for {city}: Sunny"
# Run the server
if __name__ == "__main__":
mcp.run()
from mcp.server import Server
from shinzo import instrument_server
# Create your MCP server
server = Server("my-mcp-server")
# Instrument it with Shinzo
observability = instrument_server(
server,
config={
"server_name": "my-mcp-server",
"server_version": "1.0.0",
"exporter_auth": {
"type": "bearer",
"token": "your-api-token"
}
}
)
# Define your tools
@server.call_tool()
async def get_weather(city: str) -> str:
return f"Weather for {city}: Sunny"
# Clean shutdown
async def shutdown():
await observability.shutdown()
Shinzo automatically detects and instruments your MCP server regardless of which SDK you use:
Both SDKs receive the same comprehensive instrumentation with no additional configuration needed.
exporter_auth)Run the test suite to verify the library's behavior:
# Run all tests
python -m pytest tests/
# Run with coverage report
python -m pytest tests/ --cov=shinzo --cov-report=term-missing
# Run specific test file
python -m pytest tests/test_config.py -v
# Or use make
make test
The test suite validates:
Run all linting checks before submitting a PR:
# Run all linting checks (black, ruff, mypy)
make lint-all
# Or run individual checks
make format # Format code with black
make lint # Run ruff linter
make type-check # Run mypy type checker
This ensures your code passes all CI validation checks locally before pushing.
This package is distributed under the MIT License.
Contributions are welcome! Please see the Contributing Guide for more information.
Python SDK for MCP server observability, built on OpenTelemetry. Gain insight into agent usage patterns, contextualize tool calls, and analyze server performance across platforms. Integrate with any O
概览
Python SDK for MCP server observability, built on OpenTelemetry. Gain insight into agent usage patterns, contextualize tool calls, and analyze server performance across platforms. Integrate with any OpenTelemetry ingest service including the Shinzo platform.
工具
暂无工具列表。远程服务器在首次健康检查后会获得工具列表。
常见问题
在本页复制适用于 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 配置。它使用发布者的安装方式,而不是 PlugMCP 代理。
此记录未列出必需的环境变量。
Shinzo Py 通过 stdio 在本地运行。
上次检查时间:2026-10-28。 Python SDK for MCP server observability, built on OpenTelemetry. Gain insight into agent usage patterns, contextualize tool calls, and analyze server performance across platforms. Integrate with any OpenTelemetry ingest service including the Shinzo platform.