MCP Typed Prompts Server

A fork of core mcp python-sdk with changes to enable typed-prompts
  • python

3

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": {
    "wanderingnature-mcp-typed-prompts": {
      "command": "mcp",
      "args": [
        "dev",
        "server.py"
      ]
    }
  }
}

The MCP Python SDK lets you build servers that expose data (Resources), actions (Tools), and interaction templates (Prompts) for large language models. It streamlines connecting to any MCP server, running locally, or deploying to production, while keeping the context and behavior you expose to LLMs consistent and secure.

How to use

You use an MCP server by running it locally or deploying it somewhere you can access from your LLM workflow. From there you connect with an MCP client to list available prompts, read Resources, and call Tools. Your server defines what data and actions are available, and the client can request resources, execute tools, and fetch prompts to guide interactions with the LLM.

How to install

Prerequisites: you need Python installed on your machine. You can also use the MCP CLI tooling for quick server management.

Install the MCP package using one of the following options.

uv add "mcp[cli]"

Alternatively:

pip install mcp

Additional content to help you get started

Run your MCP server in development with the MCP Inspector to test and debug interactions quickly.

mcp dev server.py

You can add dependencies for development and testing as shown here.

## Examples

Echoing tools and resources are useful for learning how MCP exposes functionality. You can create a simple server that exposes a greeting Resource and an additive Tool to verify basic interactions.

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Echo")

@mcp.resource("echo://{message}") def echo_resource(message: str) -> str: return f"Resource echo: {message}"

@mcp.tool() def echo_tool(message: str) -> str: return f"Tool echo: {message}"

## Running Your Server

You can start in development mode, or run directly. The CLI supports several common patterns for starting a server from a script.

mcp dev server.py

python server.py

mcp run server.py

## Security and best practices

Keep sensitive data (APIs, keys, and database URLs) out of your source. Use environment variables and a .env file when possible, and scope access to only what is necessary for development and testing.

## Troubleshooting

If you run into issues connecting to a server, verify that the server process is running, that the expected resources and tools are defined, and that the MCP client is using the same server endpoint you configured.

## Notes

You can replace the examples with your own Resources, Tools, and Prompts to tailor the MCP server to your domain and use case.

## Acknowledgments

This guide describes practical usage for MCP servers built with the Python SDK and does not reference external documentation directly.

## Available tools

### add

Adds two numbers and returns the result. Demonstrates a simple arithmetic Tool exposed by the server.

### calculate\_bmi

Calculates BMI given weight in kilograms and height in meters using a Tool with a straightforward formula.

### fetch\_weather

Fetches current weather for a specified city using an asynchronous Tool.

### echo\_tool

Echoes back the provided message, illustrating a simple Tool that returns a string result.

### query\_data

Executes SQL queries against a database and returns results as text, showing database interaction through a Tool.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational