MCP Server - Connect with you LLM
Overview
How do I connect to the MCP server in CxPlanner?
The MCP server provides a structured way to call tools, test endpoints, and integrate with CxPlanner’s APIs. It follows the same authentication and workflow as the existing REST API, making it simple to reuse your existing credentials.
When and why to use this
Use the MCP server when you need to:
- Integrate with external systems using a structured tool-based approach.
- Run automated checks or tests such as
ping
orget_users_on_platform
. - Maintain a single authentication flow across REST API and MCP calls.
Key facts:
- Authentication is the same as for the REST API - include your token and projectID.
- Rate limits are identical to REST.
- MCP supports streamable HTTP by default.
- A
Mcp-Session-Id
is issued oninitialize
and must be echoed by the client. - Tools are project-aware and may require a
projectID
parameter.
How to - step by step
- Set your base endpoint:
https://mcp.cxplanner.com
- Authenticate using the same Bearer token and projectID as the REST API.
- Initialize the MCP session:
- Call the
initialize
tool. - Capture the
Mcp-Session-Id
returned.
- List available tools:
- Use
tools/list
to confirm the available actions.
- Call a tool:
- Global API →
get_users_on_platform
(no parameters). - Project API →
get_users
(requiresprojectID
as query param).
- Test a safe tool (example:
ping
):
- Run with arguments
{ "message": "hello" }
.
Behavior and results
MCP supports the following tool calls:
Tool | Purpose |
---|---|
| Starts a session and returns session ID |
| Lists available tools |
| Executes a specific tool |
| Test connectivity with a message response |
Authentication
- Bearer token and projectID are required.
- Same developer permission levels apply (READ, READ-WRITE, GLOBAL).
Troubleshooting
Problem | Cause | Solution |
---|---|---|
401 Unauthorized | Missing or invalid bearer token | Check token and include projectID if needed |
Tool not found | Incorrect tool name in request | Use |
Request exceeds Y req/min | Rate limit from REST API also applies | Slow down calls or batch requests |
No session ID returned | | Run |
Quick facts
- Requires: Company role Admin
- Location: API → MCP Server
- Affects: Tool calls, authentication, rate limits
- Tools included:
initialize
,tools/list
,tools/call
,ping
Example code
const endpoint = 'https://mcp.cxplanner.com';
async function mcp(method, params = {}, id = String(Date.now())) {
const res = await fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method,
params,
id,
}),
});
if (!res.ok) {
const text = await res.text().catch(() => '');
throw new Error(`HTTP ${res.status} ${res.statusText}: ${text}`);
}
return res.json();
}
// Example: initialize
(async () => {
try {
const resp = await mcp('initialize');
console.log('initialize →', resp);
} catch (err) {
console.error(err);
}
})();
// Example: list tools
(async () => {
try {
const resp = await mcp('tools/list');
console.log('tools/list →', resp);
} catch (err) {
console.error(err);
}
})();
// Example: call tool
(async () => {
try {
const resp = await mcp('tools/call', { name: 'get_users_on_platform', arguments: { bearerToken: 'xxxxx' } });
console.log('tools/call →', resp);
} catch (err) {
console.error(err);
}
})();
Updated on: 09/19/2025
Thank you!