mcp
learn to make some mcp servers
claude mcp add --transport stdio yigmmk-mcp-server uv --directory /path/to/your/mcp-server run main.py \ --env JINA_API_KEY="jina_api_key,请从https://jina.ai/reader获取" \ --env PYTHONIOENCODING="utf-8" \ --env GOOGLE_AI_STUDIO_KEY="Google AI Studio api key,请从https://aistudio.google.com/apikey获取"
How to use
This MCP server is a Python-based server powered by uv that runs your mcp-server code (main.py) under the configured directory. It exposes the MCP protocol so clients can discover, query, and exchange model-context data through standardized commands. To run it, you’ll need to provide the required environment variables (such as JINA_API_KEY and GOOGLE_AI_STUDIO_KEY) and point uv to the location of your mcp-server entry script. The provided configuration demonstrates how to launch main.py with uv and how to enable essential environment variables that the server may rely on for embedding or retrieval capabilities. Once running, you can interact with the MCP tooling and, depending on your implementation, use Jina-powered features and Google AI Studio resources via the configured keys.
How to install
Prerequisites:
- Python 3.12 or newer
- uv package manager (installed as described below)
- Access to the internet for installing dependencies
Option A: Install uv and run the MCP server
-
Install uv (if not already installed): macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Ensure Python 3.12+ is installed and available in your PATH.
-
Create or locate your MCP server directory that contains main.py (the entry point for your server).
-
Prepare a configuration block (example): { "mcpServers": { "yiGmMk/mcp-server": { "command": "uv", "args": [ "--directory", "/path/to/your/mcp-server", "run", "main.py" ], "env": { "JINA_API_KEY": "jina_api_key,请从https://jina.ai/reader获取", "GOOGLE_AI_STUDIO_KEY": "Google AI Studio api key,请从https://aistudio.google.com/apikey获取", "PYTHONIOENCODING": "utf-8" }, "disabled": false, "autoApprove": [] } } }
Option B: If you prefer a virtual environment (venv)
- Create a venv in your MCP server directory: python -m venv .venv
- Activate the venv: source .venv/bin/activate # macOS/Linux ..venv\Scripts\activate # Windows
- Install any Python dependencies your main.py requires (via pip).
- Use a similar uv command but without the --directory flag, pointing at the main.py inside the venv environment as shown in the example above, and include the same env vars.
Note: You can integrate this MCP setup with Smithery for one-click installations as described in the README using the npx smithery CLI, which helps automate installation for clients like Claude.
Additional notes
Tips and caveats:
- Ensure you provide valid API keys for JINA and Google AI Studio if your MCP server relies on those services.
- When running inside a Docker container, the MCP server may exit immediately if the entrypoint process terminates; verify the container's lifespan settings and that main.py keeps the event loop alive.
- If you update main.py or the directory structure, restart uv to apply changes.
- The configuration supports both direct path execution (run main.py) and using a venv for isolated dependencies; adapt env vars accordingly.
- If your environment uses a custom Python path, ensure uv can locate the interpreter and the main.py entry point.
- For troubleshooting, check logs emitted by uv and inspect Python exceptions raised by main.py.
- The repo references integration with Smithery for autopublishing tools; you can install via npx -y @smithery/cli install @yiGmMk/mcp-server --client claude.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP