- Home
- MCP servers
- MCP AI POC
MCP AI POC
- 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": {
"drewtech-mcp-ai-poc": {
"command": "python",
"args": [
"-m",
"mcp_poc.standalone_server"
],
"env": {
"OPENAI_API_KEY": "YOUR_API_KEY"
}
}
}
}You run an MCP server that provides AI-powered development tools, prompts, and knowledge resources to help you generate, analyze, refactor, debug, and optimize code. This server is designed to integrate with MCP-compatible clients, letting you perform complex coding tasks through structured, context-aware interactions.
How to use
To use the MCP AI POC server with an MCP-compatible client, connect your client to the local Python MCP server instance or to a remote HTTP endpoint if available. You will access tools for code generation, refactoring, debugging, performance optimization, and test creation, as well as prompts for code analysis, documentation generation, and concept explanations. Your workflow typically involves sending a request that describes the coding task or problem, then reviewing the AI-generated code, explanations, and change suggestions. Use the AI capabilities to iterate on your code, run tests, and integrate documentation updates as needed.
How to install
Prerequisites: you need Python and a compatible runtime on your system. The setup process includes creating a virtual environment, installing dependencies, and installing the package in editable mode so you can modify and test the server locally.
# Clone and set up the project
git clone <your-repo-url>
cd mcp-ai-poc
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r dev-requirements.txt # For development and testing
# Install in editable mode
pip install -e .
Additional configuration and run notes
Set the API key required for AI capabilities to access the AI services you use. The server expects this value in the environment, typically through an environment variable named OPENAI_API_KEY.
# Set your OpenAI API key
export OPENAI_API_KEY="your-api-key-here"
Starting the MCP server
Once dependencies are installed and the API key is set, you can start the MCP server using one of the local runtime options shown.
# Start MCP server with the first option
python src/run.py
# Or start using the module entry point
python -m mcp_poc.standalone_server
Running tests (optional)
If you want to verify the server and tools, run the test suite. This helps ensure reliability during development and after changes.
# Run all tests
pytest
# Run with verbose output
pytest -v
# Run a specific test file
pytest src/tests/test_server.py
Available tools
generate_code
Generate production-ready code from specifications using context awareness.
refactor_code
Refactor existing code to improve performance, readability, or maintainability.
debug_code
Analyze and fix code issues with root cause explanations.
optimize_performance
Identify bottlenecks and suggest optimizations with trade-off considerations.
generate_tests
Create comprehensive unit tests tailored to the codebase.
analyze_code
Provide deep analysis focusing on quality, security, and best practices.
generate_documentation
Auto-generate documentation in multiple styles (Google, Sphinx, NumPy).
code_review
Perform thorough code reviews with targeted focus areas.
explain_concept
Explain programming concepts at different skill levels.