home / mcp / xero identity mcp server
Provides MCP access to the Xero identity API via an OpenAPI-based server for client interactions.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-xero-oauth-2-identity-service-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{...json...}",
"SECURITY": "API_KEYS=REDACTED",
"CONFIG_PATH": "/path/to/mcp_config.json"
}
}
}
}You run an MCP (Model Context Protocol) Server that exposes a stable interface to an OpenAPI-defined service. This server lets clients request context-aware actions and data from the Xero identity API in a consistent, protocol-driven way, enabling robust client-server interactions across different transport modes.
You connect to the MCP server as a client and perform requests through your MCP-enabled tooling. The server supports multiple transport modes, including stdio for local execution, and can be configured to read its settings from environment variables or a JSON configuration file. Use the standard stdio flow to run the server locally during development or testing.
Typical usage patterns include starting the server and then issuing MCP requests from your client or tests. When running in stdio mode, you execute the runtime command and provide any needed configuration through environment variables or a config file. Ensure your client points to the correct transport and uses the MCP endpoints exposed by this server.
Prerequisites you need on your machine before you install and run the server:
Step-by-step commands to set up and run the server locally:
# 1. Install dependencies and activate editable mode for development
pip install -e ".[dev]"
# If you prefer to use uv for running
uv pip install --editable ".[dev]"
# 2. Start the MCP server in stdio mode
python mcp_server/main.py stdio
# 3. (Optional) Prepare configuration via JSON file and environment vars
# Example: CONFIG_PATH=/path/to/mcp_config.json
# Example: CONFIG='{"name":"xero_identity_mcp"}'
# Example: SECURITY='API_KEY=your_key'Configuration details, security considerations, and common notes are provided below to help you run and maintain the MCP server effectively.
Configuration options you will typically use include environment variables to point to a configuration file or to pass a JSON configuration string. The server can read these values at startup to define how it connects to the MCP ecosystem.
Security considerations include keeping API keys and other sensitive values out of source control. Use dedicated environment variables to supply keys and secrets at runtime, and limit access to the running process.
Examples and troubleshooting tips help you resolve common issues quickly, such as ensuring the configuration file path is correct, or verifying that the Python interpreter version matches the required minimum.
Building and publishing guidance is provided if you contribute changes. The project supports a build and publish workflow via the packaging toolchain used for distribution.
Check code quality and formatting using linting rules to catch issues early.
Format code to maintain a consistent style across the codebase.
Run static analysis (type checks, security checks) to identify potential problems.
Execute unit and integration tests to verify functionality and detect regressions.
Pre-commit hooks automate checks before committing changes.
Start and interact with the MCP server in stdio mode for development and testing.