> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/sfp-server/api-reference/mcp.md).

# MCP

## List available MCP tools

> Returns all registered MCP tools with their schemas.\
> \
> \*\*Authentication — OAuth 2.1 (recommended)\*\*: add the MCP URL with no credentials; the client discovers the authorization server from the 401 challenge, signs you in via the browser, and every tool call runs with YOUR user permissions.\
> \`\`\`json\
> {\
> &#x20; "mcpServers": {\
> &#x20;   "sfp": {\
> &#x20;     "type": "http",\
> &#x20;     "url": "<https://your-server.com/sfp/api/mcp"\\>
> &#x20;   }\
> &#x20; }\
> }\
> \`\`\`\
> Equivalent: \`claude mcp add --transport http sfp <https://your-server.com/sfp/api/mcp\\`\\>
> \
> \*\*Authentication — application token (headless/CI)\*\*: pass an application token as a bearer header. Tokens scoped \`sfp:read\` cannot invoke write actions.\
> \`\`\`json\
> {\
> &#x20; "mcpServers": {\
> &#x20;   "sfp": {\
> &#x20;     "type": "http",\
> &#x20;     "url": "<https://your-server.com/sfp/api/mcp",\\>
> &#x20;     "headers": {\
> &#x20;       "Authorization": "Bearer \<your-application-token>"\
> &#x20;     }\
> &#x20;   }\
> &#x20; }\
> }\
> \`\`\`\
> \
> \*\*Testing with MCP Inspector\*\*:\
> \`\`\`bash\
> npx @modelcontextprotocol/inspector --transport streamable-http --url <http://localhost:3478/sfp/api/mcp\\>
> \`\`\`\
> Complete the OAuth flow in the opened browser, or enter an application token in the "Bearer Token" field.

````json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"paths":{"/sfp/api/mcp/tools":{"get":{"operationId":"McpController_listTools","summary":"List available MCP tools","description":"Returns all registered MCP tools with their schemas.\n\n**Authentication — OAuth 2.1 (recommended)**: add the MCP URL with no credentials; the client discovers the authorization server from the 401 challenge, signs you in via the browser, and every tool call runs with YOUR user permissions.\n```json\n{\n  \"mcpServers\": {\n    \"sfp\": {\n      \"type\": \"http\",\n      \"url\": \"https://your-server.com/sfp/api/mcp\"\n    }\n  }\n}\n```\nEquivalent: `claude mcp add --transport http sfp https://your-server.com/sfp/api/mcp`\n\n**Authentication — application token (headless/CI)**: pass an application token as a bearer header. Tokens scoped `sfp:read` cannot invoke write actions.\n```json\n{\n  \"mcpServers\": {\n    \"sfp\": {\n      \"type\": \"http\",\n      \"url\": \"https://your-server.com/sfp/api/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <your-application-token>\"\n      }\n    }\n  }\n}\n```\n\n**Testing with MCP Inspector**:\n```bash\nnpx @modelcontextprotocol/inspector --transport streamable-http --url http://localhost:3478/sfp/api/mcp\n```\nComplete the OAuth flow in the opened browser, or enter an application token in the \"Bearer Token\" field.","parameters":[],"responses":{"200":{"description":"List of available MCP tools"},"403":{"description":"Forbidden - Requires role: owner, member, application"}},"tags":["MCP"]}}}}
````

## MCP Streamable HTTP GET endpoint

> Receives responses and notifications via Streamable HTTP transport. Part of the bidirectional MCP communication flow. Requires bearer token authentication.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"paths":{"/sfp/api/mcp":{"get":{"operationId":"McpController_handleMcpGet","summary":"MCP Streamable HTTP GET endpoint","description":"Receives responses and notifications via Streamable HTTP transport. Part of the bidirectional MCP communication flow. Requires bearer token authentication.","parameters":[],"responses":{"200":{"description":"Streamable HTTP response"},"403":{"description":"Forbidden - Requires role: owner, member, application"}},"tags":["MCP"]}}}}
```

## MCP JSON-RPC endpoint

> Handles MCP protocol requests via Streamable HTTP transport. Send JSON-RPC messages to invoke tools, list resources, or interact with the MCP server. Requires bearer token authentication. See <https://modelcontextprotocol.io/docs/concepts/transports#streamable-http>

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"paths":{"/sfp/api/mcp":{"post":{"operationId":"McpController_handleMcpPost","summary":"MCP JSON-RPC endpoint","description":"Handles MCP protocol requests via Streamable HTTP transport. Send JSON-RPC messages to invoke tools, list resources, or interact with the MCP server. Requires bearer token authentication. See https://modelcontextprotocol.io/docs/concepts/transports#streamable-http","parameters":[],"responses":{"201":{"description":"JSON-RPC response or SSE stream"},"403":{"description":"Forbidden - Requires role: owner, member, application"}},"tags":["MCP"]}}}}
```

## Close MCP session

> Terminates an active MCP session and cleans up server-side resources. Requires bearer token authentication.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"paths":{"/sfp/api/mcp":{"delete":{"operationId":"McpController_handleMcpDelete","summary":"Close MCP session","description":"Terminates an active MCP session and cleans up server-side resources. Requires bearer token authentication.","parameters":[],"responses":{"200":{"description":"Session closed"},"403":{"description":"Forbidden - Requires role: owner, member, application"}},"tags":["MCP"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
