- Home
- MCP servers
- Test
Test
- python
0
GitHub Stars
python
Language
6 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": {
"tmzmfldkqls-test-mcp": {
"command": "python",
"args": [
"/home/ignakio/project/test-mcp/entrypoint.py"
],
"env": {
"HOST": "0.0.0.0",
"PORT": "8000",
"LOG_LEVEL": "INFO",
"AGENT_NAME": "test-agent",
"OPENAI_MODEL": "gpt-4o-mini",
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
"OPENAI_TEMPERATURE": "0.7"
}
}
}
}This MCP Server lets you run a simple LangGraph-powered agent as a FastMCP server and interact with it using MCP clients. It includes a lightweight AI agent that you can query or greet, and it demonstrates how to register local tools and wire the agent to respond to questions or greetings in a constrained, easy-to-use setup.
How to use
Launch the server locally and connect with an MCP client to start sending queries to the AI agent. The server exposes two practical tools you can invoke from your client: ask_question to ask the agent a question and get_greeting to receive a personalized greeting. You will interact with a single, open-ended agent that uses an LLM-backed workflow to produce a response.
To connect, run the local server and point your MCP client at the corresponding stdio or http endpoint. In this setup, the MCP configuration demonstrates how to register a local Python-based server that the client can spawn and communicate with directly. Use the provided agent name test-agent as the identifier when coordinating with the client.
The two available tools behave as follows: - ask_question accepts a query string and returns the agent’s answer. - get_greeting accepts an optional name and returns a personalized hello message. You can integrate these tools in your client by referencing their function names and ensuring the agent has access to the tool bindings during its LLM invocation.
How to install
Prerequisites: you need Python 3.12 or higher and a compatible runtime for the MCP framework. You will also need an OpenAI API key to enable the LangGraph agent.
# Create and populate the environment
cp .env.example .env
nano .env
# Install the package in editable mode
python -m pip install -e .
# Optional: install and run uv to manage the server
# (recommended for development and quick starts)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
# Run the server directly
python entrypoint.py
# Or run with uv for better process handling
uv run python entrypoint.py
Additional information
Environment variables you may configure include HOST, PORT, AGENT_NAME, OPENAI_API_KEY, OPENAI_MODEL, OPENAI_TEMPERATURE, and LOG_LEVEL. These values control where the server runs, which agent to expose, the OpenAI model to use, generation temperature, and the level of logging detail.
MCP tools are registered and exposed through the server’s tool routing. In this example, the Claude Desktop integration shows how to register a local stdio MCP server named test-agent that executes the Python entrypoint. This is the pattern you would follow to connect any MCP client to your local server.
Troubleshooting and notes
If you encounter issues with the OpenAI API key, verify that .env contains a valid OPENAI_API_KEY and that the key is loaded by the Python process. You can confirm by inspecting logs or printing the value during startup.
If dependency errors occur during installation, reinstall in editable mode to ensure local changes are picked up: pip install -e . --force-reinstall.
For debugging, set LOG_LEVEL=DEBUG and re-run the server to obtain verbose output that helps identify configuration or runtime problems.
Available tools
ask_question
Query the AI agent with a natural language question and receive a response.
get_greeting
Request a personalized greeting from the agent using an optional name.