Reusable utility methods for MCP servers
Project description
mcp-methods
Reusable utility methods for MCP servers. Extracts common patterns from MCP server implementations into a shared, pip-installable library.
Install
pip install -e .
Usage
from mcp_methods import git_issue, git_api, grep_files, read_file, ElementCache
# GitHub API
result = git_api("pydata/xarray", "pulls?state=open")
# Fetch issue/PR with smart compaction
cache = ElementCache()
result = git_issue("pydata/xarray", 11124, 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"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcp_methods-0.1.1.tar.gz
(19.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_methods-0.1.1.tar.gz.
File metadata
- Download URL: mcp_methods-0.1.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8e41c0935ab6b6055ea0c13787c9b0acaefe7b02e59ca5f02beb62e9ab163d7
|
|
| MD5 |
3da5ecbb5f3c0b0ad00fe66cb834b27f
|
|
| BLAKE2b-256 |
0b1119eb8f578a750c42473a20978ec4b029e13754ba60968c276ff4a64461e9
|
File details
Details for the file mcp_methods-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_methods-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c7cffda12b29974f5c40c147495dd43b2b284bb892901327c973ffb65a17e3f
|
|
| MD5 |
5c118d12bfddbd25dea3f4e762e5b658
|
|
| BLAKE2b-256 |
09afca7e4ceaff859166dcf55f4e8f39c80a03502683452e52fdf73a4a5efb33
|