- Home
- MCP servers
- TPU API
TPU API
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-cloud-tpu-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "A JSON string containing the configuration.",
"SECURITY": "Environment variables for security parameters (e.g., API keys).",
"CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
}
}
}
}You run an MCP Server that exposes the given OpenAPI specification as a programmable endpoint, enabling clients to interact with the TPU API through MCP-compatible tooling. This server adapts the OpenAPI surface into MCP transport modes and environment-driven configuration for development and testing workflows.
How to use
Start the MCP server in stdio mode to communicate with client processes directly through standard input and output. Use the server to run MCP-enabled clients against the TPU API surface and leverage the built-in configuration options to tailor security, paths, and startup behavior.
How to install
Prerequisites include Python 3.9 or newer, and the tools pip and uv for development and running the server.
# Prerequisites
python3 --version
pip --version
uv --version
# Installation steps
git clone <repository-url>
cd mcp-server
pip install -e ".[dev]"
# Alternatively, using uv to install editable dev dependencies
uv pip install --editable ".[dev]"
Running the server
You can start the MCP server in stdio mode using the following command. This mode enables interactive input/output with MCP clients through standard I/O streams.
python mcp_server/main.py stdio
Configuration and environment
Configure the server using environment variables to adapt behavior without changing code. The following variables are commonly used to control startup and policy.
CONFIG_PATH=path/to/mcp_config.json
CONFIG='{"transport":"stdio","name":"tp_api_mcp"}'
SECURITY=API_KEYS=your_api_keys
Development tools and quality checks
This project uses linting, static type checking, and tests to maintain code quality. Run these utilities to ensure your changes stay clean and correct.
ruff check
ruff format
./scripts/static-analysis.sh
./scripts/test.sh
./scripts/test-cov.sh
pre-commit install
Building and publishing
When you are ready to build or publish, use the project’s build and publish tooling to prepare distribution artifacts.
hatch build
hatch publish