home / mcp / commands mcp server
Runs a local MCP Server that wires Python server.py via UV with Anthropics API access for context-aware interactions.
Configuration
View docs{
"mcpServers": {
"izzanzahrial-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp",
"run",
"server.py"
],
"env": {
"ANTHROPIC_API_KEY": "<your_key_here>"
}
}
}
}You deploy a local MCP Server to run a context-rich own-language model workflow that can be accessed by MCP clients. It uses a Python-based script (server.py) managed through the uv tool, and it requires an Anthropics API key to enable contextual responses. You can test it with an inspector tool before connecting clients.
To operate your MCP Server, first start the server using the container-like workflow provided. The server runs a Python script named server.py via the uv command, which lets you manage dependencies and execution in a virtual environment. After starting, you can connect MCP clients to this local server to perform actions supported by the MCP runtime.
Set up your API key in a local environment file so the server can access the Anthropics API key during runtime. You will place a key value in a file named .env at the server’s root. This keeps sensitive credentials separate from your code.
You can verify the server is reachable and behaving as expected by using the inspector tool. This runs a validation flow against your running server and helps confirm connectivity and basic correctness before you deploy or integrate with clients.
Prerequisites: ensure you have Python available and a shell to run commands. You will also use the uv tool to manage the MCP environment.
uv venv
source .venv/bin/activateInstall MCP dependencies inside the virtual environment using the MCP helper to add the necessary packages.
uv add mcp httpx arxivPrepare the server start command, pointing to your actual project path. You will run the server from the parent folder containing the mcp directory.
uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp run server.pyCreate an environment file to store your API key securely.
touch .envAdd your Anthropics API key to the environment file.
ANTHROPIC_API_KEY=<your_key_here>Test the MCP Server setup using the inspector tool to confirm the server is responding as expected.
npx @modelcontextprotocol/inspector uv run server.pyIf you plan to deploy or share this setup, keep the API key secure and avoid committing .env files to version control. Use environment management practices appropriate for your deployment target.
Inspector tool to validate MCP Server readiness by initiating a test run against the active server and reporting back results.