8000 docs: update README with standard MCP server configuration · loonghao/pypi-query-mcp-server@3cbb43f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3cbb43f

Browse files
committed
docs: update README with standard MCP server configuration
- Add comprehensive configuration examples for Claude Desktop, Cline, Cursor, and Windsurf - Include proper uvx installation and usage instructions - Add environment variables documentation - Include practical usage examples and conversation patterns - Follow standard Python MCP server documentation format - Add pypi-query-mcp-server script entry point for uvx compatibility
1 parent 5766525 commit 3cbb43f

File tree

5 files changed

+141
-13
lines changed

5 files changed

+141
-13
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ target/*
2121
/coverage.xml
2222
/.zip/
2323
.env
24+
dist/
25+
.vscode/
26+
.ruff_cache/
27+
.mypy_cache/
28+
.pytest_cache/
2429

README.md

Lines changed: 135 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PyPI Query MCP Server
22

3+
[![PyPI version](https://img.shields.io/pypi/v/pypi-query-mcp-server.svg)](https://pypi.org/project/pypi-query-mcp-server/)
4+
35
A Model Context Protocol (MCP) server for querying PyPI package information, dependencies, and compatibility checking.
46

57
## Features
@@ -11,31 +13,127 @@ A Model Context Protocol (MCP) server for querying PyPI package information, dep
1113
- ⚡ Fast async operations with caching
1214
- 🛠️ Easy integration with MCP clients
1315

14-
## Quick Start
16+
## Installation
1517

16-
### Installation
18+
### Using uvx (recommended)
1719

1820
```bash
19-
# Install from PyPI (coming soon)
21+
# Run directly with uvx
22+
uvx pypi-query-mcp-server
23+
24+
# Or install and run with specific script
25+
uvx --from pypi-query-mcp-server pypi-query-mcp
26+
```
27+
28+
### Using pip
29+
30+
```bash
31+
# Install from PyPI
2032
pip install pypi-query-mcp-server
2133

22-
# Or install from source
34+
# Run the server
35+
python -m pypi_query_mcp.server
36+
```
37+
38+
### From source
39+
40+
```bash
2341
git clone https://github.com/loonghao/pypi-query-mcp-server.git
2442
cd pypi-query-mcp-server
25-
poetry install
43+
uv sync
44+
uv run pypi-query-mcp
2645
```
2746

28-
### Usage
47+
## Configuration
2948

30-
```bash
31-
# Start the MCP server
32-
pypi-query-mcp
49+
### Claude Desktop
3350

34-
# Or run directly with Python
35-
python -m pypi_query_mcp.server
51+
Add to your Claude Desktop configuration file:
52+
53+
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
54+
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
55+
56+
```json
57+
{
58+
"mcpServers": {
59+
"pypi-query": {
60+
"command": "uvx",
61+
"args": ["--from", "pypi-query-mcp-server", "pypi-query-mcp"],
62+
"env": {
63+
"PYPI_INDEX_URL": "https://pypi.org/simple/",
64+
"CACHE_TTL": "3600"
65+
}
66+
}
67+
}
68+
}
3669
```
3770

38-
### Available MCP Tools
71+
### Cline
72+
73+
Add to your Cline MCP settings (`cline_mcp_settings.json`):
74+
75+
```json
76+
{
77+
"mcpServers": {
78+
"pypi-query": {
79+
"command": "uvx",
80+
"args": ["--from", "pypi-query-mcp-server", "pypi-query-mcp"],
81+
"env": {
82+
"PYPI_INDEX_URL": "https://pypi.org/simple/",
83+
"CACHE_TTL": "3600"
84+
}
85+
}
86+
}
87+
}
88+
```
89+
90+
### Cursor
91+
92+
Add to your Cursor MCP configuration (`.cursor/mcp.json`):
93+
94+
```json
95+
{
96+
"mcpServers": {
97+
"pypi-query": {
98+
"command": "uvx",
99+
"args": ["--from", "pypi-query-mcp-server", "pypi-query-mcp"],
100+
"env": {
101+
"PYPI_INDEX_URL": "https://pypi.org/simple/",
102+
"CACHE_TTL": "3600"
103+
}
104+
}
105+
}
106+
}
107+
```
108+
109+
### Windsurf
110+
111+
Add to your Windsurf MCP configuration (`~/.codeium/windsurf/mcp_config.json`):
112+
113+
```json
114+
{
115+
"mcpServers": {
116+
"pypi-query": {
117+
"command": "uvx",
118+
"args": ["--from", "pypi-query-mcp-server", "pypi-query-mcp"],
119+
"env": {
120+
"PYPI_INDEX_URL": "https://pypi.org/simple/",
121+
"CACHE_TTL": "3600"
122+
}
123+
}
124+
}
125+
}
126+
```
127+
128+
### Environment Variables
129+
130+
- `PYPI_INDEX_URL`: PyPI index URL (default: https://pypi.org/simple/)
131+
- `CACHE_TTL`: Cache time-to-live in seconds (default: 3600)
132+
- `PRIVATE_PYPI_URL`: Private PyPI repository URL (optional)
133+
- `PRIVATE_PYPI_USERNAME`: Private PyPI username (optional)
134+
- `PRIVATE_PYPI_PASSWORD`: Private PyPI password (optional)
135+
136+
## Available MCP Tools
39137

40138
The server provides the following MCP tools:
41139

@@ -45,7 +143,31 @@ The server provides the following MCP tools:
45143
4. **check_package_python_compatibility** - Check Python version compatibility
46144
5. **get_package_compatible_python_versions** - Get all compatible Python versions
47145

48-
### Example Usage with MCP Client
146+
## Usage Examples
147+
148+
Once configured in your MCP client (Claude Desktop, Cline, Cursor, Windsurf), you can ask questions like:
149+
150+
- "What are the dependencies of Django 4.2?"
151+
- "Is FastAPI compatible with Python 3.9?"
152+
- "Show me all versions of requests package"
153+
- "What Python versions does numpy support?"
154+
- "Get detailed information about the pandas package"
155+
156+
### Example Conversations
157+
158+
**User**: "Check if Django 4.2 is compatible with Python 3.9"
159+
160+
**AI Assistant**: I'll check Django 4.2's compatibility with Python 3.9 for you.
161+
162+
*[Uses get_package_info and check_package_python_compatibility tools]*
163+
164+
**User**: "What are the main dependencies of FastAPI?"
165+
166+
**AI Assistant**: Let me get the dependency information for FastAPI.
167+
168+
*[Uses get_package_dependencies tool]*
169+
170+
### Programmatic Usage
49171

50172
```python
51173
# Example: Check if Django is compatible with Python 3.9
496 Bytes
Binary file not shown.
597 Bytes
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pre-commit = "^3.6.0"
4646
nox = "^2024.3.2"
4747

4848
[tool.poetry.scripts]
49+
pypi-query-mcp-server = "pypi_query_mcp.server:main"
4950
pypi-query-mcp = "pypi_query_mcp.server:main"
5051

5152
[tool.ruff]

0 commit co 3085 mments

Comments
 (0)
0