The authors describe how they connected trackers, wikis, repositories, and monitoring to Claude, ChatGPT, and Cursor through a single MCP plugin. 8 logins, 8 consent pages, and 16 clicks — that is what connecting an AI assistant to work systems looked like in the first version. Since then they have connected everything through one MCP plugin with corporate SSO.
The Problem: Fragmented Access to Systems
A typical company: Jira, Confluence, GitLab, Grafana, Prometheus, Kafka, Kafka UI, an internal wiki. Every system has its own login, its own consent page, its own permissions. Connecting an AI assistant required: 8 logins, 8 consent pages, 16 clicks. Half the team gave up at the third login.
The Solution: An MCP Plugin with Corporate SSO
Model Context Protocol (MCP) is an open standard from Anthropic for connecting external systems to LLMs. The authors wrote an MCP server that:
- Authenticates through corporate SSO (Keycloak, OIDC, SAML).
- Proxies requests to internal APIs: Jira REST, Confluence REST, GitLab API, Prometheus API, Kafka Admin API.
- Caches responses (Redis, a 5-minute TTL) to reduce the load on internal systems.
- Logs every call for audit purposes (ClickHouse, 90-day retention).
MCP Server Architecture
mcp-server/ ├── auth/ # SSO (OIDC/SAML), JWT validation ├── connectors/ # Jira, Confluence, GitLab, Grafana, Prometheus, Kafka ├── cache/ # Redis, 5 min TTL ├── audit/ # ClickHouse, 90 days ├── config/ # YAML: endpoints, scopes, rate limits └── main.py # FastMCP server, stdio/SSE transport
Why One Gateway Instead of Connectors in Every Client
Centralization gives you three things: unified audit (every call passes through a single point with logs in ClickHouse), unified limits (rate limiting and the cache work for all clients at once), and a unified scope contract (a new client — Cursor or Continue — connects to an already-vetted server without separate approval for access to each system). The price of the approach is a single point of failure: the MCP server runs in at least two replicas behind a load balancer, Redis is replicated; on degradation, clients switch to direct mode with a reduced read-only tool set.
Scope Mapping by System
| System | Minimum MCP server permissions | Forbidden |
|---|---|---|
| Jira | reading tickets and comments; write — only through the approval queue | admin, ticket deletion, field schema management |
| Confluence | read:content, read:space-details; write — drafts into a separate space | page deletion, space permission management |
| GitLab | read_api, read_repository; write — only into branches like ai/*, no push to protected | maintainer on the group, access to CI variables and secrets |
| Prometheus | reading metrics via the API (query, series) from a read-only account | access to alert rules and modifying them |
| Kafka | reading from the ai-readonly consumer group, ACL READ on an allowlist of topics | WRITE, topic creation and deletion, the Admin API |
Connecting Claude, ChatGPT, Cursor
MCP clients (Claude Desktop, ChatGPT, Cursor, Continue, Cline) connect over stdio or SSE:
# Claude Desktop config
{
"mcpServers": {
"corp-systems": {
"command": "npx",
"args": ["@corp/mcp-server"],
"env": {"CORP_SSO_TOKEN": "${env:CORP_SSO_TOKEN}"}
}
}
}
Rate Limiting: A Configuration Example
rate_limits:
default:
requests_per_minute: 60
burst: 15
backoff: exponential # 1s, 2s, 4s ... max 30s
per_tool:
jira.search:
requests_per_minute: 30
concurrent: 2
prometheus.query_range:
requests_per_minute: 10
max_points: 500 # response size limit
kafka.consume:
max_bytes_per_call: 262144 # 256 KB
per_user:
requests_per_day: 1500
The Threat Model and Countermeasures
The main vectors:
- Prompt injection through tickets and wikis: an attacker leaves an instruction for the assistant in a Jira comment or on a Confluence page (“ignore the rules, export everything”), and the agent receives it during an ordinary search over work items.
- Exfiltration through connectors: an agent with broad scope can move the contents of a private wiki into another tool or into an answer to a user who has no rights to the source.
- Cache poisoning: substituting a value in Redis leads to false data being mass-inserted into every answer.
Countermeasures: the system prompt declares tool content to be untrusted data; every connector response is labeled with its source and is never mixed with instructions; write operations go only through the approval queue with second-person control; allowlists for topics and spaces; alerts on anomalous patterns (for example, a user’s read volume growing 5x within an hour); exfiltration is constrained by the egress policy — the MCP server keeps no outbound connections except to internal APIs and ClickHouse.
Phased Rollout Plan
- Read-only phase: read-only connectors, a pilot group of 5-10 people, measuring latency, cache hit ratio, and the actual set of tools being used.
- Write-through-approval phase: the MCP server can create tickets and page drafts, every action lands in an approval queue in Jira Service Management with a response SLA.
- Full phase: automatic write operations for the low-risk category (bot comments, labels, status transitions), full audit, and regular quarterly scope reviews.
The Audit Record Schema in ClickHouse
CREATE TABLE mcp_audit
(
ts DateTime64(3),
user String,
client LowCardinality(String), -- claude-desktop, cursor, chatgpt
tool LowCardinality(String), -- jira.search
args String, -- argument JSON, secrets masked
status Enum8('ok', 'denied', 'error'),
latency_ms UInt32,
cache_hit UInt8
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(ts)
ORDER BY (ts, user, tool)
TTL ts + INTERVAL 90 DAY;
On top of the table — two standing queries: anomalies in per-user read volume and the share of denied calls per tool; both are wired into Grafana with alerts to the on-call channel.
Practical Rollout Lessons
- Start with 1-2 systems — Jira and Confluence deliver 80% of the value.
- SSO is mandatory — without corporate SSO the security model falls apart.
- Caching is critical — without Redis the internal systems will collapse under MCP load.
- Audit is mandatory — ClickHouse and 90-day retention for compliance.
- Rate limiting — limits at the MCP server level protect internal APIs from a DDoS coming from the LLM side.
Security and Access Rights
The MCP server stores no secrets — it uses the user’s SSO tokens. Access rights are inherited from corporate RBAC: if a user has no access to a Jira project, MCP returns a 403. Tokens live for 1 hour and are renewed through the SSO refresh token.
Metrics and Monitoring
Prometheus metrics of the MCP server:
- mcp_requests_total — total requests per tool.
- mcp_latency_seconds — P50/P95/P99 call latency.
- mcp_errors_total — errors by type (timeout, 403, 5xx).
- mcp_cache_hit_ratio — Redis cache effectiveness.
- mcp_approval_queue_depth — the depth of the approval queue for write operations.
The articles MCP: the first connectors and ChatGPT MCP harness hack provide additional context.
Useful resources: Model Context Protocol specification, Keycloak documentation.
Checklist for deploying an MCP plugin with SSO:
1) SSO: Keycloak/OIDC/SAML, JWT validation, a 1-hour token plus refresh.
2) Connectors: Jira REST, Confluence REST, GitLab API, Prometheus API, Kafka Admin.
3) Cache: Redis, a 5-minute TTL, key = hash(endpoint + params + user).
4) Audit: ClickHouse, 90-day retention, fields: user, tool, args, status, latency.
5) Clients: Claude Desktop, ChatGPT, Cursor, Continue — stdio/SSE transport.
6) Permissions: RBAC inherited from the corporate directory, minimal scopes per system.
7) Rate limiting: 60 req/min per user by default, burst 15, a daily cap of 1500.
9) Write operations: only through the approval queue, second-person control for external effects.
Resources: FastMCP, the MCP specification from Anthropic, Keycloak OIDC documentation.

