Skip to main content

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("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"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mcp_methods-0.2.3-cp313-cp313-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows x86-64

mcp_methods-0.2.3-cp313-cp313-manylinux_2_39_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

mcp_methods-0.2.3-cp313-cp313-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

mcp_methods-0.2.3-cp312-cp312-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.12Windows x86-64

mcp_methods-0.2.3-cp312-cp312-manylinux_2_39_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

mcp_methods-0.2.3-cp312-cp312-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

mcp_methods-0.2.3-cp311-cp311-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.11Windows x86-64

mcp_methods-0.2.3-cp311-cp311-manylinux_2_39_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

mcp_methods-0.2.3-cp311-cp311-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

mcp_methods-0.2.3-cp310-cp310-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10Windows x86-64

mcp_methods-0.2.3-cp310-cp310-manylinux_2_39_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

mcp_methods-0.2.3-cp310-cp310-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file mcp_methods-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0492f581d897276aae429c9f9857269c8ec4a3187817d5c809c47e663d57c14b
MD5 e024f5260c456760b81cb0a3b5813f98
BLAKE2b-256 d58f9678a87343aa3420b1a6828ecb167cc5c4d992be595258f2a07e1126d705

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 95cf059ab057b4a6adee5ce9b51e5aed68ca35324b04ece752f6becfa10133a1
MD5 57789b62eea78284bb64e648d6e818fe
BLAKE2b-256 d0eacad76460780c87bab777fabd73b02e9a2705adb8f35a85e59311ac0d327d

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 abc9a2a5c4472eecee517cc67123192dc9a06118669b68feceedb9dc9ade2aef
MD5 9f9e9dac99206b0bf2f6522ee925ea4e
BLAKE2b-256 88dc7f33c6a5cb00d9de745c2da95cfb967bfdeaaf53b6af526a8785def45c6e

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e8b4155a0fa7a6a5db8c1629eef5149601f59a6e4314a097e729917787311c32
MD5 655e4d6309ac61ee644398f84acd744f
BLAKE2b-256 91b062848e361be3348b27001df4e10510c4f0ce653f080f6a6e9a253a5de575

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e6caffd5ad0558c361cd9c1c7781553981388bdf35e8a0dcc1943cdd933c45bc
MD5 558a0a98bd623f3757fe8e61ba60ac64
BLAKE2b-256 9264e7d5d90f7d01e5836d42d3d247dc7e57d4a584014cd3ee341945197321e6

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14d60d8be85db132b3acb9624d61db56c8501477c144005e91b10acf606bc6de
MD5 059c59728d1f535a7214bafa23374567
BLAKE2b-256 1506982d307347eb34097fc2e3cac0d99bff25d23f6f93263d63a573b61e57c1

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 454ecb752d7adbf4bafd33fa55eecaa55d0b1488e3579c92d6cdfa4775c4e36a
MD5 ed52ca9588ffa8785f6ab3700b1d89b3
BLAKE2b-256 fee15e2d618682a4e30cfc717c1296df5f6a8737e388343df5068691e07acb90

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c2d67c5380b94d53873ce68a0623806771bbc1d1d2c486fd94db4d7c31b9dec3
MD5 1123ec7c7b5dccdd113f9a5295227efe
BLAKE2b-256 ab5d1f6ef1e5a6f35253116d93f6f2fb04766b945dd8850b3586fb1f9023c1ee

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7bd1d21eac01d5b98647540cacd81327c042fb8dfe1812e9086c68def401e0e1
MD5 09b2dca294451448e6ea89481e4b1f7b
BLAKE2b-256 b219ed89e008b9eefb3de0163ec89e791a7e7fc1177b91b24fbcf03b16204d93

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f61bd2caa28788613c0afb9d405a62d328108eade6b6941c24ac73e08da4d7cb
MD5 d82bcc4ed45ab880909576c26369ebb6
BLAKE2b-256 fa882eaceb16c8f1690dd4597b4e02cedd49ffe4db17468786afc056cec3ac3d

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8a38a8440ed4418867b04baf4553ccf04f2cb6cebd264408c4375bcdeb32dd0b
MD5 b5314e18bb29d45bdf9d9240772cbafd
BLAKE2b-256 3c8936cad6edd489b48e250365ccb91891a78f0128c81f4d4116ae8fbcff1ee9

See more details on using hashes here.

File details

Details for the file mcp_methods-0.2.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_methods-0.2.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a99dc622769ef7644a6b9eb1124be9b3243c535ca4537308f8bf8873e3a5ef4e
MD5 a7e21b0558fed365afc66ea499e7d129
BLAKE2b-256 bb96d20453f03428de1321f62e0a3d781bc82e9e98594432c673f842eada78f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page