forcepointDSC-mcp

forcepointDSC-mcp

MCP server exposing Forcepoint Data Security Cloud configuration APIs for managing users, groups, credentials, and access tokens via Vault and Postgres.

Category
访问服务器

README

forcepointDSC-mcp

MCP server for the documented Forcepoint Data Security Cloud | SSE configuration APIs.

This repository keeps the original secure skeleton shape but is now specific to Forcepoint:

  • Forcepoint user and group configuration APIs are exposed as dedicated MCP tools.
  • Forcepoint upstream credentials are stored per user in Vault.
  • Forcepoint connection defaults are stored per user in Postgres with default-user fallback.
  • MCP HTTP access tokens are stored in Vault in a shared multi-user token index.
  • Mutating tools honor MCP_ADMIN_AUTH_KEY when it is configured.

Coverage

The implementation covers all Forcepoint configuration endpoints documented in the referenced admin guide pages:

  • User create or update
  • User deactivate
  • User reactivate
  • User delete
  • User read via v2
  • User read via v2.1
  • Group create or rename
  • Group delete
  • Group add members
  • Group remove members
  • Group list
  • Group read with paging and status filtering

Source documentation:

  • REST API index: https://help.forcepoint.com/fpone/sse_admin/prod/guid-aad2ad06-3314-41db-adc5-58e0a8c81baa.html
  • Config API authentication: https://help.forcepoint.com/fpone/sse_admin/prod/oxy_ex-1/deployment_guide/guid-d35197e0-5924-4838-af15-6298cf9e7b50.html
  • Basic auth guidance: https://help.forcepoint.com/fpone/sse_admin/prod/oxy_ex-1/deployment_guide/guid-6b3ba150-bd7d-4ec1-a8fb-7bb0a5f0719e.html
  • User API details: https://help.forcepoint.com/fpone/sse_admin/prod/oxy_ex-1/deployment_guide/guid-a6f5d794-1d63-4cd7-afce-59858e71daf1.html
  • Group API details: https://help.forcepoint.com/fpone/sse_admin/prod/oxy_ex-1/deployment_guide/guid-deb6dc8f-ec0c-423e-a8d5-b3589d02b858.html

Architecture

Runtime flow:

  1. src/index.js boots stdio mode.
  2. src/http/index.js boots HTTP mode.
  3. src/runtime/createAppServices.js creates Postgres, Vault, Forcepoint client, and HTTP token verifiers.
  4. src/services/targetService.js resolves user-scoped Forcepoint config and credentials, then issues Forcepoint API calls.
  5. src/mcp/server.js registers Forcepoint tools, admin-key gates, query suggestions, and multi-user token management.
  6. src/http/server.js exposes MCP over HTTP with auth, rate limiting, and access logging.

Persistence model:

  • Vault stores Forcepoint API credentials per user at APP_NAME/users/<user>/forcepoint/auth.
  • Vault stores MCP HTTP bearer tokens in a multi-user token index at MCP_HTTP_VAULT_TOKEN_INDEX_PATH.
  • Postgres stores connection config in APP_NAME_config keyed by (user_id, key).

Tool Surface

All tool responses use this envelope:

{
  "ok": true,
  "status": 200,
  "data": {}
}

Mutating tools return 401 if MCP_ADMIN_AUTH_KEY is configured and authorizationKey is missing or invalid.

The richest machine-readable tool documentation is returned by forcepoint_query_suggestion, which includes:

  • When each tool should and should not be used
  • Risk class and whether the tool is read-only or mutating
  • Required permissions and prerequisites
  • User-scope and environment-selection behavior
  • Parameter constraints
  • Expected response shapes
  • Common failure conditions
  • Recommended prerequisite and follow-up tools
  • Safety warnings
  • Valid invocation examples

Discovery And Runtime

Tool Use When Risk Notes
forcepoint_query_suggestion You need planning, schema discovery, or tool sequencing help low Returns the full rich tool catalog for LLMs and operators
forcepoint_connection_info You need server defaults, docs links, or persistence model details low Read-only
forcepoint_scope_info You need exact Vault/Postgres paths for a user scope low Read-only
forcepoint_endpoint_inventory You need documented endpoint coverage or the generated OpenAPI inventory low Read-only
forcepoint_health_check You need a live credential/connectivity check low Uses the documented group-list endpoint

Forcepoint Config And Credentials

