{"id":82594,"date":"2026-09-09T12:04:13","date_gmt":"2026-09-09T06:34:13","guid":{"rendered":"https:\/\/tothenewone.online\/blog\/?p=82594"},"modified":"2026-10-27T23:26:44","modified_gmt":"2026-10-27T17:56:44","slug":"query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system","status":"publish","type":"post","link":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/","title":{"rendered":"Query Your Logs with AI: Building an MCP Powered ES Log Search System"},"content":{"rendered":"<h2>Introduction<\/h2>\n<div class=\"mceTemp\">\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-13-13-33.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-82670\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-13-13-33.png\" alt=\"Architecture\" width=\"490\" height=\"348\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-13-13-33.png 490w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-13-13-33-300x213.png 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/a><\/p>\n<p>If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you.<\/p>\n<p>I built a small project on a single AWS server where I could just type &#8220;show me the last 502 errors&#8221; in plain English, and get a real answer pulled straight from Elasticsearch. No query language, no dashboard clicking around. Here is what I used, why I used it, and how I set the whole thing up.<\/p>\n<p><strong>First, what is MCP?<\/strong><\/p>\n<p>MCP stands for Model Context Protocol. Anthropic (the company behind Claude) built it and made it open, so anyone can use it.<\/p>\n<p>Here&#8217;s the simple way to think about it: an AI model like Claude is smart, but on its own it can&#8217;t reach into your systems and check anything live. It doesn&#8217;t know what&#8217;s in your Elasticsearch, your database, or your CloudWatch dashboard. MCP is the bridge that lets it reach out and actually check.<\/p>\n<p><strong>What is Elasticsearch doing here?<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-82599 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06.png\" alt=\"this image is used to show current status of ES\" width=\"1010\" height=\"438\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06.png 1010w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06-300x130.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06-768x333.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-28-06-624x271.png 624w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Elasticsearch is just where the logs live\u00a0 \u00a0a search engine built to hold huge amounts of log data and let you filter through it fast. In production, it&#8217;s usually paired with Fluentd or Fluent Bit (which ship logs from your apps into it) and Kibana (a dashboard to view them)\u00a0 that combo is called EFK.<\/p>\n<p>For this POC, I skipped real log collection and just wrote a small script to generate fake entries\u00a0 random status codes, random service names, enough to search through.<\/p>\n<p>MCP tools are just normal Python functions, exposed so an AI model can call them when needed. So instead of building a chatbot from scratch to understand &#8220;show me errors,&#8221; I wrote one function that does that job, and let MCP make it available to Claude.<\/p>\n<p><strong>What does the Python code actually do?<\/strong><br \/>\nThere are two small Python scripts in this whole setup, and neither is complicated.<\/p>\n<p><strong>Script 1 \u2014<\/strong> the log generator. This one just creates fake log entries and pushes them into Elasticsearch, one by one. Each entry has a timestamp, a status code, a service name, and a message. Nothing fancy, just enough to make the data feel real.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p><strong>Script 2 \u2014<\/strong> the MCP server. This is the actual bridge I mentioned earlier. It&#8217;s a Python file that defines a handful of functions, each doing one specific job:<\/p>\n<ul>\n<li>one function searches logs by status code (so you can ask &#8220;show me 502s&#8221;)<\/li>\n<li>one counts how many logs match a status code<\/li>\n<li>one searches logs by service name<\/li>\n<li>one groups up all the errors by which service they came from<\/li>\n<\/ul>\n<p>Each function talks to Elasticsearch using a normal HTTP request, gets the result back as JSON, and turns it into a plain readable string. That&#8217;s it. The only &#8220;magic&#8221; part is one line at the top of each function\u00a0 a small decorator, @mcp.tool()\u00a0 that tells MCP &#8220;hey, this function is something an AI model is allowed to call.&#8221;<\/p>\n<blockquote>\n<div id=\"attachment_82657\" style=\"width: 1118px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82657\" class=\"size-full wp-image-82657\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12.png\" alt=\"Mcp server\" width=\"1108\" height=\"571\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12.png 1108w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12-300x155.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12-1024x528.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12-768x396.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-47-12-624x322.png 624w\" sizes=\"auto, (max-width: 1108px) 100vw, 1108px\" \/><\/a><p id=\"caption-attachment-82657\" class=\"wp-caption-text\">Mcp server code<\/p><\/div><\/blockquote>\n<hr \/>\n<hr \/>\n<p><strong>And what does Claude actually do?<\/strong><br \/>\nClaude is the one reading your question and deciding what to do with it.<\/p>\n<p>When you type something like &#8220;how many logs have status 402,&#8221; Claude reads that, looks at the list of tools available to it (the ones from our MCP server), and picks the one that matches\u00a0 in this case, the &#8220;count by status&#8221; function. It runs that function, gets the number back, and replies to you in a normal sentence instead of just spitting out raw numbers.<\/p>\n<p>So to break down the roles simply:<\/p>\n<p><strong>Elasticsearch<\/strong> \u2014 stores and searches the log data<br \/>\n<strong>Python MCP server<\/strong> \u2014 acts as\u00a0 bridge between claude and Elasticsearch&#8217;s translating tool request into ES queries<br \/>\n<strong>Claude<\/strong> \u2014 reads your question, decides which MCP tool to use, and explains the answer back to you in plain english<br \/>\nNone of these three pieces know how to do the whole job alone. Put together, they let you &#8220;talk&#8221; to your logs.<\/p>\n<p><strong><br \/>\nSetting it all up, step by step<\/strong><\/p>\n<p>Include a more in-depth explanation of the topic.<\/p>\n<p><strong>1.<\/strong> Launched an EC2 instance Used Amazon Linux. First tried the smallest, cheapest option (t3.micro), but it didn&#8217;t have enough memory to even install Elasticsearch \u2014 the install process got killed halfway. Moved up to a slightly bigger instance (c7i-flex.large, 4GB RAM) and that fixed it.<\/p>\n<p><strong>2.<\/strong> Installed Elasticsearch on the same server Added Elastic&#8217;s official package repo and installed it with a single command. It came with security turned on by default, so I had to set a password for it before I could run any real queries.<\/p>\n<blockquote><p><em>sudo rpm &#8211;import https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<\/em><\/p>\n<p><em>sudo tee \/etc\/yum.repos.d\/elasticsearch.repo &lt;&lt; &#8216;EOF&#8217;<\/em><br \/>\n<em>[elasticsearch]<\/em><br \/>\n<em>name=Elasticsearch repository for 8.x packages<\/em><br \/>\n<em>baseurl=https:\/\/artifacts.elastic.co\/packages\/8.x\/yum<\/em><br \/>\n<em>gpgcheck=1<\/em><br \/>\n<em>gpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<\/em><br \/>\n<em>enabled=1<\/em><br \/>\n<em>EOF<\/em><\/p>\n<p><em>sudo dnf install -y elasticsearch<\/em><br \/>\n<em>sudo systemctl start elasticsearch<\/em><br \/>\n<em>sudo systemctl enable elasticsearch<\/em><\/p>\n<p><em>\/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic<\/em><\/p><\/blockquote>\n<p><strong>3.<\/strong> Installed a newer Python version The default Python on the server was too old for the MCP library, so I installed Python 3.11 alongside it.<\/p>\n<blockquote><p><em>sudo yum install -y python3.11 python3.11-pip<\/em><\/p><\/blockquote>\n<p><strong>4.<\/strong> Wrote the log generator script This created 500 fake log entries with random status codes and services, and pushed them straight into Elasticsearch.<\/p>\n<blockquote><p><em>cat &gt; ~\/seed_logs.py &lt;&lt; &#8216;EOF&#8217;<\/em><br \/>\n<em>import requests, random, urllib3<\/em><br \/>\n<em>from datetime import datetime, timedelta<\/em><\/p>\n<p><em>urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)<\/em><\/p>\n<p><em>ES = &#8220;https:\/\/localhost:9200&#8221;<\/em><br \/>\n<em>INDEX = &#8220;app-logs&#8221;<\/em><br \/>\n<em>AUTH = (&#8220;elastic&#8221;, &#8220;YOUR_PASSWORD_HERE&#8221;)<\/em><\/p>\n<p><em>statuses = [200, 200, 200, 301, 404, 402, 500, 502, 503]<\/em><br \/>\n<em>services = [&#8220;payment&#8221;, &#8220;auth&#8221;, &#8220;checkout&#8221;, &#8220;inventory&#8221;, &#8220;search&#8221;]<\/em><\/p>\n<p><em>for i in range(500):<\/em><br \/>\n<em>doc = {<\/em><br \/>\n<em>&#8220;@timestamp&#8221;: (datetime.utcnow() &#8211; timedelta(minutes=random.randint(0, 1440))).isoformat(),<\/em><br \/>\n<em>&#8220;status&#8221;: random.choice(statuses),<\/em><br \/>\n<em>&#8220;service&#8221;: random.choice(services),<\/em><br \/>\n<em>&#8220;message&#8221;: f&#8221;Request handled with status {random.choice(statuses)}&#8221;,<\/em><br \/>\n<em>&#8220;level&#8221;: random.choice([&#8220;INFO&#8221;, &#8220;WARN&#8221;, &#8220;ERROR&#8221;]),<\/em><br \/>\n<em>}<\/em><br \/>\n<em>requests.post(f&#8221;{ES}\/{INDEX}\/_doc&#8221;, json=doc, auth=AUTH, verify=False)<\/em><\/p>\n<p><em>print(&#8220;Seeded 500 sample log documents.&#8221;)<\/em><br \/>\n<em>EOF<\/em><\/p>\n<p><em>sudo python3.11 -m pip install requests<\/em><br \/>\n<em>python3.11 ~\/seed_logs.py<br \/>\n<\/em>(Replace YOUR_PASSWORD_HERE with the password from Step 2.)<\/p><\/blockquote>\n<p><strong>5.<\/strong> Installed the MCP library One pip install, and I had everything needed to build the server.<\/p>\n<blockquote><p><em>\u00a0 sudo python3.11 -m pip install &#8220;mcp&lt;2&#8221;<\/em><\/p><\/blockquote>\n<p><strong>6.<\/strong> Wrote the MCP server This is the file with the four tools I mentioned above \u2014 search by status, count by status, search by service, and an error summary.<\/p>\n<blockquote><p><em>cat &gt; ~\/es_mcp_server.py &lt;&lt; &#8216;EOF&#8217;<\/em><br \/>\n<em>from mcp.server.fastmcp import FastMCP<\/em><br \/>\n<em>import requests, urllib3<\/em><\/p>\n<p><em>urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)<\/em><\/p>\n<p><em>mcp = FastMCP(&#8220;es-log-search&#8221;)<\/em><\/p>\n<p><em>ES = &#8220;https:\/\/localhost:9200&#8221;<\/em><br \/>\n<em>INDEX = &#8220;app-logs&#8221;<\/em><br \/>\n<em>AUTH = (&#8220;elastic&#8221;, &#8220;YOUR_PASSWORD_HERE&#8221;)<\/em><\/p>\n<p><em>@mcp.tool()<\/em><br \/>\n<em>def search_by_status(status_code: int, limit: int = 10) -&gt; str:<\/em><br \/>\n<em>&#8220;&#8221;&#8221;Search log entries by HTTP status code (e.g. 404, 500, 502).&#8221;&#8221;&#8221;<\/em><br \/>\n<em>query = {&#8220;size&#8221;: limit, &#8220;sort&#8221;: [{&#8220;@timestamp&#8221;: &#8220;desc&#8221;}], &#8220;query&#8221;: {&#8220;match&#8221;: {&#8220;status&#8221;: status_code}}}<\/em><br \/>\n<em>resp = requests.post(f&#8221;{ES}\/{INDEX}\/_search&#8221;, json=query, auth=AUTH, verify=False).json()<\/em><br \/>\n<em>hits = resp.get(&#8220;hits&#8221;, {}).get(&#8220;hits&#8221;, [])<\/em><br \/>\n<em>if not hits:<\/em><br \/>\n<em>return f&#8221;No logs found with status {status_code}.&#8221;<\/em><br \/>\n<em>return &#8220;n&#8221;.join(f&#8221;- [{h[&#8216;_source&#8217;][&#8216;@timestamp&#8217;]}] {h[&#8216;_source&#8217;][&#8216;service&#8217;]} \u2014 status {h[&#8216;_source&#8217;][&#8216;status&#8217;]}&#8221; for h in hits)<\/em><\/p>\n<p><em>@mcp.tool()<\/em><br \/>\n<em>def count_by_status(status_code: int) -&gt; str:<\/em><br \/>\n<em>&#8220;&#8221;&#8221;Count how many log entries have a given HTTP status code.&#8221;&#8221;&#8221;<\/em><br \/>\n<em>query = {&#8220;query&#8221;: {&#8220;match&#8221;: {&#8220;status&#8221;: status_code}}}<\/em><br \/>\n<em>resp = requests.post(f&#8221;{ES}\/{INDEX}\/_count&#8221;, json=query, auth=AUTH, verify=False).json()<\/em><br \/>\n<em>return f&#8221;Found {resp.get(&#8216;count&#8217;, 0)} logs with status {status_code}.&#8221;<\/em><\/p>\n<p><em>@mcp.tool()<\/em><br \/>\n<em>def search_by_service(service: str, limit: int = 10) -&gt; str:<\/em><br \/>\n<em>&#8220;&#8221;&#8221;Search recent log entries for a specific service (e.g. payment, auth, checkout).&#8221;&#8221;&#8221;<\/em><br \/>\n<em>query = {&#8220;size&#8221;: limit, &#8220;sort&#8221;: [{&#8220;@timestamp&#8221;: &#8220;desc&#8221;}], &#8220;query&#8221;: {&#8220;match&#8221;: {&#8220;service&#8221;: service}}}<\/em><br \/>\n<em>resp = requests.post(f&#8221;{ES}\/{INDEX}\/_search&#8221;, json=query, auth=AUTH, verify=False).json()<\/em><br \/>\n<em>hits = resp.get(&#8220;hits&#8221;, {}).get(&#8220;hits&#8221;, [])<\/em><br \/>\n<em>if not hits:<\/em><br \/>\n<em>return f&#8221;No logs found for service &#8216;{service}&#8217;.&#8221;<\/em><br \/>\n<em>return &#8220;n&#8221;.join(f&#8221;- [{h[&#8216;_source&#8217;][&#8216;@timestamp&#8217;]}] status {h[&#8216;_source&#8217;][&#8216;status&#8217;]} \u2014 {h[&#8216;_source&#8217;][&#8216;message&#8217;]}&#8221; for h in hits)<\/em><\/p>\n<p><em>@mcp.tool()<\/em><br \/>\n<em>def error_summary() -&gt; str:<\/em><br \/>\n<em>&#8220;&#8221;&#8221;Get a summary count of all ERROR level logs grouped by service.&#8221;&#8221;&#8221;<\/em><br \/>\n<em>query = {&#8220;size&#8221;: 0, &#8220;query&#8221;: {&#8220;match&#8221;: {&#8220;level&#8221;: &#8220;ERROR&#8221;}}, &#8220;aggs&#8221;: {&#8220;by_service&#8221;: {&#8220;terms&#8221;: {&#8220;field&#8221;: &#8220;service.keyword&#8221;}}}}<\/em><br \/>\n<em>resp = requests.post(f&#8221;{ES}\/{INDEX}\/_search&#8221;, json=query, auth=AUTH, verify=False).json()<\/em><br \/>\n<em>buckets = resp.get(&#8220;aggregations&#8221;, {}).get(&#8220;by_service&#8221;, {}).get(&#8220;buckets&#8221;, [])<\/em><br \/>\n<em>if not buckets:<\/em><br \/>\n<em>return &#8220;No ERROR logs found.&#8221;<\/em><br \/>\n<em>return &#8220;n&#8221;.join(f&#8221;- {b[&#8216;key&#8217;]}: {b[&#8216;doc_count&#8217;]} errors&#8221; for b in buckets)<\/em><\/p>\n<p><em>if __name__ == &#8220;__main__&#8221;:<\/em><br \/>\n<em>mcp.run(transport=&#8221;stdio&#8221;)<\/em><br \/>\n<em>EOF<\/em><\/p><\/blockquote>\n<p><strong>7.<\/strong> Installed Node.js and Claude Code Claude Code is the tool that actually lets you chat with Claude from your terminal, and it knows how to talk MCP.<\/p>\n<p><em>sudo yum install -y nodejs npm<\/em><br \/>\n<em>npm install -g @anthropic-ai\/claude-code<\/em><\/p>\n<p><strong>8.<\/strong> Logged in and connected the MCP server One command registers the server (claude mcp add), and another (claude mcp list) confirms it&#8217;s connected properly.<\/p>\n<div id=\"attachment_82609\" style=\"width: 1541px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-82609\" class=\"wp-image-82609 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38.png\" alt=\"4. Connected the MCP server\" width=\"1531\" height=\"266\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38.png 1531w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38-300x52.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38-1024x178.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38-768x133.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-11-45-38-624x108.png 624w\" sizes=\"auto, (max-width: 1531px) 100vw, 1531px\" \/><\/a><p id=\"caption-attachment-82609\" class=\"wp-caption-text\">Connected the MCP server<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong>9.<\/strong> Started asking questions Opened Claude Code and just typed things like &#8220;show me logs with status 502&#8221; or &#8220;give me an error summary by service.&#8221; Claude picked the right tool each time and gave back a clean answer.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-82617 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01.png\" alt=\"5.1 Question and relevant output\" width=\"1507\" height=\"724\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01.png 1507w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01-300x144.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01-1024x492.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01-768x369.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-00-01-624x300.png 624w\" sizes=\"auto, (max-width: 1507px) 100vw, 1507px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-82619 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36.png\" alt=\"5.2 Question and relevant Output\" width=\"1508\" height=\"677\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36.png 1508w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36-300x135.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36-1024x460.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36-768x345.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-01-36-624x280.png 624w\" sizes=\"auto, (max-width: 1508px) 100vw, 1508px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-82622 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45.png\" alt=\"5.3 Question and output\" width=\"1479\" height=\"550\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45.png 1479w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45-300x112.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45-1024x381.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45-768x286.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-04-45-624x232.png 624w\" sizes=\"auto, (max-width: 1479px) 100vw, 1479px\" \/><\/a><\/p>\n<hr \/>\n<p><a href=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-82623 size-full\" src=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25.png\" alt=\"5.4 Question and Answer\" width=\"1484\" height=\"478\" srcset=\"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25.png 1484w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25-300x97.png 300w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25-1024x330.png 1024w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25-768x247.png 768w, https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-12-05-25-624x201.png 624w\" sizes=\"auto, (max-width: 1484px) 100vw, 1484px\" \/><\/a><\/p>\n<\/div>\n<hr \/>\n<h2>Conclusion<\/h2>\n<p>MCP isn&#8217;t just useful for logs. Any tool, database, or dashboard you check manually today could be turned into something you simply ask a question and get an answer from.<\/p>\n<p>Give it a try on your own setup. Pick one thing you check often, turn it into a single MCP tool, and see how it feels to just ask instead of look it up.<br \/>\nAll the code, commands, and screenshots from this walkthrough are available in the Google Drive link below\u00a0 \u00a0feel free to access them and try the setup yourself.<br \/>\n<a href=\"https:\/\/drive.google.com\/drive\/folders\/1BJN2fFDIY5ij23CpURB257CIVAUJ57b-?usp=sharing\">Drive link<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &#8220;show me the last 502 errors&#8221; in plain English, and get a real answer pulled straight from Elasticsearch. [&hellip;]<\/p>\n","protected":false},"author":2172,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[5877],"tags":[248,1916,1524,7637,7723],"class_list":["post-82594","post","type-post","status-publish","format-standard","hentry","category-msp","tag-aws","tag-cloud","tag-elasticsearch-2","tag-mcp","tag-sre"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &quot;show me the last 502 errors&quot; in plain English, and get a real answer pulled straight from Elasticsearch.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Shubham Rawat\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &quot;show me the last 502 errors&quot; in plain English, and get a real answer pulled straight from Elasticsearch.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &quot;show me the last 502 errors&quot; in plain English, and get a real answer pulled straight from Elasticsearch.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#article\",\"name\":\"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog\",\"headline\":\"Query Your Logs with AI: Building an MCP Powered ES Log Search System\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shubham-rawat1\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2026\\\/09\\\/Screenshot-from-2026-09-08-13-13-33.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#articleImage\",\"width\":490,\"height\":348,\"caption\":\"Architecture\"},\"datePublished\":\"2026-09-09T12:04:13+05:30\",\"dateModified\":\"2026-10-27T23:26:44+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#webpage\"},\"articleSection\":\"MSP, aws, cloud, elasticsearch, MCP, SRE\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"name\":\"MSP\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"position\":2,\"name\":\"MSP\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#listItem\",\"name\":\"Query Your Logs with AI: Building an MCP Powered ES Log Search System\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#listItem\",\"position\":3,\"name\":\"Query Your Logs with AI: Building an MCP Powered ES Log Search System\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"name\":\"MSP\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shubham-rawat1\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shubham-rawat1\\\/\",\"name\":\"Shubham Rawat\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/7103b883-c495-4b55-a674-580f3ee61a74_Shubham-Rawat-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Shubham Rawat\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/\",\"name\":\"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog\",\"description\":\"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type \\\"show me the last 502 errors\\\" in plain English, and get a real answer pulled straight from Elasticsearch.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shubham-rawat1\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/shubham-rawat1\\\/#author\"},\"datePublished\":\"2026-09-09T12:04:13+05:30\",\"dateModified\":\"2026-10-27T23:26:44+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog","description":"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type \"show me the last 502 errors\" in plain English, and get a real answer pulled straight from Elasticsearch.","canonical_url":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#article","name":"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog","headline":"Query Your Logs with AI: Building an MCP Powered ES Log Search System","author":{"@id":"https:\/\/tothenewone.online\/blog\/author\/shubham-rawat1\/#author"},"publisher":{"@id":"https:\/\/tothenewone.online\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/tothenewone.online\/blog\/wp-ttn-blog\/uploads\/2026\/09\/Screenshot-from-2026-09-08-13-13-33.png","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#articleImage","width":490,"height":348,"caption":"Architecture"},"datePublished":"2026-09-09T12:04:13+05:30","dateModified":"2026-10-27T23:26:44+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#webpage"},"articleSection":"MSP, aws, cloud, elasticsearch, MCP, SRE"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewone.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/msp\/#listItem","name":"MSP"}},{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/msp\/#listItem","position":2,"name":"MSP","item":"https:\/\/tothenewone.online\/blog\/category\/msp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#listItem","name":"Query Your Logs with AI: Building an MCP Powered ES Log Search System"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#listItem","position":3,"name":"Query Your Logs with AI: Building an MCP Powered ES Log Search System","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/msp\/#listItem","name":"MSP"}}]},{"@type":"Organization","@id":"https:\/\/tothenewone.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewone.online\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewone.online\/blog\/author\/shubham-rawat1\/#author","url":"https:\/\/tothenewone.online\/blog\/author\/shubham-rawat1\/","name":"Shubham Rawat","image":{"@type":"ImageObject","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/7103b883-c495-4b55-a674-580f3ee61a74_Shubham-Rawat-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Shubham Rawat"}},{"@type":"WebPage","@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#webpage","url":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/","name":"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog","description":"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type \"show me the last 502 errors\" in plain English, and get a real answer pulled straight from Elasticsearch.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewone.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewone.online\/blog\/author\/shubham-rawat1\/#author"},"creator":{"@id":"https:\/\/tothenewone.online\/blog\/author\/shubham-rawat1\/#author"},"datePublished":"2026-09-09T12:04:13+05:30","dateModified":"2026-10-27T23:26:44+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewone.online\/blog\/#website","url":"https:\/\/tothenewone.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewone.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog","og:description":"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &quot;show me the last 502 errors&quot; in plain English, and get a real answer pulled straight from Elasticsearch.","og:url":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/","og:image":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Query Your Logs with AI: Building an MCP Powered ES Log Search System | TO THE NEW Blog","twitter:description":"Introduction If you have ever spent 20 minutes writing a Kibana query just to find one error, this post is for you. I built a small project on a single AWS server where I could just type &quot;show me the last 502 errors&quot; in plain English, and get a real answer pulled straight from Elasticsearch.","twitter:image":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"82594","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2026-09-08 06:36:07","updated":"2026-10-27 17:56:47","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewone.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewone.online\/blog\/category\/msp\/\" title=\"MSP\">MSP<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tQuery Your Logs with AI: Building an MCP Powered ES Log Search System\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewone.online\/blog"},{"label":"MSP","link":"https:\/\/tothenewone.online\/blog\/category\/msp\/"},{"label":"Query Your Logs with AI: Building an MCP Powered ES Log Search System","link":"https:\/\/tothenewone.online\/blog\/query-your-logs-with-ai-building-an-mcp-powered-es-log-search-system\/"}],"_links":{"self":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/82594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/users\/2172"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/comments?post=82594"}],"version-history":[{"count":34,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/82594\/revisions"}],"predecessor-version":[{"id":83509,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/82594\/revisions\/83509"}],"wp:attachment":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/media?parent=82594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/categories?post=82594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/tags?post=82594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}