Skip to content

MCP guide: your workspace, your assistant

Connect an external MCP-capable AI host to one DemocracyIndia profile. You choose the permissions and expiry. MCP is available to all account types; each action still follows the workspace’s role, plan and ownership rules. A remote OAuth connector is available for compatible hosted clients, alongside the local stdio connector.

Connect your assistant

Choose your assistant, sign in to DemocracyIndia and approve the profile and permissions it may use.

Remote MCP server address

https://democracyindia.com/api/v1/mcp

Your password and connection keys never need to be pasted into a chat. Access begins only after your approval.

ChatGPT

Open ChatGPT’s connector settings and add this server using OAuth.

Open ChatGPT setup
Setup guide
  1. Open Add → Add custom MCP server in your ChatGPT connector settings.
  2. Name it DemocracyIndia Workspace and paste the server address above.
  3. Choose OAuth and automatic client registration where requested.
  4. Sign in to DemocracyIndia, select your profile or campaign and approve the permissions. Select the connector in your chat.

Custom connectors depend on your ChatGPT account and workspace settings. This shortcut opens settings; it does not install or authorise access.

Official provider guide

Claude

Open a connector form with the server name and address already filled in.

Add to Claude
Setup guide
  1. Open the shortcut and sign in to Claude.
  2. Check the prefilled name and server address. If they disappear after sign-in, open this shortcut again or add a custom connector under Customize → Connectors.
  3. If asked for an OAuth client method, choose automatic registration.
  4. Connect, sign in to DemocracyIndia and approve your profile and permissions. Enable the connector in your conversation.

Claude still asks you to confirm the connector and authorise access. Organisation administrators may restrict custom connectors.

Official provider guide

Gemini

Open Connected Apps and add DemocracyIndia as a custom app where available.

Open Gemini setup
Setup guide
  1. Open Connected Apps in Gemini settings.
  2. Choose Custom apps, add the server address above and continue.
  3. Sign in to DemocracyIndia and approve the profile and permissions.
  4. Select the connected app in your Gemini conversation.

Google currently limits this feature to eligible personal accounts in the US using English, with additional age and activity requirements. If Custom apps is unavailable, see Google’s guide or use Gemini CLI below.

Official provider guide

Share with another assistant

Copy a setup prompt into a chat. The public reference helps a compatible host discover this server; your private workspace stays protected.

https://democracyindia.com/mcp
Preview setup prompt

Please help me connect DemocracyIndia Workspace using the guide at https://democracyindia.com/mcp and its assistant-readable reference at https://democracyindia.com/mcp/setup.md. The MCP server is https://democracyindia.com/api/v1/mcp. If this host supports adding MCP servers, help me configure OAuth and let me approve the profile and permissions myself. Otherwise give me the appropriate setup steps for this host. Do not ask me to paste passwords or private connection keys into chat. After authorisation, verify the connection with workspace_setup and data_status; do not claim it is connected just from reading the guide.

Sharing this page alone cannot install a connector. The chat host must support MCP and allow setup; you must still sign in and approve access.

Codex and Gemini CLI setup

Codex

codex mcp add democracyindia --url https://democracyindia.com/api/v1/mcp --oauth-client-registration dcr
codex mcp login democracyindia

Gemini CLI

gemini mcp add --transport http democracyindia https://democracyindia.com/api/v1/mcp
# In Gemini CLI, authenticate with: /mcp auth democracyindia

Advanced setup, permissions and import workflow

Connect ChatGPT or another hosted MCP client

Use this HTTPS Streamable HTTP endpoint. The /mcp page you are reading is the guide, not the connector endpoint. No Node.js installation or private connection-key copy is needed for this OAuth flow.

https://democracyindia.com/api/v1/mcp
  1. In a ChatGPT account/workspace that permits custom MCP servers, add a custom server/plugin. Enter the exact endpoint URL above. Account, plan and administrator restrictions still apply.
  2. Choose OAuth authentication. Compatible clients discover the authorisation and dynamic client-registration endpoints automatically.
  3. When directed to DemocracyIndia, sign in, check the requesting client’s return domain, choose the profile/campaign and only the permissions you intend to grant, then approve. Do not give the AI client your DemocracyIndia password.
  4. Return to the client and scan its tools. Start with workspace_setup and action_catalog. To add permissions later, create a new authorisation. Revoke the connection at any time in Settings → External assistants & MCP.

OAuth uses PKCE S256, single-use codes and audience-bound access tokens lasting at most 15 minutes. Optional refresh access keeps the approved connection active for up to 30 days, with rotating refresh tokens. It never creates access to another profile.

Official ChatGPT custom MCP connection guidance

