troubleshooting

troubleshooting is a cursor rule for Cursor from Kenlan2022/mcp_servers_showcase. It costs 0 tokens per session (2,961 once invoked), scanned D, original, MIT.

A troubleshooting ruleset for developing and running Python-based MCP servers, including dependency installation, imports, tests, asynchronous tests, and database tests.

In plain words
What is it for?
Use it when setting up uv, reinstalling Python packages, checking test collection, running pytest, fixing asynchronous test problems, or isolating database-test failures.
Why use it?
It gives practical checks for common development failures, such as a missing uv command, broken dependencies, import errors, or hanging tests.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when setting up uv, reinstalling Python packages, checking test collection, running pytest, fixing asynchronous test problems, or isolating database-test failures.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kenlan2022/mcp_servers_showcase/troubleshooting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Kenlan2022/mcp_servers_showcase

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for troubleshooting

README.md
[![agentmods](https://agentmods.dev/badge/rules/kenlan2022/mcp_servers_showcase/troubleshooting.svg)](https://agentmods.dev/rules/kenlan2022/mcp_servers_showcase/troubleshooting)
Your own site
<a href="https://agentmods.dev/rules/kenlan2022/mcp_servers_showcase/troubleshooting"><img src="https://agentmods.dev/badge/rules/kenlan2022/mcp_servers_showcase/troubleshooting.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,961 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02961
Opus 5 $0.00000 $0.01481
Sonnet 5 $0.00000 $0.00592
Haiku 4.5 $0.00000 $0.00296

Measured 6d ago against content hash 03112ff83c2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade D, and why

troubleshooting scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo systemctl status mcp-servers

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -LsSf https://astral.sh/uv/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -LsSf https://astral.sh/uv/install.sh | sh
.cursor/rules/troubleshooting.mdc · 570 lines

How it starts

The opening of the file, as written. The whole thing — 570 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Server Troubleshooting Guide

Development Issues

UV and Dependencies

Problem: uv command not found

# Solution: Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc

Problem: Package installation fails

# Check UV version
uv --version

# Clear cache and reinstall
uv cache clean
uv pip install --force-reinstall -r requirements.txt

Problem: Import errors during development

# Check Python path
uv run python -c "import sys; print(sys.path)"

# Install in development mode
uv pip install -e .

Testing Issues

Problem: Tests fail with import errors

# Check test environment
uv run python -m pytest --collect-only

# Ensure test dependencies are installed
uv add --dev pytest pytest-asyncio

# Run tests with verbose output
uv run pytest -v --tb=short

Problem: Async tests hang or fail

# Common issue: Missing pytest-asyncio
# Solution: Ensure all async tests use @pytest.mark.asyncio

import pytest

@pytest.mark.asyncio
async def test_async_function():
    # Your async test code here
    pass

Problem: Database tests fail

# Check if test database is properly isolated
uv run pytest tests/test_database.py -v -s

# Use temp database for tests
import tempfile
import pytest

@pytest.fixture
def temp_db():
    with tempfile.NamedTemporaryFile(suffix='.db') as f:
        yield f.name

Code Quality Issues

Problem: Black formatting conflicts

# Fix formatting issues
uv run black . --diff  # Preview changes
uv run black .         # Apply changes

Problem: mypy type checking errors

# Check specific file
uv run mypy servers/file_server/main.py

# Common fixes:
# 1. Add type hints
# 2. Use typing imports
# 3. Add # type: ignore comments for external libs

Problem: Import sorting issues

# Fix import order
uv run isort . --diff  # Preview changes
uv run isort .         # Apply changes

Runtime Issues

Read the full file on GitHub · 570 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 570 lines · 0 tokens per session scan D 03112ff83c2e

Subscribe to this mod's changes

troubleshooting is a cursor rule published in the GitHub repository Kenlan2022/mcp_servers_showcase (0 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,961 tokens. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.