Metadata-Version: 2.4
Name: mcp-methods
Version: 0.2.3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Dist: requests>=2.28.0
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=4.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: mypy>=1.0 ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: Reusable utility methods for MCP servers
Keywords: mcp,ai,agent,github,tools
Author: Kristian Kollsgard
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/kkollsga/mcp-methods
Project-URL: Issues, https://github.com/kkollsga/mcp-methods/issues
Project-URL: Repository, https://github.com/kkollsga/mcp-methods

# mcp-methods

Reusable utility methods for MCP servers. Extracts common patterns from MCP server implementations into a shared, pip-installable library.

## Install

```bash
pip install -e .
```

## Usage

```python
from mcp_methods import git_issue, git_api, grep_files, read_file, ElementCache

# GitHub API
result = git_api("numpy/numpy", "pulls?state=open")

# Fetch issue/PR with smart compaction
cache = ElementCache()
result = git_issue("numpy/numpy", 28601, cache=cache)

# Search files
result = grep_files(["/path/to/source"], "pattern", glob="*.py")

# Read file with path traversal protection
result = read_file("src/main.py", ["/path/to/source"])
```

