Proof of concept demonstrating MCP with custom host for agentic systems using Google Gemini API
GoMCPTest is a proof-of-concept (POC) project that demonstrates how to implement a Model Context Protocol (MCP) server using a custom-built host. The goal is to enable easy testing and iteration of agentic systems, making it straightforward for developers to create specialized agents tailored to different use cases such as security vulnerability scanning, code review analysis, data processing, and automated documentation generation.
GoMCPTest includes several key features that align with the Model Context Protocol (MCP):
The protocol flow is designed to ensure seamless communication between the AI application (MCP client) and the server (MCP host). Here’s a breakdown of the typical interaction:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram showcases the flow from the AI application initiating a request via an MCP client, through to the protocol handling the interaction with the server and any associated data resources.
GoMCPTest's architecture is modular and composed of several key components:
openaiserver: Implements a custom host that mimics the OpenAI API, using Google Gemini for advanced natural language processing.tools):
Bash: Execute bash commandsEdit: Edit file contentsGlobTool: Find files matching glob patternsGrepTool: Search file contents with regular expressionsLS: List directory contentsReplace: Replace entire file contentsView: View file contentsThese components work together to provide a fully functional MCP server, enabling various AI agents and tools.
To get started with GoMCPTest:
Prerequisites:
github.com/mark3labs/mcp-go are required.Bash Installation:
make all # or individual tool installation
Environment Configuration:
Read the .envrc file in the bin directory to set up the necessary environment variables:
export GCP_PROJECT=your-project-id
export GCP_REGION=your-region
export GEMINI_MODELS=gemini-2.0-flash
export IMAGEN_MODELS=imagen-3.0-generate-002
export IMAGE_DIR=/tmp/images
Running the Server:
Navigate to the host/openaiserver directory.
Set environment variables as required.
Run the server with:
go run .
With GoMCPTest, developers can leverage a variety of AI applications by integrating them into workflows. Here are some examples:
dispatch_agent could be specialized to scan codebases using custom scripts or tools integrated through the GoMCPTest API.GoMCPTest is designed to be compatible with several popular MCP clients:
| MCP Client | Resources | Tools | Prompts | Status |
|---|---|---|---|---|
| Claude Desktop | ✅ | ✅ | ✅ | Full Support |
| Continue | ✅ | ✅ | ✅ | Full Support |
| Cursor | ❌ | ✅ | ❌ | Tools Only |
This matrix indicates that while other clients support tools, full compatibility with resources (like custom databases or storage systems) is not yet available.
Here’s a sample configuration snippet demonstrating how to set up an MCP server:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This JSON snippet configures the server settings, including the command to run and environment variables.
To ensure robust security and performance:
GCP_PROJECT, GEMINI_MODELS, IMAGEN_MODELS, and other required parameters.API_KEY for different MCP clients.Contributions are welcome and can be made by:
GoMCPTest is part of a larger MCP ecosystem that includes various tools and clients designed for different use cases:
By leveraging GoMCPTest, developers can accelerate the development of advanced AI applications and integrate them into a wide range of workflows with enhanced efficiency and functionality.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration