# How to connect Midpage to Grok Bot

```json
{
  "title": "How to connect Midpage to Grok Bot",
  "toolkit": "Midpage MCP",
  "toolkit_slug": "midpage_mcp",
  "framework": "Grok Bot",
  "framework_slug": "grok-bot",
  "url": "https://composio.dev/toolkits/midpage_mcp/framework/grok-bot",
  "markdown_url": "https://composio.dev/toolkits/midpage_mcp/framework/grok-bot.md",
  "updated_at": "2026-11-12T06:01:05.276Z"
}
```

## Introduction

Grok is xAI's assistant, and its bot builder lets you create a personal agent that holds context, runs skills, and connects to the apps you already use through plugins.
This guide explains how to connect Midpage to a Grok bot using Composio Connect, which handles OAuth, token refresh, and reliability so you do not have to. You add Composio as a plugin, authenticate once, then ask your bot to work with Midpage in plain language.

## Also integrate Midpage MCP with

- [ChatGPT](https://composio.dev/toolkits/midpage_mcp/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/midpage_mcp/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/midpage_mcp/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/midpage_mcp/framework/atomic-agent)

## TL;DR

Composio exposes 1,700+ apps to your Grok bot through a single connection, so you get:
- Connect to 1,700+ apps with on-demand tool loading, so you do not fill your context window with unnecessary tool definitions.
- Use programmatic tool calling through a remote workbench, letting the model write its own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
- Handle large tool responses outside the model context to keep conversations lean.

## Connect Midpage MCP to Grok Bot

### Connecting Midpage to Grok Bot
Once Grok Bot is set up, you connect Midpage entirely from its interface, and the whole flow takes under a minute.
### Set up Grok Bot
Get access. Grok Bot is included with Cursor Ultra, Cursor Premium Teams, and SuperGrok Heavy. Get the desktop app for macOS or Windows from [x.ai/bot](https://x.ai/bot) and sign in. An iPhone companion app is also available, and your bots sync across devices.
Create a bot. Pick a suggested role or define your own, then give it a short name, one primary job, and a short description of how it should work. Focused bots work best, because a clear role gives the bot more useful context over time.
### Connect Midpage
### 1. Add the Composio plugin
Click the button. The Composio listing on x.ai opens and launches Grok Bot for you. If the app does not open on its own, click Add to Grok Bot.
[Add to Grok Bot](https://x.ai/bot/plugin/32661537)
Grok Bot opens the Composio plugin, showing its connector and skills. Click Add.
### 2. Authenticate
Go to the Installed section and click the Composio entry. You'll see its connector and skills listed.
Click Authenticate. You'll be taken to the Composio consent screen. Review the access it requests and click Authorize. Composio handles the OAuth handshake for you, so you never touch API keys or tokens.
### 3. Connect your Midpage account
Back in the chat, ask your bot to connect to Midpage or give it any Midpage task.
For example, ask it to:
- "Search recent Supreme Court opinions for privacy"
- "Summarize key holdings from case docket"
- "Generate Bluebook citations for these cases"
It will prompt you to authenticate and authorize access.
That's it. Composio's tools are now available in your Grok bot, and your Midpage account is ready to use.

## What is Grok Bot?

Grok is xAI's assistant, available as a chat interface and a bot builder for creating personal agents that run skills and connect to external apps.
With Composio Connect, your Grok bot can securely access apps like Midpage through MCP without you sharing account credentials directly with the agent.

## What is the Midpage MCP server, and what's possible with it?

The Midpage MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Midpage account. It provides structured and secure access to US case law, statutes, regulations, constitutions, agency guidance, and federal docket materials, so your agent can search legal authorities, retrieve relevant passages, analyze opinions and laws, examine docket records, and cite supporting material on your behalf.
- Case law research: Have your agent search US case law across federal and state courts to find opinions relevant to a legal question.
- Primary law research: Direct your agent to search federal, state, and DC statutes, regulations, constitutional provisions, and agency guidance.
- Opinion analysis: Let the agent analyze a legal opinion against a specific question and identify relevant reasoning.
- Quotable passage discovery: Instruct your agent to find passages within an opinion using targeted keyword searches.
- Federal docket analysis: Have your agent analyze a federal docket report, examine a selected filing, and answer focused questions using passages from that filing.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `MIDPAGE_MCP_ANALYZE_DOCKET_FILING` | Analyzedocketfiling | Analyze one docket filing selected from analyzeDocketReport and answer a focused question using passages from that filing. Use this when the user needs to understand what a specific filing says. This tool answers from the filing text, not from the docket entry description. INPUT: - caseId: The caseId returned by analyzeDocketReport case.caseId. - entryNumber: The docket entry number returned by analyzeDocketReport relevantEntries[].entryNumber. - attachmentNumber: Optional attachment number returned by analyzeDocketReport relevantEntries[].attachmentNumber. Omit for the main filing on the docket entry. - question: The question to answer about this specific filing. RETURNS: - status: "ok" or a specific resolution/analysis error. - filing: Resolved filing metadata, including entryNumber, optional attachmentNumber, dateFiled, suggestedFileName, and a downloadable Midpage file URL for the filing. - answer: Direct answer based only on the filing text. - supportingPassages: Passages from the filing that support the answer, with passage and relevance. - doesNotAddress: Specific parts of the question that the filing text does not answer. Check this before relying on the answer. CITATION RULES: - When using filing content in an answer, cite the filing with the format below. - Every citation must be a markdown hyperlink to filing.url. - The ECF No. suffix is important and should be included in filing citations. - Use a descriptive filing name, then any real page/pin/paragraph if available, followed by this suffix: ECF No. {filing.entryNumber} ({filing.dateFiled formatted as "Mar. 3, 2020"}). - Example: [Pl.'s Mot. for Summ. J. 5, ECF No. 30 (Mar. 3, 2020)]({filing.url}) - If filing.dateFiled is unavailable, omit the parenthetical date rather than inventing one. - Never use short cites such as "id." or "supra"; repeat the full linked filing citation. DOWNLOAD GUIDELINES: - If the user asks to download or save the filing, use filing.suggestedFileName as the filename. |
| `MIDPAGE_MCP_ANALYZE_DOCKET_REPORT` | Analyzedocketreport | Analyze a federal docket report and answer a docket-level question. Use this for case snapshots, recent activity, procedural posture, service, complaint history, motion history, deadlines, and identifying relevant filings. This tool answers from the docket sheet only; use analyzeDocketFiling when the text of a specific filing is needed. INPUT: - court: Federal court. Prefer Bluebook-style abbreviations such as "N.D. Cal.", "S.D.N.Y.", "D. Del.", "Bankr. D. Del.", "9th Cir.", or "Fed. Cir."; full federal court names are also accepted. - docketNumber: Federal case docket number. Prefer full district/bankruptcy numbers with office or division prefix when known, such as "4:24-cv-04722"; appellate numbers look like "24-1234". - caseName: Optional case caption/name, such as "Musk v. Altman". Include it when available, especially if the docket number is incomplete. - forceFetch: Optional. Set true only when the user explicitly needs the latest official PACER docket instead of available cached or RECAP data. - question: The docket-level question to answer. RETURNS: - status: "ok" or a specific resolution/analysis error. - case: Resolved case metadata, including caseId for analyzeDocketFiling. - docketReport: Docket report metadata, including suggested filename and a downloadable Midpage file URL when one is available. - answer: Direct answer based only on the docket sheet. - relevantEntries: Docket entries or attachments supporting or relevant to the answer. Use case.caseId plus relevantEntries[].entryNumber and optional relevantEntries[].attachmentNumber with analyzeDocketFiling when the filing text is needed. - doesNotAddress: Specific parts of the question that the docket entries do not answer. Check this before relying on the answer. - warnings: Important source or parsing limitations, when present. DOWNLOAD GUIDELINES: - If the user asks to download or save the docket report, use docketReport.suggestedFileName as the filename. |
| `MIDPAGE_MCP_ANALYZE_LAW` | Analyzelaw | Analyze a statute, regulation, constitutional provision, or agency guidance document against a legal question. Returns verified passages with deep links. REQUIRED before citing or quoting any statute or regulation. AUTO-USE: whenever an answer depends on the wording, requirements, exceptions, scope, procedures, or current status of a primary-law provision. Never answer from memory or web snippets instead. LINK RULE: every statute/regulation citation or subsection relied on in the final answer must be a Markdown link: a passage-specific proposition or quote to its deeplinkUrl, a general reference to url. Never invent path segments. LOOKUP: exactly ONE of citation, path, registerCitation, or id, plus question. Subsection pinpoints ("18 U.S.C. § 924(c)(1)(C)") and popular names ("First Step Act of 2018") are not citation keys: searchLaws with the user's wording, then analyze the chosen result by id, keeping the pinpoint in question. Never guess or silently truncate a citation. Raw text is never returned. RETURNS: citation, title, number, state, collectionType; analysis {summary, passages [{point, quote, deeplinkUrl}], doesNotAddress: CHECK BEFORE CITING}; isCurrent (in force today), isHistorical (superseded; both false = not yet effective), effectiveDate, publicationDate, sourceAsOf (source edition date); url (this exact version), sourceUrl (official source); children: for containers, up to 250 of childrenTotal child provisions (no text; analyze a child by id, or searchLaws for the section when the list is capped), parentId; versions (analyze another by id with includeHistorical: true); ambiguousMatches (retry by id); error (unresolvable or unsafe to analyze; source-file-only leaves return metadata and url to open, never quote them). HOW TO USE: quote only returned passages; for a container (nodeType PARENT) drill into the relevant child; check isCurrent before asserting current law; for state comparisons, analyze each provision with the same question and compare propositions, qualifiers, and doesNotAddress. |
| `MIDPAGE_MCP_ANALYZE_OPINION` | Analyzeopinion | Analyze a legal opinion against a specific question. Returns the propositions the case ACTUALLY supports, each with a verified quote, scope limits, and a deep link, plus what it does NOT address. REQUIRED before citing any case. DOCUMENT: exactly ONE of opinionId (preferred, from search results), reporterCitation (never WL/LEXIS), or docket; no placeholder values. question: the legal question, specific about the legal element. RETURNS: citation (exact Bluebook string); url (the whole case); supportedPropositions[]: proposition (cite-ready text: USE IT when citing), quote (verbatim), scope (limits), centrality (core_holding > supporting_analysis > secondary_matter > background), opinionSection (any non-majority opinion, e.g. "Jackson, Concurring"), deeplinkURL (opens the case at that passage); doesNotAddress (CHECK BEFORE CITING); summary; disposition; jurisdiction; treatment (citator status, cited-by count). CITATION FORMAT: every citation is a markdown hyperlink built from the returned fields. Specific proposition or quote: [{citation}]({deeplinkURL}) Case generally: [{citation}]({url}) Example: [International Shoe Co. v. Washington, 326 U.S. 310 (1945)](https://app.midpage.ai/document/1234567?lines=10-12) Cite after every legal proposition and quote with the exact citation string returned: never abbreviate, no short cites (id., supra), no LEXIS/WL, no invented reporter pin cites (deeplinkURL is the pinpoint). Add parentheticals and scope limits when relevant. HOW TO USE: if your intended use appears in doesNotAddress, do NOT cite the case for it (a fact noted in passing is not a rule). Cite the proposition text or a close paraphrase with its qualifiers; prefer core_holding and supporting_analysis. Never present non-majority text as the holding; name its opinionSection. WRITING: attorney-style paragraphs: topic sentences, crisp rule statements with hyperlinked citations, direct concise answers, verbatim quotes woven into prose. Sparse lists; no block quotes, repetition, or emojis. |
| `MIDPAGE_MCP_FIND_IN_OPINION` | Findinopinion | Find quotable passages within a single opinion by keyword search. Fast, free, no AI. USE after a search to check whether a result is actually relevant (like double-clicking into it) and to decide which cases deserve the AI cost of analyzeOpinion: only the most relevant. Also usable directly when the user gives a citation. Optional but recommended. DO NOT use this tool alone: a case you intend to cite must still go through analyzeOpinion. Default to search unless the user provided a specific citation. DOCUMENT: exactly ONE of opinionId (preferred, from search results), reporterCitation ("556 U.S. 662"; never WL/LEXIS), or docket {courtAbbreviation, docketNumber}. Omit fields you don't have; never pass placeholder values. QUERY: key terms to match, NOT a question. GOOD: "personal jurisdiction minimum contacts purposeful availment". BAD: "Does this case establish personal jurisdiction?" RETURNS: snippets, verbatim passages from the opinion that can be quoted as written. LIMITS: keyword-only, so passages with different wording are missed; a snippet is easy to take out of context; it does NOT say whether the case supports or contradicts your proposition and does NOT surface qualifiers or exceptions. NEXT: analyzeOpinion on promising cases for analysis, qualifiers, and verified quotes before citing. |
| `MIDPAGE_MCP_SEARCH` | Search | Search US case law across federal and state courts. Returns matching opinions with Bluebook metadata, highlights, and citator treatment. This is the default first step of legal research: follow it with findInOpinion and/or analyzeOpinion. NEVER cite a case until you have run analyzeOpinion on it. USE whenever a response needs legal analysis; do not presume to know the answer. If the user gives a specific citation, you may go straight to analyzeOpinion. RETURNS per case: documentId (pass to findInOpinion/analyzeOpinion), metadata (Bluebook citation: parties, court, date, reporter or docket), highlights (why it matched; NOT for quoting, use findInOpinion), treatment (positive/negative/caution/neutral, citation counts). QUERIES: hybrid semantic + keyword matching. Use key terms ("personal jurisdiction minimum contacts purposeful availment"), natural-language propositions or questions, or exact identifiers verbatim ("556 U.S. 662", "patent no 7,479,949"). Run up to 4 queries per call, in parallel, for different issues; each returns up to 10 results. Narrow with the filter fields; omit publishStatus unless the user explicitly asks to restrict by publication status. PAGINATION: each queryOutcomes entry reports resultCount and pagination. For one query's next page call search({ queries: [{ cursor: "" }] }) with cursor only (no query or filters); continuations mix with new queries. Pages hold 10 cases, up to 100 distinct per query; duplicates across queries are merged and totalResults counts the merged set. Stop when nextCursor is absent: search is not exhaustive, refine instead. Cursors expire 30 minutes after the initial search (pagination.expiresAt); reuse returns the same page; if expired or invalid, rerun the query. paginationError: first page usable but not continuable; a failed query never discards the others. NEXT: review highlights and treatment, findInOpinion on 3-5 candidates for quotable passages, then analyzeOpinion on every case you will rely on (REQUIRED before citing). |
| `MIDPAGE_MCP_SEARCH_LAWS` | Searchlaws | Search Midpage's US primary-law corpus: statutes, regulations, constitutions, and agency guidance for federal law, all 50 states, and DC. BM25 keyword search (not semantic) over text, headings, and citations. AUTO-USE: call this whenever a user asks what a statute, code section, regulation, administrative rule, or constitutional provision says, requires, permits, or prohibits, or whether it applies. Do not wait for words like "research" or "Midpage", and do not default to web search for primary-law text. FIND the governing provision here, then analyzeLaw with its id for verified text before citing. RESOLUTION: subsection pinpoints ("18 U.S.C. § 924(c)(1)(C)") and popular/source-law names ("First Step Act of 2018", "ERISA § 514") go through search first: search the user's full wording, choose the intended provision, analyzeLaw by id. Never guess a codified citation or silently truncate a pinpoint. Results are the law in force TODAY unless currentOnly is false (not superseded, not future-effective, no in-force successor). RETURNS: - results: id (pass to analyzeLaw), citation, title, number, state, collectionId/collectionType, path, nodeType, effectiveDate, snippets (matched fragments, marks the hit), isCurrent/isHistorical (both false = not yet effective), url (Midpage page for that exact version) - total: estimate; the authoritative currency check may drop index-stale rows, so a page can hold fewer than pageSize results (continue normally) - stateCounts: estimated per-state hits for the WHOLE query, not this page: scope surveys with them, verify each state with a filtered search; not proof of coverage - error: replaces results when a filter could not be resolved (did-you-mean suggestions included) or the page window was exceeded; says how to fix the call HOW TO USE: search broad, then narrow with the filter fields. NEVER cite from snippets; quote from analyzeLaw. N-state surveys: one unfiltered query, read stateCounts, per-state filtered queries, then analyzeLaw the top provisions. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, your Grok bot can access the Midpage MCP server through Composio to run the actions you authorize, using plain language in the chat.

## Complete Code

None listed.

## Conclusion

### Way Forward
Now that Midpage is connected, extend your setup by connecting the other apps you already use every day, so your Grok bot can run true cross-app workflows end to end.
- Connect Calendar to turn threads into scheduled meetings automatically.
- Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
- Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
- Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.
Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single connection, your bot can coordinate multiple tools safely and reliably in one conversation.

## How to build Midpage MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/midpage_mcp/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/midpage_mcp/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/midpage_mcp/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/midpage_mcp/framework/atomic-agent)

## Related Toolkits

- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Google Docs](https://composio.dev/toolkits/googledocs) - Google Docs is a cloud-based word processor that enables document creation and real-time collaboration. Its seamless sharing and version history make team editing and content management a breeze.
- [Google Super](https://composio.dev/toolkits/googlesuper) - Google Super is an all-in-one suite combining Gmail, Drive, Calendar, Sheets, Analytics, and more. It gives you a unified platform to manage your digital life, boosting productivity and organization.
- [ActiveMerge](https://composio.dev/toolkits/active_merge) - ActiveMerge is a document automation platform for generating documents, images, merged files, and e-signature workflows. It helps teams turn templates and stored files into finished, shareable documents faster.
- [Affinda](https://composio.dev/toolkits/affinda) - Affinda is an AI-powered document processing platform that automates data extraction from resumes, invoices, and more. It streamlines document-heavy workflows by turning files into structured, actionable data.
- [Agility cms](https://composio.dev/toolkits/agility_cms) - Agility CMS is a headless content management system for building and managing digital experiences across platforms. It lets teams update content quickly and deliver omnichannel experiences with ease.
- [Airparser](https://composio.dev/toolkits/airparser) - Airparser is an AI-powered parser for extracting structured data from emails, documents, PDFs, and files. It turns messy inbound content into clean fields your apps and workflows can use.
- [Algodocs](https://composio.dev/toolkits/algodocs) - Algodocs is an AI-powered platform that automates data extraction from business documents. It delivers fast, secure, and accurate processing without templates or manual training.
- [Api2pdf](https://composio.dev/toolkits/api2pdf) - Api2Pdf is a REST API for generating PDFs from HTML, URLs, and documents using powerful engines like wkhtmltopdf and Headless Chrome. It streamlines document conversion and automation for developers and businesses.
- [Archive.org](https://composio.dev/toolkits/archive_org) - Archive.org is the Internet Archive's digital library of websites, books, audio, video, and images. Use it to preserve, explore, and access historical web captures and public-domain media.
- [Aryn](https://composio.dev/toolkits/aryn) - Aryn is an AI-powered platform for parsing, extracting, and analyzing data from unstructured documents. Use it to automate document processing and unlock actionable insights from your files.
- [Boldsign](https://composio.dev/toolkits/boldsign) - Boldsign is a digital eSignature platform for sending, signing, and tracking documents online. Organizations use it to automate agreements and manage legally binding workflows efficiently.
- [Boloforms](https://composio.dev/toolkits/boloforms) - BoloForms is an eSignature platform built for small businesses, offering unlimited signatures, templates, and forms. It simplifies digital document signing and team collaboration at a predictable, fixed price.
- [Box](https://composio.dev/toolkits/box) - Box is a cloud content management and file sharing platform for businesses. It helps teams securely store, organize, and collaborate on files from anywhere.
- [Box MCP](https://composio.dev/toolkits/box_mcp) - Box MCP is Box's hosted MCP server that exposes enterprise files, folders, and metadata. It provides secure, centralized access to corporate content for search and management.
- [Carbone](https://composio.dev/toolkits/carbone) - Carbone is a blazing-fast report generator that turns JSON data into PDFs, Word docs, spreadsheets, and more using flexible templates. It lets you automate document creation at scale with minimal code.
- [Castingwords](https://composio.dev/toolkits/castingwords) - CastingWords is a transcription service specializing in human-powered, accurate transcripts via a simple API. Get seamless audio-to-text conversion for interviews, meetings, podcasts, and more.
- [CertSeal](https://composio.dev/toolkits/cert_seal) - CertSeal is an API platform for issuing and managing verifiable digital certificates. Use it to automate trusted certificate workflows for recipients, batches, designs, and webhooks.
- [Cloudconvert](https://composio.dev/toolkits/cloudconvert) - CloudConvert is a powerful file conversion service supporting over 200 file formats. It streamlines converting, compressing, and managing documents, media, and more, all in one place.
- [Cloudlayer](https://composio.dev/toolkits/cloudlayer) - Cloudlayer is a document and asset generation service for creating PDFs and images via API or SDKs. It lets you automate high-quality doc creation, saving dev time and reducing manual work.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Midpage MCP?

With a standalone Midpage MCP server, the agents and LLMs can only access a fixed set of Midpage tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Midpage and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Grok Bot?

Yes, you can. Grok Bot fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Midpage tools.

### Can I manage the permissions and scopes for Midpage while using Tool Router?

Yes, absolutely. You can configure which Midpage scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Midpage data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
