mcp-go -ak
(BACKEND )An MCP-compatible vector search server built in Go, powered by Pinecone and OpenAI.
claude mcp add --transport stdio akhildas-ts-mcp-go-server-ak go run main.go \ --env PORT="Port the server listens on (default 8081)" \ --env JWT_SECRET="JWT secret for signing tokens" \ --env PINECONE_HOST="Pinecone host URL" \ --env OPENAI_API_KEY="OpenAI API key" \ --env GITHUB_CLIENT_ID="Optional GitHub OAuth client ID" \ --env MCP_SECRET_TOKEN="Optional MCP shared secret for development" \ --env PINECONE_API_KEY="Your Pinecone API key" \ --env PINECONE_INDEX_NAME="Pinecone index name" \ --env GITHUB_CLIENT_SECRET="Optional GitHub OAuth client secret" \ --env PINECONE_ENVIRONMENT="Pinecone environment (e.g., us-west1-gcp)" \ --env GITHUB_OAUTH_REDIRECT_URL="Optional GitHub OAuth redirect URL"
How to use
This MCP server is a Go-based vector search service that integrates Pinecone for vector indexing and OpenAI for text embedding and generation tasks. It exposes endpoints for health checks, performing search queries, indexing documents, and authentication flows. To start the server, ensure you have a valid Go environment and the required API keys in a configured .env file. Once running, you can POST to /index to add documents to the Pinecone index and POST to /search to retrieve similar vectors or responses generated via OpenAI. Authentication endpoints under /auth/* help manage user sessions and JWTs for protected routes.
How to install
Prerequisites:
- Go 1.17+ installed on your system
- Access to Pinecone and OpenAI API keys
- A configured .env file with required variables
Step-by-step installation:
-
Clone the repository: git clone https://github.com/your-org/akhildas-ts-mcp-go-server-ak.git cd akhildas-ts-mcp-go-server-ak
-
Copy the example environment file and configure keys: cp env.example .env nano .env
Edit: PORT, JWT_SECRET, PINECONE_API_KEY, PINECONE_ENVIRONMENT,
PINECONE_INDEX_NAME, PINECONE_HOST, OPENAI_API_KEY, and optional values
-
Install dependencies and run: go mod tidy go run main.go
-
Verify the server is running on the port specified in .env (default 8081). You should be able to access endpoints like http://localhost:8081/health and http://localhost:8081/search.
Additional notes
Tips and notes:
- Never commit your .env file to version control; keep it secure and out of the repository.
- Ensure Pinecone and OpenAI keys are valid and have the required permissions for indexing and querying.
- If you change the port in .env, ensure your clients and any reverse proxies are updated accordingly.
- Optional OAuth settings (GITHUB_CLIENT_ID/SECRET) enable development login flows but are not required for core search/index functionality.
- If you encounter rate limits with OpenAI or Pinecone, review their usage quotas and consider implementing request batching or caching at the client layer.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go