Skip to content

LevKesha/mcp-server

Repository files navigation

mcp-server (Theme 3)

MCP (Model Context Protocol) server exposing Tools, Resources, and Prompts for the AI platform. Agent-api calls this server via an MCP client.

Prerequisites (dependencies for smooth start)

  • RAG service: Running and reachable. Set RAG_SERVICE_URL (e.g. http://rag-service.dev.svc.cluster.local in-cluster, or http://localhost:8000 for local rag-service).
  • AWS: Credentials (IRSA in EKS, or env/instance profile) for ECS/S3/CloudWatch summary tools and resources.
  • Infrastructure: ECR repo mcp-server and IRSA role McpServiceIRSA-dev created by Terraform (Deploy to Dev pipeline). Do not push mcp-server app until that pipeline has completed.

Run locally

pip install -r requirements.txt
export RAG_SERVICE_URL=http://localhost:8000   # or your rag-service URL
export AWS_REGION=eu-central-1
python -m app.main

MCP endpoint: http://localhost:8000/mcp. Use MCP Inspector to test.

Tools

  • rag_query_tool(question, top_k=5) — Query the RAG knowledge base.
  • get_ecs_summary_tool() — ECS clusters summary.
  • get_s3_summary_tool() — S3 buckets summary.

Resources

  • aws://summary/ecs — ECS clusters text.
  • aws://summary/s3 — S3 buckets text.
  • aws://summary/cloudwatch — CloudWatch alarms text.

Prompts

  • ask_kb(question) — Prompt template to ask the knowledge base.

Deploy (EKS)

After Deploy to Dev has finished (ECR + IRSA for mcp-server exist), push to main. The workflow runs tests, builds the image, pushes to ECR, and deploys via Helm into the dev namespace.

If "Configure AWS credentials (OIDC)" fails with Not authorized to perform sts:AssumeRoleWithWebIdentity: the IAM role GitHubOIDCRole must trust this repo. In AWS IAM → Roles → GitHubOIDCRole → Trust relationships, ensure the policy includes repo:LevKesha/mcp-server:* in the token.actions.githubusercontent.com:sub condition (e.g. add it alongside your other repos like repo:LevKesha/infrastructure:*, repo:LevKesha/rag-service:*).

Destroy

The Destroy Dev Infrastructure workflow uninstalls all Helm releases (including mcp-server) and preserves ECR + IRSA per Theme 3 plan.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors