Skip to main content

Built-in MCP server

The MCP server in OInt CLI is a built-in implementation of the Model Context Protocol over standard input/output (stdio) that you can use so an AI agent can work directly with the capabilities of the Open Integration Package.

Available tools

ToolPurpose
get_servicesList of available services (CLI commands) that correspond to OInt libraries
get_service_methodsList of methods for the selected service
get_method_parametersDescribes method parameters (types, default values, hints)
execute_methodRuns a method with a set of named parameters
get_variablesReturns the list of variables defined in the configuration file (see below)

Starting the server

Start the MCP server with oint mcp start and one or more parameters:

  • --config (-c) — path to a JSON configuration file, or default to use the default configuration
  • --log (-l) — path to a log file, if needed

Example start commands:

oint mcp start --config default
oint mcp start -c /home/user/oint-mcp.json -l /tmp/oint-mcp.log

You can get a template for your own configuration (the --config argument) with the separate command oint mcp config:

oint mcp config --empty true

When the command is run with --empty true, an empty JSON template is returned; with --empty false, explanatory example fields are added. Save the template by appending the standard --out <file path> option to the command or using shell redirection.

Configuration file

The configuration is a JSON file for various MCP server settings. Currently a single block is implemented — vars, which stores user-defined variable values. The agent can use these while running to substitute them for real data when calling the execute_method tool.

Example oint-mcp.json:

oint-mcp.json
{
"vars": {
"TelegramToken": "123456:ABC-DEF...",
"BitrixWebhook": "https://example.bitrix24.ru/rest/1/xxxxx/"
}
}

Starting the server with a configuration file:

oint mcp start -c /home/user/oint-mcp.json

While running, the agent can call the get_variables tool to obtain the list of keys (names) of configured variables (without receiving their actual values). All of them are prefixed with @@ and can be supplied by the agent as values for OInt function parameters. When the MCP server receives such a value, it treats it as a variable key and replaces it with the real value from the configuration file. Secret data can therefore be used by the agent without passing it in plain text.

Connecting the server in AI agents

Below are examples of adding the OInt MCP server in various IDEs.

In Cursor, MCP is configured in user or project settings (for example via the MCP settings in the UI or a file under .cursor).

{
"mcpServers": {
"oint-mcp": {
"command": "oint",
"args": ["mcp", "start", "-c", "default"]
}
}
}

For a configuration file that holds secrets, use an absolute path instead of default:

{
"mcpServers": {
"oint-mcp": {
"command": "oint",
"args": ["mcp", "start", "-c", "C:\\Users\\user\\oint-mcp.json", "-l", "C:\\Temp\\oint-mcp.log"]
}
}
}

See the Cursor MCP documentation for the current format and file location.

Diagnostics

If the client does not see the tools or fails on startup, run diagnostics in a terminal (command line):

  1. Check that oint mcp start -c default runs without errors (the process should wait for input and not print messages to the console).
  2. Check that the JSON in the configuration file is valid when using -c with a custom configuration.
  3. Use logging (the -l option) and analyze the log after launch.