Prerequisites
Before you begin, make sure you have:- Python 3.12+ — check with
python --version - uv — the package manager used for this project. Install it from docs.astral.sh/uv
- A GroupMe access token — see Authentication for how to get one
Local setup
1
Clone the repository
2
Install dev dependencies
3
Install pre-commit hooks
4
Set your GroupMe token
5
Run the server
Running tests
Tests usepytest-httpx to mock HTTP requests and pytest-asyncio with asyncio_mode = "auto" so async test functions run without needing @pytest.mark.asyncio.
Test files set
GROUPME_TOKEN in the environment using
os.environ.setdefault before importing client. Make sure this is present
in any new test file you create.HTTPXMock to intercept outgoing httpx requests at the transport level. No real GroupMe API calls are made during the test suite.
Lint and format
The project uses ruff for linting and formatting, and bandit for security checks. Both run as pre-commit hooks. To run all checks manually against every file:ruff --fix— lint and auto-fixruff-format— format codebandit -c pyproject.toml— security scan (excludestests/)
Adding a new tool
1
Add the client method
Add an
async method to GroupMeClient in src/groupme_mcp/client.py. Use the existing _get, _post, or _delete helpers to make the request — they inject the token automatically.2
Add the MCP tool
Add a
@mcp.tool() function in src/groupme_mcp/server.py that delegates to the client method. Include a docstring with an Args: block — FastMCP uses it to generate the tool’s schema.3
Add tests
Add an HTTP-level test in
tests/test_client.py that uses HTTPXMock to mock the GroupMe API response, and a tool-level test in tests/test_server.py that calls the tool function directly.