Alternative: connect a local MCP host with Node.js

  1. Install Node.js 22 or newer. Download and extract the connector to a permanent folder.
  2. In the extracted folder run npm ci. The download contains a README with complete instructions and examples.
  3. Sign in and open Settings → External assistants & MCP. Create a named connection for this profile, optionally selecting one campaign you own.
  4. Choose only the required permissions and an expiry of 1–30 days. Copy the key once into the host’s private environment settings.
  5. Add the configuration below to your host’s MCP server settings. Replace the absolute server path and key, restart the connection, then call workspace_setup or action_catalog. Each profile needs its own key.
{
  "mcpServers": {
    "democracyindia": {
      "command": "node",
      "args": [
        "E:/your-folder/democracyindia-mcp/src/server.mjs"
      ],
      "env": {
        "DEMOCRACYINDIA_URL": "https://democracyindia.com",
        "DEMOCRACYINDIA_MCP_KEY": "PASTE_YOUR_CONNECTION_KEY"
      }
    }
  }
}

Never paste your connection key into a conversation, URL, public file or screenshot. Revoke it in the dashboard when finished. This connector does not need an LLM provider key; the external host’s own billing and data policy still apply.

Choose the authority you delegate

Keys start with only the permissions you select. Worker names and phone numbers require a separate explicit permission. action_catalog returns the supported actions and input schemas available to that key. workspace_action performs only those named actions; it does not accept arbitrary API paths or SQL. Direct action writes take effect immediately and must not be blindly retried after a timeout.

PermissionAllows
setup:readRead setup
data:readRead import counts
imports:writeStage imports for approval
workers:readRead worker/roster names and phone numbers (personal data)
workspace:readRead tasks and organisation trees
tasks:writeCreate and update own tasks
drafts:writeCreate draft events and content
contacts:writeAdd and edit own contacts
profile:writeEdit own name and language
organisation:writeCreate and edit own organisation trees

Prepare and populate data

Ask the AI to prepare rows for this workspace, show its sources and stage an import. It supplies a UUID requestId, reused only for an identical retry. Review the batch in the dashboard and apply or reject it. Applying is transactional and retry-safe.

  • Villages: sourceUrl and rows containing name, optional block and LGD code. Applied rows create an unconfirmed organisation-tree draft, not entries in the shared official village catalogue. A selected owned campaign is required.
  • Booths: sourceUrl and rows containing boothNumber, name and optional address/coordinates. A selected owned campaign is required. Existing booth numbers are skipped, never overwritten.
  • Workers: name, phone and optional role/boothNumber. Existing own contacts are matched by phone. A selected campaign receives invited worker assignments; otherwise contacts enter this profile’s roster. Import grants neither messaging consent nor login access.
  • Tasks: title, optional description, priority, ISO dueDate and workerId from list_workers. Linked workers can receive login assignments. For unlinked roster workers, the owner’s task records the worker in its description; no phone message is sent.
  • Profile setup imports change only the owner’s display name and interface language. Verified seats, party identity, KYC, role, billing and consent remain outside these imports.

Per batch: up to 500 villages or booths, 200 workers, 100 tasks or one profile row. At most 50 pending batches and 20 active keys per profile. The ZIP README includes the exact fields and configuration examples.

Profile boundaries and current capabilities

Every call checks the owner, key expiry, permissions and selected campaign ownership. Supported actions cover own contacts, tasks, draft events/content, name/language and organisation trees. This release does not expose personal voter records, political scoring, sensitive demographic targeting, voter-phone exports, outbound messaging, consent overrides, financial operations, deletion or platform-admin APIs. Imported documents are data, never instructions or new authority.

The built-in assistant is enabled for active paid profiles across account types, including leader, party, institution and professional workspaces, and existing eligible passes/trials/coupons. It receives only that profile’s scoped context and authorised tools. This is contextual guidance and tool access, not model fine-tuning. No AI-provider balance is used merely by opening MCP settings or calling the MCP tools.

Connection test checklist

  1. Create a short-lived read-only key on a test profile and inspect workspace_setup, data_status and action_catalog.
  2. Confirm that attempts to pass another owner or campaign are rejected. Then grant import permission and stage a small sourced test batch.
  3. Review, reject and apply test batches; repeat an identical request UUID and check that no duplicate batch is created. Confirm imported workers still have pending consent.
  4. Authorise a task action and assign one clearly labelled test task to an approved test worker. Check the saved workspace result.
  5. Revoke the key and verify that calls fail. Check expiry and missing-permission failures. Verify paid bot visibility without spending provider balance unless explicitly authorised.

The connector README contains the full tool and import reference. Official MCP SDK documentation