Help getting my own MCP server running

I am trying to get my own MCP server up and running

I have this config

{
“mcpServers”: {

"mcp-schema-server": {

  "name": "MCPSchema Server",

  "description": "Provides database schema information via Model Context Protocol.",

  "command": "C:\\\\Program Files\\\\dotnet\\\\dotnet.exe",

  "args": \[

    "C:\\\\Users\\\\M\\\\Git\\\\MCPSchema\\\\MCPSchema\\\\bin\\\\Debug\\\\net9.0\\\\MCPSchema.dll"

  \]

}

}
}

and cursor is OK with it existing

but the program doesn’t seem to run

If I launch it manually I’ve configured it to generate below in a logfile, but Cursor doesn’t seem to run it at all.

PS C:\Users\M\Git\MCPSchema\MCPSchema> & “C:\Program Files\dotnet\dotnet.exe” “C:\Users\M\Git\MCPSchema\MCPSchema\bin\Debug\net9.0\MCPSchema.dll”
Initializing logger with file path: C:\Users\M\Git\MCPLib\mcp_server.log
info: MCPServer[0]
MCPServerBase initialized. Log file: C:\Users\M\Git\MCPLib\mcp_server.log
info: MCPServer[0]
SchemaServer constructor completed.
info: MCPServer[0]
MCPServerBase: Entering Start method. Ready to receive messages.
info: MCPServer[0]
Starting MCP Server Base…
hi
info: MCPServer[0]
Received: hi
hi
PS C:\Users\M\Git\MCPSchema\MCPSchema>

I don’t know where to look next.

Can anybody help?

Ask Agent to read or read yourself: GitHub - modelcontextprotocol/docs: Documentation for the Model Context Protocol (MCP)

thanks but that does not tell me why cursor is not initializing the program

RTFM is not help btw.

EDIT: actually it was the space in “Program Files”, you cant have spaces in the path

The answer was to build the exe, and change the command. Invoking via dotnet was the problem

{
  "mcpServers": {
    "mcp-schema-server": {
      "name": "MCPSchema Server",
      "description": "Provides database schema information via Model Context Protocol.",
      "command": "C:\\Users\\M\\Git\\MCPSchema\\MCPSchema\\bin\\Debug\\net9.0\\MCPSchema.exe"
    }
  }
}

hi @Lesslaw-m thank you for finding the solution. From the logs it wasn’t clear what happens in Cursor.

Cursor has also in bottom pane > Output > MCP Logs (in dropdown).

It would be helpful to know if some info about MCP issue is shown there when you run it via dotnet.

1 Like

ah, @condor that is exactly what I was looking for

I never knew that drop-down existed - game changer :slight_smile:

Turns out it’s a quoting problem. my “solution” works because the exe path has no spaces in it

1 Like

this works fine

    "mcp-schema-server": {
      "name": "MCPSchema Server",
      "description": "Provides database schema information via Model Context Protocol.",
      "command": "dotnet.exe",
      "args": [
        "C:\\Users\\M\\Git\\MCPSchema\\MCPSchema\\bin\\Debug\\net9.0\\MCPSchema.dll"
      ]
    }
1 Like

It was nothing to do with the protocol

Ah great, I will keep this thread on my list for MCP/Win/.net solutions.

Please note that due to large amount of threads and responses it may take time to get to new new posts.

1 Like

It’s not DotNet related, it’s any command with a space in the filename

"command": "C:\MCP Schema.exe"

2025-07-21 08:51:12.969 [info] user-mcp-schema-server: Starting new stdio process with command: C:\MCP Schema.exe

2025-07-21 08:51:13.122 [error] user-mcp-schema-server: ‘C:\MCP’ is not recognized as an internal or external command, operable program or batch file.

It is not clear how one would escape it.

The Windows way of using Quotes is accepted but doesn’t work

“command”: “\“C:\\MCP Schema.exe\””

It includes the “ when trying to exec it

Starting new stdio process with command: “C:\MCP Schema.exe”

2025-07-21 08:53:52.012 [error] user-mcp-schema-server: The filename, directory name, or volume label syntax is incorrect.

A Unix way of escaping

“command”: “C:\\MCP\ Schema.exe”
this is invalid json
“command”: “C:\\MCP\\ Schema.exe”

results in

2025-07-21 08:57:09.842 [error] user-mcp-schema-server: ‘C:\MCP\’ is not recognized as an internal or external command, operable program or batch file.

How are spaces in paths handled on Linux/Mac? perhaps that is also broken

It looks like the arguments to exec are passed bare and being interpreted as separate args

Yes thank you, thats what I understood, but if someone else with related issues comes it will help.

On all OS you have to escape spaces or quote them.

So how does one quote them? I just tried multiple ways

Good question, will have to look what is reported as I usually dont use spaces in paths myself. From what I see from MCPs on Windows that people recommend using path without spaces, or using the 8.3 filename

  • Using the short 8.3 filename (e.g., ‎C:\PROGRA~1\MyApp\myapp.exe) is a workaround that can avoid spaces entirely. You can get the short path by running ‎dir /x in the command prompt.

Yeah, spaces in paths / filenames was a mistake and sadly I remember being happy about it when Win95 introduced them - oh if I had known what pain that would cause.

Good reminder about the 8.3 version, I haven’t considered that for along time!

Fix your JSON : use straight quotes and \\ instead of \\\\

• Add dotnet to your PATH, or keep full path to dotnet.exe

Test with something simple like:

json

"command": "cmd.exe",  
"args": ["/c", "echo Cursor works!"]

If that works, plug your server config back in.


Npx command is not working on MCP - windows and macos

the \\ into \\\\ was put in by the interface, not me. Double Reverse Solidus is required in JSON.

Anyway, the problem is spaces in filenames in the JSON config - DOTNET was a red herring.

I have my MCP working now but thanks.