Use SkillFlaw as an MCP server
SkillFlaw integrates with the Model Context Protocol (MCP) as both an MCP server and an MCP client.
This page describes how to use SkillFlaw as an MCP server that exposes your flows as tools that MCP clients can use when generating responses.
SkillFlaw MCP servers support both the streamable HTTP transport and Server-Sent Events (SSE) as a fallback.
For information about using SkillFlaw as an MCP client and managing MCP server connections within flows, see Use SkillFlaw as an MCP client.
Prerequisites
-
A SkillFlaw project with at least one flow that has a Chat Output component.
The Chat Output component is required to use a flow as an MCP tool.
-
Any LTS version of Node.js installed on your computer if you want to use MCP Inspector to test and debug flows.
-
ngrok installed and an ngrok authtoken if you want to deploy a public SkillFlaw server.
Serve flows as MCP tools
SkillFlaw exposes eligible flows through a global MCP server endpoint.
Clients connect to the authenticated MCP transport at /api/v1/mcp/streamable, with /api/v1/mcp/sse available as a legacy fallback.
Flows that you want to expose as MCP tools must include a Chat Output component.
Prepare tool names and descriptions
Tool names and descriptions help MCP clients determine which actions your flows provide and when to use those actions. It is recommended to provide clear, descriptive names and descriptions for all tools that you serve to MCP clients.
Importance of tool names and descriptions
MCP clients use tool names and descriptions to determine which actions to use when generating responses.
Because MCP clients treat your SkillFlaw deployment as a single MCP server with available flows listed as tools, unclear names and descriptions can cause the agent to select tools incorrectly or inconsistently.
For example, a flow's default tool name is the flow ID, such as adbbf8c7-0a34-493b-90ea-5e8b42f78b66.
This provides no information to an agent about the type of flow or its purpose.
To provide more context about your flows, make sure to name and describe your flows clearly before connecting clients to your SkillFlaw MCP server.
Think of these names and descriptions as function names and code comments. Use clear statements to describe the problems your flows solve.
Example: Tool name and description usage
For example, assume you create a flow based on the Document Q&A template that uses an LLM to chat about resumes, and then you give the flow the following name and description:
-
Tool name:
document_qa_for_resume -
Tool description:
A flow for analyzing Emily's resume.
After connecting your SkillFlaw MCP server to Cursor, you can ask Cursor about the resume, such as What job experience does Emily have?.
Using the context provided by your tool name and description, the agent can decide to use the document_qa_for_resume MCP tool to create a response about Emily's resume.
If necessary, the agent asks permission to use the flow tool before generating the response.
If you ask about a different resume, such as What job experience does Alex have?, the agent can decide that document_qa_for_resume isn't relevant to this request, because the tool description specifies that the flow is for Emily's resume.
In this case, the agent might use another available tool, or it can inform you that it doesn't have access to information about Alex's.
For example:
_10I notice you're asking about Alex's job experience._10Based on the available tools, I can see there is a Document QA for Resume flow that's designed for analyzing resumes._10However, the description mentions it's for "Emily's resume" not Alex's. I don't have access to Alex's resume or job experience information.
Connect clients to your SkillFlaw MCP server
SkillFlaw MCP servers can be connected to local or remote MCP clients with standard MCP configuration.
- JSON
- Auto install
The JSON option allows you to connect a SkillFlaw MCP server to any local or remote MCP client. You can modify this process for any MCP-compatible client.
-
Install any MCP-compatible client.
These steps use Cursor as an example, but the process is generally the same for all clients, with slight differences in client-specific details like file names.
-
In your client, add a new MCP server using the client's UI or configuration file.
For example, in Cursor, go to Cursor Settings, select MCP, and then click Add New Global MCP Server to open Cursor's global
mcp.jsonconfiguration file. -
Recommended: Configure authentication for your MCP server.
-
Add the SkillFlaw MCP server to your client's configuration file. For example:
_11{_11"mcpServers": {_11"PROJECT_NAME": {_11"command": "uvx",_11"args": [_11"mcp-proxy",_11"http://SKILLFLAW_SERVER_ADDRESS/api/v1/mcp/streamable"_11]_11}_11}_11}The default SkillFlaw server address is
http://localhost:7860. If you are using a public SkillFlaw server, the server address is automatically included.If your SkillFlaw server requires authentication, you must include your SkillFlaw API key or OAuth settings in the configuration. For more information, see MCP server authentication.
-
To include other environment variables with your MCP server command, add an
envobject with key-value pairs of environment variables:_14{_14"mcpServers": {_14"PROJECT_NAME": {_14"command": "uvx",_14"args": [_14"mcp-proxy",_14"http://SKILLFLAW_SERVER_ADDRESS/api/v1/mcp/streamable"_14],_14"env": {_14"KEY": "VALUE"_14}_14}_14}_14} -
Save and close your client's MCP configuration file.
-
Confirm that your SkillFlaw MCP server is on the client's list of MCP servers. If necessary, restart your client to apply the modified configuration file.
The auto install option is available only for specific MCP clients. Auto install requires the client to be installed locally so SkillFlaw can write to the client's configuration file. If your client isn't supported, is installed remotely, or you need to pass additional environment variables, use the JSON option.
-
Install Cursor, Claude, or Windsurf on the same computer where your SkillFlaw server is running.
-
Recommended: Configure authentication for your MCP server.
-
If your SkillFlaw deployment provides an Auto install option, use it to write the global MCP server configuration into the local client's config file.
SkillFlaw attempts to add this configuration even if the selected client isn't installed. To verify the installation, check the available MCP servers in your client.
Once your MCP client is connected to your SkillFlaw MCP server, your flows are registered as tools. Cursor determines when to use tools based on your queries, and requests permissions when necessary. For more information, see the MCP documentation for your client, such as Cursor's MCP documentation.
MCP server authentication
SkillFlaw MCP endpoints use the same authentication boundary as the SkillFlaw API.
If authentication is enabled, connect with a SkillFlaw API key or another authenticated SkillFlaw session.
For MCP clients that proxy HTTP transport through mcp-proxy, include the x-api-key header in the command arguments.
For example:
_14{_14 "mcpServers": {_14 "PROJECT_NAME": {_14 "command": "uvx",_14 "args": [_14 "mcp-proxy",_14 "--headers",_14 "x-api-key",_14 "YOUR_API_KEY",_14 "http://SKILLFLAW_SERVER_ADDRESS/api/v1/mcp/streamable"_14 ]_14 }_14 }_14}
If SkillFlaw authentication is disabled, the MCP endpoint is publicly accessible. Only use that configuration in trusted environments.
MCP server environment variables
MCP availability and transport behavior are controlled by your SkillFlaw deployment configuration.
For the current release, use the global /api/v1/mcp/* endpoints described on this page and verify any deployment-specific environment variables against your runtime configuration.
Deploy your SkillFlaw MCP server externally
To deploy your SkillFlaw MCP server externally, see Deploy a public SkillFlaw server.
Use MCP Inspector to test and debug flows
MCP Inspector requires any LTS version of Node.js installed on your computer.
MCP Inspector is a common tool for testing and debugging MCP servers. You can use MCP Inspector to monitor your flows and get insights into how they are being consumed by the MCP server.
-
Install MCP Inspector:
_10npx @modelcontextprotocol/inspectorFor more information about configuring MCP Inspector, including specifying a proxy port, see the MCP Inspector GitHub project.
-
Open a web browser and navigate to the MCP Inspector UI. The default address is
http://localhost:6274. -
In the MCP Inspector UI, enter the connection details for your SkillFlaw MCP server. The field values depend on your server's method of authentication.
- API key
- None
- Transport Type: Select STDIO.
- Command:
uvx - Arguments: Enter the following list of arguments, separated by spaces. Replace the values for
YOUR_API_KEYandSKILLFLAW_SERVER_ADDRESSwith the values from your SkillFlaw deployment. For example:_10mcp-proxy --headers x-api-key YOUR_API_KEY http://SKILLFLAW_SERVER_ADDRESS/api/v1/mcp/streamable
- Transport Type: Select SSE.
- URL: Enter the SkillFlaw MCP server's endpoint. For example:
_10http://localhost:7860/api/v1/mcp/streamable
-
Click Connect.
If the connection was successful, you should see the available SkillFlaw tools in the Tools tab. From this tab, you can monitor how your flows are being registered as tools by MCP, as well as test the tools with custom input values.
-
To quit MCP Inspector, press Control+C in the same terminal window where you started it.
Troubleshoot SkillFlaw MCP servers
For troubleshooting advice for MCP servers and clients, see Troubleshoot SkillFlaw: MCP issues.