Tool Use When Risk Notes
forcepoint_connection_config_get You need resolved base URL, timeout, or preferred API version for a user low Read-only
forcepoint_connection_config_set You need to persist base URL, timeout, or API version in Postgres medium Mutating
forcepoint_user_token_get You need to confirm whether a Forcepoint credential is present low Read-only; values stay redacted
forcepoint_user_token_set You need to store a bearer token or basic-auth credential in Vault high Mutating
forcepoint_user_token_delete You need to remove a Forcepoint credential from Vault high Mutating

MCP HTTP Access Tokens

Tool Use When Risk Notes
forcepoint_mcp_http_token_get You need to list user-scoped MCP access tokens low Read-only
forcepoint_mcp_http_token_upsert You need to issue or rotate an MCP bearer token high Mutating; optionally generates the token
forcepoint_mcp_http_token_revoke You need to invalidate an MCP bearer token by tokenId high Mutating

Forcepoint User And Group APIs

Tool Use When Risk Notes
forcepoint_user_create_or_update Create or update a Forcepoint user medium Mutating
forcepoint_user_deactivate Disable user access high Mutating
forcepoint_user_reactivate Restore user access medium Mutating
forcepoint_user_delete Delete a deactivated user high Mutating
forcepoint_user_get Read a Forcepoint user via v2 or v2.1 low Read-only
forcepoint_group_create_or_update Create a group or rename a group medium Mutating
forcepoint_group_delete Delete a group high Mutating
forcepoint_group_add_members Add existing users to a group medium Mutating
forcepoint_group_remove_members Remove users from a group medium Mutating
forcepoint_group_list List groups low Read-only
forcepoint_group_get Read one group with paging and status filters low Read-only
forcepoint_api_request You need a documented endpoint that has no dedicated tool variable Use only after forcepoint_endpoint_inventory

OpenAPI Inventory

Generate the documented endpoint inventory artifact with:

npm run generate:endpoint-inventory

Generated output:

  • artifacts/generated/forcepoint-openapi-endpoint-inventory.json

The artifact is built from the canonical endpoint catalog in src/services/forcepointCatalog.js.

Environment

Important variables:

  • APP_NAME: naming root for Vault paths and Postgres table name
  • MCP_ADMIN_AUTH_KEY: optional admin key enforced for all mutating tools
  • MCP_CONFIG_DEFAULT_USER_ID: default user scope when userId is omitted
  • FORCEPOINT_DEFAULT_BASE_URL: Forcepoint portal base URL fallback
  • FORCEPOINT_DEFAULT_TIMEOUT_MS: Forcepoint request timeout fallback
  • FORCEPOINT_DEFAULT_USER_API_VERSION: default user read API version, v2 or v2.1
  • FORCEPOINT_CONFIG_BASE_URL_KEY: Postgres key for per-user base URL
  • FORCEPOINT_CONFIG_TIMEOUT_MS_KEY: Postgres key for per-user timeout
  • FORCEPOINT_CONFIG_USER_API_VERSION_KEY: Postgres key for per-user user-read API version
  • FORCEPOINT_CONFIG_TENANT_KEY: Postgres key for per-user tenant context
  • FORCEPOINT_CONFIG_ACCOUNT_KEY: Postgres key for per-user account context
  • FORCEPOINT_VAULT_USER_AUTH_SECRET_SUFFIX: Vault suffix for per-user Forcepoint auth secrets
  • MCP_HTTP_VAULT_TOKEN_INDEX_PATH: shared multi-user Vault index for MCP HTTP bearer tokens

See .env.example for the full list.

Running

Local development with bundled Postgres and Vault:

docker compose up -d
npm ci
npm run generate:endpoint-inventory
npm test

Stdio mode:

npm run start:stdio

HTTP mode:

npm run start:http

HTTP endpoint: http://127.0.0.1:3000/mcp

External Services Mode

Use docker-compose.external.yml when Vault and Postgres already exist outside this repo.

Required environment variables include:

  • POSTGRES_HOST
  • POSTGRES_PORT
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • VAULT_ADDR
  • VAULT_TOKEN

This mode starts only the application container and preserves the same user-scoped Postgres/Vault behavior, including tenant/account context for multiple tenants.

Testing

Run all tests with:

npm test

The test suite covers:

  • Forcepoint tool registration and auth gating
  • HTTP transport authentication behavior
  • Vault token-index helpers for multi-user MCP access tokens
  • Generated-doc and external-deployment documentation expectations

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选