智能构造器
HTTP-SSE标准化AI应用工具访问的MCP服务器
标准化AI应用工具访问的MCP服务器
"We can load anything, from clothing to equipment, weapons, training simulations, anything we need." - The Matrix (1999)
Agent Construct is a Model Context Protocol (MCP) server implementation that standardizes how AI applications access tools and context. Just as the Construct in The Matrix provided operators with instant access to any equipment they needed, Agent Construct provides a standardized interface for AI models to access tools and data through the MCP specification.
Built on the Model Context Protocol specification, it acts as a central hub that manages tool discovery, execution, and context management for AI applications. It provides a robust and scalable way to expose capabilities to AI models through a standardized protocol. It also provides a simplified configuration and tool structure to make adding new capabilities a breeze! An example tool for searching the web with Gemini is included.
Clone the repository:
git clone https://github.com/yourusername/agent-construct.git cd agent-construct
Install dependencies:
pip install -r requirements.txt
Set up environment variables:
Create a .env
file in the root directory with the following variables:
# Server Configuration
SERVER_HOST=localhost
SERVER_PORT=8000
# MCP Protocol Settings
MCP_VERSION=1.0
TOOL_DISCOVERY_ENABLED=true
# Security Settings
ENABLE_AUTH=false # Enable for production
Run the server:
python -m mcp_server
mcp_server/
├── core/ # Core MCP protocol implementation
│ ├── server.py # Main server implementation
│ ├── protocol.py # MCP protocol handlers
│ └── context.py # Context management
├── handlers/ # MCP operation handlers
│ ├── discovery.py # Tool discovery
│ ├── execution.py # Tool execution
│ └── context.py # Context operations
├── utils/ # Utility functions
│ ├── logging.py # Logging configuration
│ ├── security.py # Security utilities
│ └── config.py # Configuration management
└── __main__.py # Server entry point
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.