Skip to main content

A Model Context Protocol server to query Live 11 API documentation

Project description

Live 11 API Fetch MCP Server

A Model Context Protocol server designed to query an API, specifically tailored for (or defaulting to) the Live 11 API documentation. This server enables LLMs to retrieve structured information from a designated API endpoint using a query text and a parameter for the number of results (top_k).

Available Tools

  • query_service - Queries a specific API with the given text and top_k parameter.
    • query_text (string, required): The query text to send to the API.
    • top_k (integer, optional): The number of top results to return (default: 3).
    • api_url (string, optional): Optional custom API URL to use for this specific request. This overrides any server-level default API URL.

Installation

Using uv (recommended)

When using uv, you can use uvx to directly run live11-api-fetch without explicit installation in your project's virtual environment:

# Example: Run with a custom API URL
uvx live11-api-fetch --custom-api-url https://your-api.example.com/query

Using PIP

Alternatively, you can install live11-api-fetch via pip:

pip install live11-api-fetch

After installation, you can run it as a script using:

# Example: Run with default API URL (if configured in server.py)
python -m live11_api_fetch

# Example: Run with a custom API URL and proxy
python -m live11_api_fetch --custom-api-url https://your-api.example.com/query --proxy-url http://your-proxy.example.com:8080

Or simply by its installed script name:

live11-api-fetch --custom-api-url https://your-api.example.com/query

Configuration

API URL Configuration

The API endpoint queried by this server can be configured in three ways, in order of precedence:

  1. Tool Parameter (api_url): Provide the api_url directly in the parameters when calling the query_service tool. This offers per-request flexibility.
  2. Command-Line Argument (--custom-api-url): Specify a default API URL for the server instance when starting it:
    live11-api-fetch --custom-api-url https://your-api.example.com/query
    
  3. Hardcoded Default (in server.py): Modify the DEFAULT_CLOUD_RUN_SERVICE_URL variable within the src/live11_api_fetch/server.py file of the package. This is generally for developers of the package or if you have a fixed deployment.
    # In src/live11_api_fetch/server.py
    DEFAULT_CLOUD_RUN_SERVICE_URL = "YOUR_ACTUAL_LIVE_11_API_OR_SIMILAR_URL_HERE"
    
    Important: If you are using the default, ensure YOUR_CLOUD_RUN_SERVICE_URL_HERE is replaced with the actual, valid URL.

Proxy Configuration

The server can be configured to use a proxy for its outgoing API requests by using the --proxy-url command-line argument:

live11-api-fetch --proxy-url http://your-proxy.example.com:8080

Configure for Claude.app

Add to your Claude settings. Replace live11-api-fetch-service with your desired service name in Claude.

Using uvx
{
  "mcpServers": {
    "live11-api-fetch-service": {
      "command": "uvx",
      "args": ["live11-api-fetch", "--custom-api-url", "https://your-default-api.example.com/query"]
    }
  }
}
Using pip installation
{
  "mcpServers": {
    "live11-api-fetch-service": {
      "command": "live11-api-fetch", // or "python" with args ["-m", "live11_api_fetch"]
      "args": ["--custom-api-url", "https://your-default-api.example.com/query"]
    }
  }
}

Configure for VS Code

For quick installation, you can generate a configuration using the MCP extension's capabilities or manually add the following JSON block to your User Settings (JSON) or .vscode/mcp.json.

Replace live11-api-fetch-service with your desired service name.

Using uvx
{
  "mcp": {
    "servers": {
      "live11-api-fetch-service": {
        "command": "uvx",
        "args": ["live11-api-fetch", "--custom-api-url", "https://your-default-api.example.com/query"]
      }
    }
  }
}
Using pip installation
{
  "mcp": {
    "servers": {
      "live11-api-fetch-service": {
        "command": "live11-api-fetch", // or "python" with args ["-m", "live11_api_fetch"]
        "args": ["--custom-api-url", "https://your-default-api.example.com/query"]
      }
    }
  }
}

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx live11-api-fetch

Or if you've installed the package using pip:

npx @modelcontextprotocol/inspector live11-api-fetch

If you are developing locally:

# Assuming you are in the root of the project directory
npx @modelcontextprotocol/inspector python src/live11_api_fetch # or python -m live11_api_fetch

Contributing

Contributions are welcome! Please feel free to submit pull requests for bug fixes, new features, or improvements to documentation.

For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers

License

live11-api-fetch is licensed under the MIT License. See the LICENSE file in the project repository for more details.

Project details


Download files

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

Source Distribution

live11_api_fetch-0.2.0.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

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

live11_api_fetch-0.2.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file live11_api_fetch-0.2.0.tar.gz.

File metadata

  • Download URL: live11_api_fetch-0.2.0.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for live11_api_fetch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d71359cff3749d7d700a37991c2727fde6a1c1be261f9edbc27663bbfd3a8c9
MD5 a8942453ff8593b7499f3e85d9918263
BLAKE2b-256 3f017eb3a2a7825a5596302a4b01d23365ea83899726bf671309307c8b0a616c

See more details on using hashes here.

File details

Details for the file live11_api_fetch-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for live11_api_fetch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac48a66b31a45db84993dde236aa513242d0060440efcb81e4135f9001772666
MD5 99196f9a817480392b5246923d35c1a8
BLAKE2b-256 ba692fd1be368cb3286a6a513b5d36e6aeebcaa7267b8157d40b0a050f043588

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