- Home
- MCP servers
- PyMCP Server
PyMCP Server
- python
8
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"anirbanbasu-pymcp": {
"command": "uv",
"args": [
"run",
"pymcp"
],
"env": {
"FASTMCP_HOST": "localhost",
"FASTMCP_PORT": "8000",
"PYMCP_LOG_LEVEL": "INFO",
"RESPONSE_CACHE_TTL": "30",
"MCP_SERVER_TRANSPORT": "stdio",
"ASGI_CORS_ALLOWED_ORIGINS": "[\"*\"]"
}
}
}
}You can run a Python-based MCP server template that leverages FastMCP to expose a set of ready-to-use tools. This server is designed to be extended and used as a starting point for building MCP endpoints in Python, with practical tooling you can try out locally and via MCP clients.
How to use
Start the PyMCP server in standalone mode using a standard input/output transport. This is the simplest way to run the server locally and test with an MCP client. You will be able to connect using an MCP client, explore the available tools, and issue requests to generate responses.
To run the server directly, use the following command. It starts the MCP server on the local machine and exposes it via the stdio transport.
uv run pymcp
Connecting with an MCP client
Connect using an MCP client that supports FastMCP. Choose the stdio transport to connect directly from your development environment or use a client that can target a local stdio endpoint. This approach is ideal for quick experiments and debugging.
If your client supports the MCP Inspector workflow, you can pair the local server with the inspector to explore tools and responses in a UI. Use the standard local URL and authentication token provided after starting the server.
How to install
Prerequisites you need before installing and running the server:
- Python 3.12 (or a compatible Python 3.12.x runtime)
- Just (a task runner)
- UV for running the server (uv)
Install the required tools and dependencies in your working directory, then install the project dependencies with a minimal setup.
just install
Run locally after install
After installation, start the server using the standard command shown here. This launches the MCP server and makes it available for MCP clients on the local machine.
uv run pymcp
Available tools
greet
Greets the caller with a Hello World message and optionally a name, returning a UTC time-stamped greeting.
generate_password
Generates a random password of a specified length with optional special characters and complexity guarantees.
text_web_search
Performs a web search using the DDGS service and returns a list of results with optional region, max results, and pages.
permutations
Calculates the number of ordered selections (nPk) from a set of n items.
pirate_summarise
Summarises input text in pirate style using client-side sampling.
vonmises_random
Generates a random number from the von Mises distribution using client elicitation for kappa.
resource_logo
Retrieves the Base64 encoded PyMCP logo along with its SHA3-512 hash.
resource_logo_svg
Retrieves the SVG logo for PyMCP.
resource_unicode_modulo10
Computes modulus-10 of a number and returns a Unicode character representing odd/even parity.
code_prompt
Generates a coding task prompt for Python based on a given description.