AI coding agents are useful, but they still have one frustrating habit:
They guess.
You ask something reasonable like:
“Where do we validate user input before inserting into the database?”
And instead of knowing where to look, the agent starts reading files one by one.
In a small project, that is fine.
In a real production codebase with 80,000+ lines, multiple engineers, old decisions, half-renamed folders, and years of accumulated context, this gets messy fast.
The agent reads a handful of files, hits context limits, and gives you an answer that sounds confident but points to the wrong part of the codebase.
I got tired of that, so I built an open-source MCP toolkit to fix it.
What I Built
I built MCP Server Toolkit, a collection of four Model Context Protocol servers that give AI coding agents direct access to the things they need:
- Your codebase
- Your database
- Your docs
- Your git history
Repo:
https://github.com/naveenayalla1-CS50/mcp-server-toolkit
The goal is simple:
Stop making the agent guess. Give it tools that know where to look.
Why MCP?
The Model Context Protocol, or MCP, lets AI agents call external tools in a standardized way.
Instead of the agent reading random files and hoping the right context fits, it can call a purpose-built tool like:
search_code("validate user input")
And get back file paths, line numbers, and relevant context.
That means fewer wrong guesses, fewer wasted tokens, and much better answers in large codebases.
The Four Servers
1. mcp-code-search
Searches across your repo and returns relevant matches with file paths, line numbers, and surrounding context.
Example:
You: Find all places where we call sendEmail
Agent calls search_code("sendEmail")
Results:
api/users.ts:89
services/email.ts:42
jobs/reminders.ts:117
It also includes targeted read_file and list_files tools so the agent can inspect only the files it actually needs.
2. mcp-database
Lets the agent ask read-only database questions in natural language.
Example:
You: How many users signed up in the last 7 days?
Agent runs:
SELECT count(*) FROM users
WHERE created_at > now() - interval '7 days';
It supports Postgres and SQLite.
The database server is read-only by default. You have to explicitly enable writable mode if you want writes.
That default matters. I did not want an agent anywhere near production data with write permissions unless the developer intentionally allowed it.
3. mcp-docs
Indexes a folder of Markdown docs with no embedding setup and no external API.
You can point it at internal docs, runbooks, API references, or project notes.
Example:
You: What does our runbook say about rolling back a deployment?
Agent calls search_docs("rollback deployment")
Result:
docs/ops/deploy.md:47
"To rollback: run ./scripts/rollback.sh <version>..."
It works locally and does not send your docs anywhere.
4. mcp-git
Lets the agent query git history, diffs, blame, and branches.
This is useful when the agent needs to understand not just what the code does, but why it changed.
Example:
You: Why was this validation added?
Agent checks git blame and recent commits for that file.
Install
The fastest way to get started is:
npx mcp-server-toolkit@latest init
That launches an interactive setup.
Pick the servers you want, provide DATABASE_URL if you are using the database server, and it generates the config for Claude Code, Cursor, Windsurf, or any other MCP-compatible client.
Manual Claude config example:
{
"servers": {
"code-search": {
"command": "npx",
"args": ["-y", "@mcp-toolkit/code-search", "."]
},
"database": {
"command": "npx",
"args": ["-y", "@mcp-toolkit/database", "--read-only"],
"env": {
"DATABASE_URL": "${DATABASE_URL}"
}
},
"docs": {
"command": "npx",
"args": ["-y", "@mcp-toolkit/docs", "./docs"]
},
"git": {
"command": "npx",
"args": ["-y", "@mcp-toolkit/git", "."]
}
}
}
Restart your MCP-compatible client and the tools are available.
Why I Made It
This project came from a very specific frustration.
AI coding agents are getting better, but they still struggle when the answer is buried inside a large repo.
The problem is not always reasoning.
A lot of the time, the problem is retrieval.
The agent simply does not know where to look.
MCP servers help solve that by giving the agent focused tools:
Instead of:
Read random files → guess → maybe answer correctly
You get:
Search with the right tool → inspect relevant result → answer with context
That is a much better workflow for real codebases.
Building Your Own Server
I also added @mcp-toolkit/core to make building new MCP servers easier.
A simple server looks like this:
import { createServer, tool, z } from '@mcp-toolkit/core';
const server = createServer({
name: 'my-server',
version: '1.0.0',
});
server.addTool(
tool({
name: 'get_feature_flags',
description: 'Get all active feature flags for an environment',
input: z.object({
env: z.string().describe('Environment name: staging or production'),
}),
run: async ({ env }) => {
const flags = await fetchFlags(env);
return {
content: JSON.stringify(flags, null, 2),
};
},
})
);
server.start();
You can scaffold a new server with:
npm run new-server -- my-server-name
What I Learned
A few things stood out while building this:
The MCP TypeScript SDK is solid.
Most of my time went into the actual tool logic, not the protocol plumbing.
Read-only defaults matter.
Especially for database access. Agents should not get write permissions by accident.
Zod works really well for tool input validation.
When the agent passes the wrong input shape, the error is usually clear enough that it can self-correct.
Roadmap
The current version includes:
- Code search
- Database
- Docs
- Git
Next, I am thinking about:
- Notion
- Linear/Jira
- A small web UI for registered tools
- More examples for custom MCP servers
Contributions are welcome.
Try It
GitHub:
https://github.com/naveenayalla1-CS50/mcp-server-toolkit
Install:
npx mcp-server-toolkit@latest init
If you try it, I would love feedback, issues, or PRs.
Especially if you are using Claude Code, Cursor, Windsurf, or another MCP-compatible coding agent on a large repo.
Top comments (0)