PEP MCP Server
Provides tools for searching and retrieving Python Enhancement Proposals (PEPs), including the ability to list active PEPs and fetch document excerpts or full content from the official Python PEP index.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PEP MCP ServerSearch for PEPs related to type hinting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PEP MCP Server
MCP server that exposes on-demand Python PEP lookup tools backed by the live PEP index.
Features
list_peps: list only active PEPssearch_peps: search active PEP titlesget_pep: fetch a PEP document by number, optionally returning focused excerpts for a query
Related MCP server: PyPI Package MCP Server
Data Sources
PEP index JSON:
https://peps.python.org/api/peps.jsonPEP content:
https://raw.githubusercontent.com/python/peps/main/peps/pep-XXXX.rstFallback:
https://github.com/python/peps/blob/main/peps/pep-XXXX.rst?plain=1
Setup
python -m venv .venv
.venv/bin/pip install -e ".[dev]"Run
.venv/bin/pep-mcp-serveror:
.venv/bin/python -m pep_mcp_serverDocker
Build and tag:
docker build -t pep-mcp-server:latest .MCP uses stdio, so the container must keep stdin open (-i). Example:
docker run --rm -i pep-mcp-server:latestCursor MCP (Docker)
You do not put PEP or GitHub URLs in mcp.json. Cursor only needs the command that runs the server; listing and fetching PEPs happens inside the process when tools run.
Use -i (required for stdio). Optional -e lines silence the startup banner and pin transport:
{
"mcpServers": {
"pep": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"FASTMCP_TRANSPORT=stdio",
"-e",
"FASTMCP_SHOW_SERVER_BANNER=false",
"pep-mcp-server:latest"
]
}
}
}If the image is not on this machine yet, build it once from the project directory (see above).
If the MCP log shows Found 0 tools but listOfferingsForUI / Not connected warnings, that is often a Cursor UI race or a separate UI listing path; try reloading the window or invoking a tool from chat. The server still exposes three tools over stdio (verified with the MCP Python client).
Tool Contracts
list_peps() -> list[dict]
Returns active PEPs with:
numbertitletypetopiccreatedurl
(status is omitted; every row is active.)
search_peps(query: str) -> list[dict]
Case-insensitive substring search on active PEP titles.
get_pep(pep, query=None, max_full_content_chars=None) -> dict
Accepts
8,0008, orpep-0008.Returns metadata and:
contentwhenqueryis not provided (capped by default for token efficiency)excerptwhenqueryis provided and matchescontentfallback whenqueryhas no matches (also capped by default)
Optional
max_full_content_chars: omit orNonefor the default cap; use0for the full document (can be very large).
Tests
.venv/bin/pytest -qAvailable Tools
3 toolsget_pepA
Get a PEP by number. Use query for excerpts; full body is capped by default.
Pass max_full_content_chars=0 for an uncapped full document (can be very large).
| Name | Required | Description | Default |
|---|---|---|---|
| pep | Yes | ||
| query | No | ||
| max_full_content_chars | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Discloses critical behavioral traits: full body is capped by default, setting max_full_content_chars=0 removes the cap, and uncapped documents 'can be very large.' Does not mention rate limits or auth requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with zero waste. Front-loaded with core purpose ('Get a PEP by number'), followed by usage guidance for specific parameters. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description appropriately omits return value details. With 0% schema coverage, it compensates by explaining parameter semantics. Could strengthen by explicitly contrasting with list_peps for enumeration use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, requiring description to compensate. Successfully adds meaning for all three parameters: 'pep' is referenced as 'by number,' 'query' is for 'excerpts,' and 'max_full_content_chars' controls capping behavior with explicit warning about large document sizes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States specific verb ('Get') + resource ('PEP') + identifier method ('by number'). The mention of using 'query for excerpts' effectively distinguishes this retrieval tool from the sibling search_peps and list_peps tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear guidance on when to use the 'query' parameter (for excerpts) versus full retrieval, and explains the 'max_full_content_chars' parameter behavior. Lacks explicit guidance on when to prefer search_peps over this tool for search scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pepsA
List active Python PEPs with compact metadata.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses behavioral traits by specifying 'active' PEPs only and 'compact metadata' output format, but fails to state safety properties (read-only, non-destructive) or pagination behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with verb, no redundant words. Appropriate length for a zero-parameter listing tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (which handles return value documentation) and zero input parameters, the description is sufficiently complete. Mentions 'compact metadata' to set expectations, though could note pagination if applicable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema contains zero parameters. Per evaluation rules, zero-parameter tools receive a baseline score of 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States specific verb ('List'), resource ('Python PEPs'), and scope ('active', 'compact metadata'). The 'compact metadata' phrase helps distinguish from sibling get_pep which likely returns full details, though explicit differentiation from search_peps is missing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides no guidance on when to select this tool versus siblings (get_pep for individual retrieval, search_peps for filtered queries). No mention of prerequisites or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pepsB
Search active PEP titles for a query string.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'active' PEPs and 'titles' as scope filters, but fails to explain matching logic (partial vs exact), case sensitivity, or what 'active' specifically means. The existence of an output schema reduces some burden, but safety/permission hints are absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with the action front-loaded. There is no redundant or wasted text; every word contributes to understanding the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (single string parameter) and the presence of an output schema, the description is minimally adequate. However, the lack of annotations (safety hints) and zero schema descriptions leaves gaps that the description does not fully fill, preventing a higher score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, requiring the description to compensate. It references a 'query string' which maps to the 'query' parameter and implies its purpose (searching titles), providing basic semantic context. However, it lacks format details, examples, or constraints that would fully compensate for the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (Search), resource (active PEP titles), and scope limitation (titles only, active status). It implicitly distinguishes from sibling 'get_pep' (retrieval by ID) and 'list_peps' (enumeration) by specifying a text search function, though it doesn't explicitly name the alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when searching for PEPs by title text), but provides no explicit guidance on when to prefer 'get_pep' or 'list_peps' instead, nor does it mention prerequisites or limitations that would help an agent select correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The three tools have clearly distinct purposes: 'get' retrieves a specific PEP by number, 'list' enumerates all active PEPs, and 'search' finds PEPs by title query. No functional overlap exists between them.
All tools follow a consistent snake_case verb_noun pattern (get_pep, list_peps, search_peps). The pluralization appropriately matches the return cardinality (singular for single retrieval, plural for collection operations).
Three tools is the ideal minimum for a read-only document server, covering the essential access patterns: enumeration, search, and specific retrieval. The scope is tightly focused without bloat.
While the basic read operations are present, notable gaps exist: list_peps and search_peps are restricted to 'active' PEPs only with no way to access other statuses, search_peps only searches titles (not content or authors), and there are no filtering options for metadata like author or Python version.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
Real-time Python package and vulnerability data for AI coding agents.
Provides tools for searching Google Workspace documentation and much more.
Get up-to-date, version-specific documentation and code examples from official sources directly in…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables beginner-friendly Python and Pybricks development support through RAG-powered tools that search official documentation, suggest code snippets, and provide version-aware guidance for LEGO robotics programming.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to fetch, explore, and analyze source code from any Python package on PyPI, including listing files, reading specific code, and searching packages across all published versions.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search PyPI packages and retrieve detailed metadata, version history, and download statistics. It provides a standardized interface for interacting with the Python Package Index through the Model Context Protocol.2
- FlicenseAqualityDmaintenanceProvides Large Language Models with real-time access to the latest documentation for Python libraries like Langchain, LlamaIndex, and OpenAI, enabling accurate and up-to-date code suggestions.1
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ribbit-br/mcp-pep-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server