### Installing mcp-graphql from source (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This snippet outlines the steps to install `mcp-graphql` directly from its source code repository. It involves cloning the Git repository, navigating into the project directory, and installing the package in editable mode. ```bash git clone https://github.com/your-username/mcp_graphql.git cd mcp_graphql pip install . ``` -------------------------------- ### Installing mcp-graphql using pip (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This command demonstrates how to install the `mcp-graphql` package using the pip package manager. It downloads and installs the library and its dependencies from the Python Package Index (PyPI). ```bash pip install mcp-graphql ``` -------------------------------- ### Serving mcp-graphql as a Python library (Python) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This Python code demonstrates how to integrate and run `mcp-graphql` programmatically as a library. It uses `asyncio` to run the `serve` function, passing the API URL and authentication headers as arguments to start the MCP server. ```python import asyncio from mcp_graphql import serve auth_headers = {"Authorization": "Bearer your-token"} api_url = "https://api.example.com/graphql" asyncio.run(serve(api_url, auth_headers)) ``` -------------------------------- ### Running mcp-graphql with custom headers (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This example demonstrates how to run `mcp-graphql` with custom authentication headers. The `--auth-headers` argument accepts a JSON string containing key-value pairs for additional headers, allowing flexible authentication configurations. ```bash mcp-graphql --api-url="https://api.example.com/graphql" --auth-headers='{"Authorization": "Bearer token", "X-API-Key": "key"}' ``` -------------------------------- ### Running mcp-graphql via pip CLI (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This command shows how to execute `mcp-graphql` from the command line after it has been installed via pip. It requires the GraphQL API URL and can optionally include an authentication token for API access. ```bash mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token" ``` -------------------------------- ### Configuring Claude.app with pip installation for mcp-graphql (JSON) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This JSON configuration illustrates how to integrate `mcp-graphql` into Claude.app when it's installed via pip. It sets the command to `python -m mcp_graphql` along with the required API URL argument for the server. ```json "mcpServers": { "graphql": { "command": "python", "args": ["-m", "mcp_graphql", "--api-url", "https://api.example.com/graphql"] } } ``` -------------------------------- ### Configuring Claude.app with Docker for mcp-graphql (JSON) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This JSON configuration provides the setup for running `mcp-graphql` within Claude.app using a Docker container. It specifies the `docker` command and arguments to run the `mcp/graphql` image, including the GraphQL API URL. ```json "mcpServers": { "graphql": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/graphql", "--api-url", "https://api.example.com/graphql"] } } ``` -------------------------------- ### Setting up development environment with uv (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md These commands outline the steps to set up a development environment for `mcp-graphql` using `uv`. This involves creating a virtual environment and then synchronizing all project dependencies. ```bash uv venv uv sync ``` -------------------------------- ### Running mcp-graphql via uvx CLI (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This command demonstrates how to run the `mcp-graphql` tool as a command-line application using `uvx`. It requires specifying the GraphQL API URL and an optional authentication token for accessing the API. ```bash uvx mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token" ``` -------------------------------- ### Running mcp-graphql via python -m CLI (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This snippet illustrates an alternative way to run `mcp-graphql` as a command-line tool using Python's module execution. This method is useful for ensuring the correct Python environment is used and requires the GraphQL API URL and an optional authentication token. ```bash python -m mcp_graphql --api-url="https://api.example.com/graphql" --auth-token="your-token" ``` -------------------------------- ### Configuring Claude.app with uvx for mcp-graphql (JSON) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This JSON configuration snippet shows how to integrate `mcp-graphql` into Claude.app settings when using `uvx`. It defines a server named 'graphql' that executes `uvx` with specific arguments for the GraphQL API URL. ```json "mcpServers": { "graphql": { "command": "uvx", "args": ["mcp-graphql", "--api-url", "https://api.example.com/graphql"] } } ``` -------------------------------- ### Running lint checks with ruff (Bash) Source: https://github.com/drestrepom/mcp_graphql/blob/main/README.md This command shows how to run linting checks on the `mcp-graphql` project using the `ruff` tool. This process helps maintain code quality, consistency, and identifies potential issues. ```bash ruff check . ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.